GEOS 3.15.0beta3
Geometry.h
1/**********************************************************************
2 *
3 * GEOS - Geometry Engine Open Source
4 * http://geos.osgeo.org
5 *
6 * Copyright (C) 2009 2011 Sandro Santilli <strk@kbt.io>
7 * Copyright (C) 2005 2006 Refractions Research Inc.
8 * Copyright (C) 2001-2002 Vivid Solutions Inc.
9 *
10 * This is free software; you can redistribute and/or modify it under
11 * the terms of the GNU Lesser General Public Licence as published
12 * by the Free Software Foundation.
13 * See the COPYING file for more information.
14 *
15 **********************************************************************
16 *
17 * Last port: geom/Geometry.java rev. 1.112
18 *
19 **********************************************************************/
20
21#pragma once
22
23#ifndef USE_UNSTABLE_GEOS_CPP_API
24#ifndef _MSC_VER
25# warning "The GEOS C++ API is unstable, please use the C API instead"
26# warning "HINT: #include geos_c.h"
27#else
28#pragma message("The GEOS C++ API is unstable, please use the C API instead")
29#pragma message("HINT: #include geos_c.h")
30#endif
31#endif
32
33#include <geos/export.h>
34#include <geos/geom/Envelope.h>
35#include <geos/geom/Dimension.h> // for Dimension::DimensionType
36#include <geos/geom/GeometryComponentFilter.h> // for inheritance
37#include <geos/geom/CoordinateSequence.h> // to materialize CoordinateSequence
38#include <geos/util/Progress.h>
39
40#include <algorithm>
41#include <string>
42#include <iostream>
43#include <vector>
44#include <memory>
45
46#ifdef _MSC_VER
47#pragma warning(push)
48#pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
49#pragma warning(disable: 4355) // warning C4355: 'this' : used in base member initializer list
50#endif
51
52// Forward declarations
53namespace geos {
54namespace algorithm {
55class CurveToLineParams;
56class LineToCurveParams;
57}
58namespace geom {
59class Coordinate;
60class CoordinateFilter;
61class CoordinateSequence;
62class CoordinateSequenceFilter;
63class GeometryComponentFilter;
64class GeometryFactory;
65class GeometryFilter;
66class PrecisionModel;
67class Point;
68class IntersectionMatrix;
69}
70namespace io { // geos.io
71} // namespace geos.io
72}
73
74namespace geos { // geos
75namespace geom { // geos::geom
76
78enum GeometryTypeId : int {
95 GEOS_CIRCULARSTRING,
96 GEOS_COMPOUNDCURVE,
97 GEOS_CURVEPOLYGON,
98 GEOS_MULTICURVE,
99 GEOS_MULTISURFACE,
100};
101
102enum GeometrySortIndex {
103 SORTINDEX_POINT = 0,
104 SORTINDEX_MULTIPOINT = 1,
105 SORTINDEX_LINESTRING = 2,
106 SORTINDEX_LINEARRING = 3,
107 SORTINDEX_MULTILINESTRING = 4,
108 SORTINDEX_POLYGON = 5,
109 SORTINDEX_MULTIPOLYGON = 6,
110 SORTINDEX_GEOMETRYCOLLECTION = 7,
111 SORTINDEX_CIRCULARSTRING = 8,
112 SORTINDEX_COMPOUNDCURVE = 9,
113 SORTINDEX_CURVEPOLYGON = 10,
114 SORTINDEX_MULTICURVE = 11,
115 SORTINDEX_MULTISURFACE = 12,
116};
117
201class GEOS_DLL Geometry {
202
203public:
204
205 friend class GeometryFactory;
206
208 using ConstVect = std::vector<const Geometry*>;
209
211 using NonConstVect = std::vector<Geometry*>;
212
214 using Ptr = std::unique_ptr<Geometry> ;
215
217 std::unique_ptr<Geometry> clone() const { return std::unique_ptr<Geometry>(cloneImpl()); }
218
220 virtual ~Geometry();
221
222
230 const GeometryFactory*
232 {
233 return _factory;
234 }
235
249 void
250 setUserData(void* newUserData)
251 {
252 _userData = newUserData;
253 }
254
261 void*
263 {
264 return _userData;
265 }
266
277 int getSRID() const
278 {
279 return SRID;
280 }
281
285 virtual void
286 setSRID(int newSRID)
287 {
288 SRID = newSRID;
289 }
290
296
298 virtual const CoordinateXY* getCoordinate() const = 0; //Abstract
299
305 virtual std::unique_ptr<CoordinateSequence> getCoordinates() const = 0; //Abstract
306
308 virtual std::size_t getNumPoints() const = 0; //Abstract
309
311 virtual bool isSimple() const;
312
314 virtual std::string getGeometryType() const = 0; //Abstract
315
317 virtual bool hasCurvedComponents() const;
318
321 virtual bool hasCurvedTypes() const;
322
324 virtual GeometryTypeId getGeometryTypeId() const = 0; //Abstract
325
333 virtual std::size_t
335 {
336 return 1;
337 }
338
341 virtual const Geometry*
342 getGeometryN(std::size_t /*n*/) const
343 {
344 return this;
345 }
346
349 std::unique_ptr<Geometry> getLinearized(const algorithm::CurveToLineParams& params) const
350 {
351 return std::unique_ptr<Geometry>(getLinearizedImpl(params));
352 }
353
356 std::unique_ptr<Geometry> getCurved(const algorithm::LineToCurveParams& params) const
357 {
358 return std::unique_ptr<Geometry>(getCurvedImpl(params));
359 }
360
370 bool isValid() const;
371
373 virtual bool isEmpty() const = 0; //Abstract
374
376 virtual bool
378 {
379 return false;
380 }
381
383 virtual Dimension::DimensionType getDimension() const = 0; //Abstract
384
387 return getDimension() == d;
388 }
389
392 return d == getDimension();
393 }
394
395 bool isPuntal() const {
396 return isDimensionStrict(Dimension::P);
397 }
398
399 bool isLineal() const {
400 return isDimensionStrict(Dimension::L);
401 }
402
403 bool isPolygonal() const {
404 return isDimensionStrict(Dimension::A);
405 }
406
407 bool isMixedDimension() const;
408 bool isMixedDimension(Dimension::DimensionType* baseDim) const;
409
410 bool isCollection() const {
411 int t = getGeometryTypeId();
412 return t == GEOS_GEOMETRYCOLLECTION ||
413 t == GEOS_MULTIPOINT ||
415 t == GEOS_MULTIPOLYGON ||
416 t == GEOS_MULTICURVE ||
417 t == GEOS_MULTISURFACE;
418 }
419
420 static GeometryTypeId multiTypeId(GeometryTypeId typeId) {
421 switch (typeId) {
422 case GEOS_POINT: return GEOS_MULTIPOINT;
424 case GEOS_POLYGON: return GEOS_MULTIPOLYGON;
425 case GEOS_CIRCULARSTRING:
426 case GEOS_COMPOUNDCURVE: return GEOS_MULTICURVE;
427 case GEOS_CURVEPOLYGON: return GEOS_MULTISURFACE;
428 default: return typeId;
429 }
430 }
431
433 virtual uint8_t getCoordinateDimension() const = 0; //Abstract
434
435 virtual bool hasZ() const = 0;
436
437 virtual bool hasM() const = 0;
438
455 virtual std::unique_ptr<Geometry> getBoundary() const = 0; //Abstract
456
458 virtual int getBoundaryDimension() const = 0; //Abstract
459
461 virtual std::unique_ptr<Geometry> getEnvelope() const;
462
467 virtual const Envelope* getEnvelopeInternal() const = 0;
468
485 virtual bool disjoint(const Geometry* other) const;
486
491 virtual bool touches(const Geometry* other) const;
492
494 virtual bool intersects(const Geometry* g) const;
495
518 virtual bool crosses(const Geometry* g) const;
519
524 virtual bool within(const Geometry* g) const;
525
527 virtual bool contains(const Geometry* g) const;
528
534 virtual bool overlaps(const Geometry* g) const;
535
550 bool relate(const Geometry* g,
551 const std::string& intersectionPattern) const;
552
553 bool
554 relate(const Geometry& g, const std::string& intersectionPattern) const
555 {
556 return relate(&g, intersectionPattern);
557 }
558
560 std::unique_ptr<IntersectionMatrix> relate(const Geometry* g) const;
561
562 std::unique_ptr<IntersectionMatrix> relate(const Geometry& g) const;
563
569 bool equals(const Geometry* g) const;
570
609 bool covers(const Geometry* g) const;
610
641 bool coveredBy(const Geometry* g) const;
642
643
645 virtual std::string toString() const;
646
647 virtual std::string toText() const;
648
653 std::unique_ptr<Geometry> buffer(double distance) const;
654
662 std::unique_ptr<Geometry> buffer(double distance, int quadrantSegments) const;
663
700 std::unique_ptr<Geometry> buffer(double distance, int quadrantSegments,
701 int endCapStyle) const;
702
706 virtual std::unique_ptr<Geometry> convexHull() const;
707
714 std::unique_ptr<Geometry> reverse() const { return std::unique_ptr<Geometry>(reverseImpl()); }
715
725 std::unique_ptr<Geometry> intersection(const Geometry* other) const;
726
736 std::unique_ptr<Geometry> Union(const Geometry* other) const;
737 // throw(IllegalArgumentException *, TopologyException *);
738
756 Ptr Union(geos::util::ProgressFunction* progressFunction) const;
757 // throw(IllegalArgumentException *, TopologyException *);
758
759 Ptr Union() const
760 {
761 geos::util::ProgressFunction* progressFunction = nullptr;
762 return Union(progressFunction);
763 }
764
775 std::unique_ptr<Geometry> difference(const Geometry* other) const;
776
786 std::unique_ptr<Geometry> symDifference(const Geometry* other) const;
787
794 virtual bool equalsExact(const Geometry* other, double tolerance = 0)
795 const = 0; // Abstract
796
801 virtual bool equalsIdentical(const Geometry* other) const = 0;
802
803 virtual void apply_rw(const CoordinateFilter* filter) = 0; //Abstract
804 virtual void apply_ro(CoordinateFilter* filter) const = 0; //Abstract
805 virtual void apply_rw(GeometryFilter* filter);
806 virtual void apply_ro(GeometryFilter* filter) const;
807 virtual void apply_rw(GeometryComponentFilter* filter);
808 virtual void apply_ro(GeometryComponentFilter* filter) const;
809
818 virtual void apply_rw(CoordinateSequenceFilter& filter) = 0;
819
826 virtual void apply_ro(CoordinateSequenceFilter& filter) const = 0;
827
837 template <class T>
838 void
840 {
841 for(std::size_t i = 0, n = getNumGeometries(); i < n; ++i) {
842 f.filter(getGeometryN(i));
843 }
844 }
845
851 virtual void normalize() = 0; //Abstract
852
854 int compareTo(const Geometry* geom) const;
855
857 virtual double getArea() const;
858
860 virtual double getLength() const;
861
867 virtual double distance(const Geometry* g) const;
868
869
881 virtual bool isWithinDistance(const Geometry* geom,
882 double cDistance) const;
883
893 virtual std::unique_ptr<Point> getCentroid() const;
894
896 //
899 virtual bool getCentroid(CoordinateXY& ret) const;
900
911 std::unique_ptr<Point> getInteriorPoint() const;
912
919
925 virtual void geometryChangedAction() = 0;
926
927protected:
929 virtual Geometry* cloneImpl() const = 0;
930
932 virtual Geometry* reverseImpl() const = 0;
933
934 virtual Geometry* getLinearizedImpl(const algorithm::CurveToLineParams&) const = 0;
935
936 virtual Geometry* getCurvedImpl(const algorithm::LineToCurveParams&) const = 0;
937
939 template<typename T>
940 static bool hasNonEmptyElements(const std::vector<T>* geometries) {
941 return std::any_of(geometries->begin(), geometries->end(), [](const T& g) { return !g->isEmpty(); });
942 }
943
945 static bool hasNullElements(const CoordinateSequence* list);
946
948 template<typename T>
949 static bool hasNullElements(const std::vector<T>* geometries) {
950 return std::any_of(geometries->begin(), geometries->end(), [](const T& g) { return g == nullptr; });
951 }
952
953// static void reversePointOrder(CoordinateSequence* coordinates);
954// static Coordinate& minCoordinate(CoordinateSequence* coordinates);
955// static void scroll(CoordinateSequence* coordinates,Coordinate* firstCoordinate);
956// static int indexOf(Coordinate* coordinate,CoordinateSequence* coordinates);
957//
962 virtual bool isEquivalentClass(const Geometry* other) const;
963
964 static void checkNotGeometryCollection(const Geometry* g);
965
966 virtual int compareToSameClass(const Geometry* geom) const = 0; //Abstract
967
968 template<typename T>
969 static int compare(const T& a, const T& b)
970 {
971 std::size_t i = 0;
972 std::size_t j = 0;
973 while(i < a.size() && j < b.size()) {
974 const auto& aGeom = *a[i];
975 const auto& bGeom = *b[j];
976
977 int comparison = aGeom.compareTo(&bGeom);
978 if(comparison != 0) {
979 return comparison;
980 }
981
982 i++;
983 j++;
984 }
985
986 if(i < a.size()) {
987 return 1;
988 }
989
990 if(j < b.size()) {
991 return -1;
992 }
993
994 return 0;
995 }
996
997 bool equal(const CoordinateXY& a, const CoordinateXY& b,
998 double tolerance) const;
999 int SRID;
1000
1001 Geometry(const Geometry& geom);
1002
1012 Geometry(const GeometryFactory* factory);
1013
1014 template<typename T>
1015 static std::vector<std::unique_ptr<Geometry>> toGeometryArray(std::vector<std::unique_ptr<T>> && v) {
1016 static_assert(std::is_base_of<Geometry, T>::value, "");
1017 std::vector<std::unique_ptr<Geometry>> gv(v.size());
1018 for (std::size_t i = 0; i < v.size(); i++) {
1019 gv[i] = std::move(v[i]);
1020 }
1021 return gv;
1022 }
1023
1024 static std::vector<std::unique_ptr<Geometry>> toGeometryArray(std::vector<std::unique_ptr<Geometry>> && v) {
1025 return std::move(v);
1026 }
1027
1028protected:
1029
1030 virtual int getSortIndex() const = 0;
1031
1032
1033private:
1034
1035 class GEOS_DLL GeometryChangedFilter : public GeometryComponentFilter {
1036 public:
1037 void filter_rw(Geometry* geom) override;
1038 };
1039
1040 static GeometryChangedFilter geometryChangedFilter;
1041
1046 const GeometryFactory* _factory;
1047
1048 void* _userData;
1049};
1050
1055GEOS_DLL std::ostream& operator<< (std::ostream& os, const Geometry& geom);
1056
1057struct GEOS_DLL GeometryGreaterThen {
1058 bool operator()(const Geometry* first, const Geometry* second);
1059};
1060
1061
1063GEOS_DLL std::string geosversion();
1064
1070GEOS_DLL std::string jtsport();
1071
1072// We use this instead of std::pair<unique_ptr<Geometry>> because C++11
1073// forbids that construct:
1074// http://lwg.github.com/issues/lwg-closed.html#2068
1075struct GeomPtrPair {
1076 typedef std::unique_ptr<Geometry> GeomPtr;
1077 GeomPtr first;
1078 GeomPtr second;
1079};
1080
1081} // namespace geos::geom
1082} // namespace geos
1083
1084#ifdef _MSC_VER
1085#pragma warning(pop)
1086#endif
Geometry classes support the concept of applying a coordinate filter to every coordinate in the Geome...
Definition CoordinateFilter.h:43
Interface for classes which provide operations that can be applied to the coordinates in a Coordinate...
Definition CoordinateSequenceFilter.h:56
The internal representation of a list of coordinates inside a Geometry.
Definition CoordinateSequence.h:56
DimensionType
Definition Dimension.h:29
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition Envelope.h:59
Definition GeometryComponentFilter.h:41
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition GeometryFactory.h:72
Geometry classes support the concept of applying a Geometry filter to the Geometry.
Definition GeometryFilter.h:45
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition Geometry.h:201
virtual std::unique_ptr< Geometry > getBoundary() const =0
Returns the boundary, or an empty geometry of appropriate dimension if this Geometry is empty.
virtual int getBoundaryDimension() const =0
Returns the dimension of this Geometrys inherent boundary.
virtual bool equalsIdentical(const Geometry *other) const =0
Returns true if the two geometries are of the same type and their vertices corresponding by index are...
std::vector< Geometry * > NonConstVect
A vector of non-const Geometry pointers.
Definition Geometry.h:211
void applyComponentFilter(T &f) const
Apply a filter to each component of this geometry. The filter is expected to provide a ....
Definition Geometry.h:839
virtual const CoordinateXY * getCoordinate() const =0
Returns a vertex of this Geometry, or NULL if this is the empty geometry.
std::unique_ptr< Geometry > symDifference(const Geometry *other) const
Returns a set combining the points in this Geometry not in other, and the points in other not in this...
std::unique_ptr< Geometry > reverse() const
Computes a new geometry which has all component coordinate sequences in reverse order (opposite orien...
Definition Geometry.h:714
virtual ~Geometry()
Destroy Geometry and all components.
virtual void apply_rw(CoordinateSequenceFilter &filter)=0
const PrecisionModel * getPrecisionModel() const
Get the PrecisionModel used to create this Geometry.
std::unique_ptr< IntersectionMatrix > relate(const Geometry *g) const
Returns the DE-9IM intersection matrix for the two Geometrys.
virtual void geometryChangedAction()=0
Notifies this Geometry that its Coordinates have been changed by an external party.
virtual bool equalsExact(const Geometry *other, double tolerance=0) const =0
Returns true iff the two Geometrys are of the same type and their vertices corresponding by index are...
virtual bool isDimensionStrict(Dimension::DimensionType d) const
Checks whether this Geometry consists only of components having dimension d.
Definition Geometry.h:391
Ptr Union(geos::util::ProgressFunction *progressFunction) const
Computes the union of all the elements of this geometry. Heterogeneous GeometryCollections are fully ...
virtual void normalize()=0
virtual void apply_ro(CoordinateSequenceFilter &filter) const =0
virtual bool intersects(const Geometry *g) const
Returns true if disjoint returns false.
virtual bool crosses(const Geometry *g) const
virtual GeometryTypeId getGeometryTypeId() const =0
Return an integer representation of this Geometry type.
int compareTo(const Geometry *geom) const
Comparator for sorting geometry.
virtual std::unique_ptr< Geometry > convexHull() const
Returns the smallest convex Polygon that contains all the points in the Geometry.
virtual bool hasDimension(Dimension::DimensionType d) const
Checks whether any component of this geometry has dimension d.
Definition Geometry.h:386
virtual std::string getGeometryType() const =0
Return a string representation of this Geometry type.
virtual uint8_t getCoordinateDimension() const =0
Returns the coordinate dimension of this Geometry (2=XY, 3=XYZ or XYM, 4=XYZM).
virtual bool isWithinDistance(const Geometry *geom, double cDistance) const
Tests whether the distance from this Geometry to another is less than or equal to a specified value.
virtual double getLength() const
Returns the length of this Geometry.
virtual double distance(const Geometry *g) const
std::unique_ptr< Point > getInteriorPoint() const
Computes an interior point of this Geometry.
std::unique_ptr< Geometry > intersection(const Geometry *other) const
Returns a Geometry representing the points shared by this Geometry and other.
virtual bool getCentroid(CoordinateXY &ret) const
Computes the centroid of this Geometry as a Coordinate.
std::unique_ptr< Geometry > Ptr
An unique_ptr of Geometry.
Definition Geometry.h:214
virtual const Geometry * getGeometryN(std::size_t) const
Returns a pointer to the nth Geometry in this collection (or self if this is not a collection)
Definition Geometry.h:342
virtual bool hasCurvedComponents() const
Returns whether the Geometry contains arcs.
std::unique_ptr< Geometry > getCurved(const algorithm::LineToCurveParams &params) const
Definition Geometry.h:356
virtual bool hasCurvedTypes() const
virtual bool within(const Geometry *g) const
Returns true if the DE-9IM intersection matrix for the two Geometrys is T*F**F***.
virtual std::size_t getNumPoints() const =0
Returns the count of this Geometrys vertices.
static bool hasNullElements(const CoordinateSequence *list)
Returns true if the CoordinateSequence contains any null elements.
virtual Geometry * reverseImpl() const =0
Make a geometry with coordinates in reverse order.
void geometryChanged()
Notifies this Geometry that its Coordinates have been changed by an external party (using a Coordinat...
void setUserData(void *newUserData)
A simple scheme for applications to add their own custom data to a Geometry. An example use might be ...
Definition Geometry.h:250
virtual bool isEmpty() const =0
Returns whether or not the set of points in this Geometry is empty.
bool relate(const Geometry *g, const std::string &intersectionPattern) const
Returns true if the elements in the DE-9IM intersection matrix for the two Geometrys match the elemen...
Geometry(const GeometryFactory *factory)
Construct a geometry with the given GeometryFactory.
bool isValid() const
Tests the validity of this Geometry.
std::vector< const Geometry * > ConstVect
A vector of const Geometry pointers.
Definition Geometry.h:208
const GeometryFactory * getFactory() const
Gets the factory which contains the context in which this geometry was created.
Definition Geometry.h:231
virtual bool touches(const Geometry *other) const
Returns true if the DE-9IM intersection matrix for the two Geometrys is FT*******,...
virtual std::unique_ptr< Geometry > getEnvelope() const
Returns this Geometrys bounding box.
virtual std::string toString() const
Returns the Well-known Text representation of this Geometry.
std::unique_ptr< Geometry > buffer(double distance, int quadrantSegments) const
Returns a buffer region around this Geometry having the given width and with a specified number of se...
virtual Geometry * cloneImpl() const =0
Make a deep-copy of this Geometry.
virtual bool isSimple() const
Returns false if the Geometry not simple.
static bool hasNonEmptyElements(const std::vector< T > *geometries)
Returns true if the array contains any non-empty Geometrys.
Definition Geometry.h:940
void * getUserData() const
Gets the user data object for this geometry, if any.
Definition Geometry.h:262
std::unique_ptr< Geometry > difference(const Geometry *other) const
Returns a Geometry representing the points making up this Geometry that do not make up other.
virtual bool disjoint(const Geometry *other) const
virtual bool contains(const Geometry *g) const
Returns true if other.within(this) returns true.
virtual bool isEquivalentClass(const Geometry *other) const
Returns whether the two Geometrys are equal, from the point of view of the equalsExact method.
std::unique_ptr< Geometry > buffer(double distance) const
virtual std::unique_ptr< Point > getCentroid() const
Computes the centroid of this Geometry.
bool coveredBy(const Geometry *g) const
Tests whether this geometry is covered by the specified geometry.
virtual std::unique_ptr< CoordinateSequence > getCoordinates() const =0
Returns this Geometry vertices. Caller takes ownership of the returned object.
std::unique_ptr< Geometry > Union(const Geometry *other) const
Returns a Geometry representing all the points in this Geometry and other.
virtual std::size_t getNumGeometries() const
Returns the number of geometries in this collection, or 1 if this is not a collection.
Definition Geometry.h:334
std::unique_ptr< Geometry > clone() const
Make a deep-copy of this Geometry.
Definition Geometry.h:217
virtual double getArea() const
Returns the area of this Geometry.
virtual bool isRectangle() const
Polygon overrides to check for actual rectangle.
Definition Geometry.h:377
virtual bool overlaps(const Geometry *g) const
Returns true if the DE-9IM intersection matrix for the two Geometrys is T*T***T** (for two points or ...
std::unique_ptr< Geometry > getLinearized(const algorithm::CurveToLineParams &params) const
Definition Geometry.h:349
bool covers(const Geometry *g) const
Returns true if this geometry covers the specified geometry.
virtual Dimension::DimensionType getDimension() const =0
Returns the dimension of this Geometry (0=point, 1=line, 2=surface)
std::unique_ptr< Geometry > buffer(double distance, int quadrantSegments, int endCapStyle) const
Computes a buffer area around this geometry having the given width and with a specified accuracy of a...
virtual const Envelope * getEnvelopeInternal() const =0
Returns the minimum and maximum x and y values in this Geometry, or a null Envelope if this Geometry ...
int getSRID() const
Returns the ID of the Spatial Reference System used by the Geometry.
Definition Geometry.h:277
static bool hasNullElements(const std::vector< T > *geometries)
Returns true if the vector contains any null elements.
Definition Geometry.h:949
virtual void setSRID(int newSRID)
Sets the ID of the Spatial Reference System used by the Geometry.
Definition Geometry.h:286
bool equals(const Geometry *g) const
Returns true if the DE-9IM intersection matrix for the two Geometrys is T*F**FFF*.
Specifies the precision model of the Coordinate in a Geometry.
Definition PrecisionModel.h:87
@ GEOS_MULTILINESTRING
Definition geos_c.h:252
@ GEOS_GEOMETRYCOLLECTION
Definition geos_c.h:256
@ GEOS_POINT
Definition geos_c.h:242
@ GEOS_MULTIPOLYGON
Definition geos_c.h:254
@ GEOS_POLYGON
Definition geos_c.h:248
@ GEOS_MULTIPOINT
Definition geos_c.h:250
@ GEOS_LINESTRING
Definition geos_c.h:244
std::string jtsport()
Return the version of JTS this GEOS release has been ported from.
std::string geosversion()
Return current GEOS version.
GeometryTypeId
Geometry types.
Definition Geometry.h:78
@ GEOS_MULTILINESTRING
a collection of linestrings
Definition Geometry.h:90
@ GEOS_LINEARRING
a linear ring (linestring with 1st point == last point)
Definition Geometry.h:84
@ GEOS_GEOMETRYCOLLECTION
a collection of heterogeneus geometries
Definition Geometry.h:94
@ GEOS_POINT
a point
Definition Geometry.h:80
@ GEOS_LINESTRING
a linestring
Definition Geometry.h:82
@ GEOS_POLYGON
a polygon
Definition Geometry.h:86
@ GEOS_MULTIPOLYGON
a collection of polygons
Definition Geometry.h:92
@ GEOS_MULTIPOINT
a collection of points
Definition Geometry.h:88
std::function< void(double, const char *)> ProgressFunction
Definition Progress.h:29
Basic namespace for all GEOS functionalities.
Definition geos.h:38