32 #ifndef OGR_GEOMETRY_H_INCLUDED
33 #define OGR_GEOMETRY_H_INCLUDED
125 friend class OGRCurveCollection;
129 OGRErr importPreambuleFromWkt(
char ** ppszInput,
130 int* pbHasZ,
int* pbHasM,
132 OGRErr importCurveCollectionFromWkt(
134 int bAllowEmptyComponent,
135 int bAllowLineString,
137 int bAllowCompoundCurve,
140 OGRErr importPreambuleFromWkb(
unsigned char * pabyData,
144 OGRErr importPreambuleOfCollectionFromWkb(
145 unsigned char * pabyData,
166 static const unsigned int OGR_G_NOT_EMPTY_POINT = 0x1;
167 static const unsigned int OGR_G_3D = 0x2;
168 static const unsigned int OGR_G_MEASURED = 0x4;
178 virtual int getDimension()
const = 0;
179 virtual int getCoordinateDimension()
const;
180 int CoordinateDimension()
const;
189 virtual void empty() = 0;
191 virtual
void getEnvelope( OGREnvelope * psEnvelope ) const = 0;
192 virtual
void getEnvelope( OGREnvelope3D * psEnvelope ) const = 0;
195 virtual
int WkbSize() const = 0;
196 virtual
OGRErr importFromWkb(
unsigned char *,
int=-1,
200 virtual
OGRErr importFromWkt(
char ** ppszInput ) = 0;
201 virtual
OGRErr exportToWkt(
char ** ppszDstText,
207 virtual const
char *getGeometryName() const = 0;
208 virtual
void dumpReadable( FILE *, const
char * = NULL
209 ,
char** papszOptions = NULL ) const;
210 virtual
void flattenTo2D() = 0;
211 virtual
char * exportToGML( const
char* const * papszOptions = NULL ) const;
212 virtual
char * exportToKML() const;
213 virtual
char * exportToJson() const;
219 virtual
OGRBoolean hasCurveGeometry(
int bLookForNonLinear = FALSE) const;
221 const
char* const* papszOptions = NULL ) const CPL_WARN_UNUSED_RESULT;
223 double dfMaxAngleStepSizeDegrees = 0,
224 const
char* const* papszOptions = NULL ) const CPL_WARN_UNUSED_RESULT;
231 virtual
void closeRings();
233 virtual
void setCoordinateDimension(
int nDimension );
235 virtual
void setMeasured(
OGRBoolean bIsMeasured );
243 virtual void segmentize(
double dfMaxLength);
259 virtual
double Distance( const
OGRGeometry * ) const ;
261 virtual
OGRGeometry *Buffer(
double dfDist,
int nQuadSegs = 30 )
262 const CPL_WARN_UNUSED_RESULT;
264 const CPL_WARN_UNUSED_RESULT;
266 const CPL_WARN_UNUSED_RESULT;
267 virtual
OGRGeometry *UnionCascaded() const CPL_WARN_UNUSED_RESULT;
269 const CPL_WARN_UNUSED_RESULT;
271 const CPL_WARN_UNUSED_RESULT;
274 const CPL_WARN_UNUSED_RESULT;
275 OGRGeometry *SimplifyPreserveTopology(
double dTolerance)
276 const CPL_WARN_UNUSED_RESULT;
278 double dfTolerance,
int bOnlyEdges ) const CPL_WARN_UNUSED_RESULT;
280 virtual
OGRGeometry *Polygonize() const CPL_WARN_UNUSED_RESULT;
282 virtual
double Distance3D( const
OGRGeometry *poOtherGeom ) const;
287 const CPL_WARN_DEPRECATED("Non standard method. "
288 "Use Intersects() instead");
290 const CPL_WARN_DEPRECATED("Non standard method. "
291 "Use Equals() instead");
293 const CPL_WARN_DEPRECATED("Non standard method. "
294 "Use SymDifference() instead");
296 const CPL_WARN_DEPRECATED("Non standard method. "
297 "Use Boundary() instead");
302 static
int bGenerate_DB2_V72_BYTE_ORDER;
305 virtual
void swapXY();
332 OGRPoint(
double x,
double y,
double z );
333 OGRPoint(
double x,
double y,
double z,
double m );
358 {
return !(flags & OGR_G_NOT_EMPTY_POINT); }
362 double getX()
const {
return x; }
364 double getY()
const {
return y; }
366 double getZ()
const {
return z; }
368 double getM()
const {
return m; }
375 void setX(
double xIn ) { x = xIn; flags |= OGR_G_NOT_EMPTY_POINT; }
379 void setY(
double yIn ) { y = yIn; flags |= OGR_G_NOT_EMPTY_POINT; }
384 { z = zIn; flags |= (OGR_G_NOT_EMPTY_POINT | OGR_G_3D); }
389 { m = mIn; flags |= (OGR_G_NOT_EMPTY_POINT | OGR_G_MEASURED); }
397 virtual const
char *getGeometryName() const CPL_OVERRIDE;
400 virtual
void flattenTo2D() CPL_OVERRIDE;
402 virtual
void swapXY() CPL_OVERRIDE;
418 virtual ~OGRPointIterator();
421 static void destroy( OGRPointIterator* );
440 virtual OGRCurveCasterToLineString GetCasterToLineString()
const = 0;
441 virtual OGRCurveCasterToLinearRing GetCasterToLinearRing()
const = 0;
463 const char*
const* papszOptions = NULL)
471 virtual double get_Area()
const = 0;
507 OGRErr importFromWKTListOnly(
char ** ppszInput,
int bHasZ,
int bHasM,
514 virtual double get_LinearArea()
const;
548 virtual double Project(
const OGRPoint * )
const;
549 virtual OGRLineString* getSubLine(
double,
double,
int )
const;
553 void getPoint(
int,
OGRPoint * )
const;
554 double getX(
int i )
const {
return paoPoints[i].
x; }
555 double getY(
int i )
const {
return paoPoints[i].
y; }
556 double getZ(
int i )
const;
557 double getM(
int i )
const;
566 void setNumPoints(
int nNewPointCount,
567 int bZeroizeNewContent = TRUE );
569 void setPoint(
int,
double,
double );
570 void setZ(
int,
double );
571 void setM(
int,
double );
572 void setPoint(
int,
double,
double,
double );
573 void setPointM(
int,
double,
double,
double );
574 void setPoint(
int,
double,
double,
double,
double );
575 void setPoints(
int,
OGRRawPoint *,
double * = NULL );
576 void setPointsM(
int, OGRRawPoint *,
double * );
577 void setPoints(
int, OGRRawPoint *,
double *,
double * );
578 void setPoints(
int,
double * padfX,
double * padfY,
579 double *padfZIn = NULL );
580 void setPointsM(
int,
double * padfX,
double * padfY,
581 double *padfMIn = NULL );
582 void setPoints(
int,
double * padfX,
double * padfY,
583 double *padfZIn,
double *padfMIn );
584 void addPoint( const OGRPoint * );
585 void addPoint(
double,
double );
586 void addPoint(
double,
double,
double );
587 void addPointM(
double,
double,
double );
588 void addPoint(
double,
double,
double,
double );
590 void getPoints( OGRRawPoint *,
double * = NULL ) const;
591 void getPoints(
void* pabyX,
int nXStride,
592 void* pabyY,
int nYStride,
593 void* pabyZ = NULL,
int nZStride = 0 ) const;
594 void getPoints(
void* pabyX,
int nXStride,
595 void* pabyY,
int nYStride,
596 void* pabyZ,
int nZStride,
597 void* pabyM,
int nMStride ) const;
600 int nStartVertex = 0,
int nEndVertex = -1 );
601 void reversePoints(
void );
607 virtual
void segmentize(
double dfMaxLength) CPL_OVERRIDE;
609 virtual
void swapXY() CPL_OVERRIDE;
627 static OGRLineString* TransferMembersAndDestroy(
628 OGRLineString* poSrc,
629 OGRLineString* poDst);
631 virtual OGRCurveCasterToLineString GetCasterToLineString()
633 virtual OGRCurveCasterToLinearRing GetCasterToLinearRing()
643 OGRLineString(
const OGRLineString& other );
644 virtual ~OGRLineString();
646 OGRLineString&
operator=(
const OGRLineString& other);
648 virtual OGRLineString*
CurveToLine(
double dfMaxAngleStepSizeDegrees = 0,
649 const char*
const* papszOptions = NULL )
652 const char*
const* papszOptions = NULL )
const CPL_OVERRIDE;
692 virtual int _WkbSize(
int _flags )
const;
694 unsigned char *,
int=-1 );
696 unsigned char * )
const;
698 virtual OGRCurveCasterToLineString GetCasterToLineString()
700 virtual OGRCurveCasterToLinearRing GetCasterToLinearRing()
717 virtual int isClockwise()
const;
718 virtual void reverseWindingOrder();
721 int bTestEnvelope = TRUE )
const;
723 int bTestEnvelope = TRUE )
const;
756 void ExtendEnvelopeWithCircular( OGREnvelope * psEnvelope )
const;
758 int IsFullCircle(
double& cx,
double& cy,
double& square_R )
const;
762 virtual OGRCurveCasterToLineString GetCasterToLineString()
764 virtual OGRCurveCasterToLinearRing GetCasterToLinearRing()
796 const char*
const* papszOptions = NULL )
808 double dfMaxAngleStepSizeDegrees = 0,
809 const char*
const* papszOptions = NULL)
const CPL_OVERRIDE;
826 class CPL_DLL OGRCurveCollection
839 OGRCurveCollection();
840 OGRCurveCollection(
const OGRCurveCollection& other);
841 ~OGRCurveCollection();
843 OGRCurveCollection&
operator=(
const OGRCurveCollection& other);
847 void getEnvelope( OGREnvelope * psEnvelope )
const;
848 void getEnvelope( OGREnvelope3D * psEnvelope )
const;
854 unsigned char * pabyData,
862 unsigned char * pabyData,
865 int bAcceptCompoundCurve,
870 char ** ppszDstText )
const;
879 int getNumCurves()
const;
881 const OGRCurve *getCurve(
int )
const;
909 OGRCurveCollection oCC;
912 double dfToleranceEps,
918 OGRLineString* CurveToLineInternal(
double dfMaxAngleStepSizeDegrees,
919 const char*
const* papszOptions,
920 int bIsLinearRing )
const;
927 virtual OGRCurveCasterToLineString GetCasterToLineString()
929 virtual OGRCurveCasterToLinearRing GetCasterToLinearRing()
965 const char*
const* papszOptions = NULL )
976 int getNumCurves()
const;
978 const OGRCurve *getCurve(
int )
const;
986 OGRErr addCurveDirectly(
OGRCurve*,
double dfToleranceEps = 1e-14 );
999 double dfMaxAngleStepSizeDegrees = 0,
1000 const char*
const* papszOptions = NULL)
const CPL_OVERRIDE;
1018 virtual OGRSurfaceCasterToPolygon GetCasterToPolygon()
const = 0;
1019 virtual OGRSurfaceCasterToCurvePolygon GetCasterToCurvePolygon()
const = 0;
1023 virtual double get_Area()
const = 0;
1052 virtual int checkRing(
OGRCurve * poNewRing )
const;
1064 OGRCurveCollection oCC;
1066 virtual OGRSurfaceCasterToPolygon GetCasterToPolygon()
1068 virtual OGRSurfaceCasterToCurvePolygon GetCasterToCurvePolygon()
1093 double dfMaxAngleStepSizeDegrees = 0,
1094 const char*
const* papszOptions = NULL )
const CPL_OVERRIDE;
1119 double dfMaxAngleStepSizeDegrees = 0,
1120 const char*
const* papszOptions = NULL )
const;
1168 virtual OGRErr importFromWKTListOnly(
char ** ppszInput,
1169 int bHasZ,
int bHasM,
1176 virtual OGRSurfaceCasterToPolygon GetCasterToPolygon()
1178 virtual OGRSurfaceCasterToCurvePolygon GetCasterToCurvePolygon()
1195 const char*
const* papszOptions = NULL )
const CPL_OVERRIDE;
1197 double dfMaxAngleStepSizeDegrees = 0,
1198 const char*
const* papszOptions = NULL)
const CPL_OVERRIDE;
1218 double dfMaxAngleStepSizeDegrees = 0,
1219 const char*
const* papszOptions = NULL )
const CPL_OVERRIDE;
1247 bool quickValidityCheck()
const;
1251 virtual OGRSurfaceCasterToPolygon GetCasterToPolygon()
const CPL_OVERRIDE;
1252 virtual OGRErr importFromWKTListOnly(
char ** ppszInput,
1253 int bHasZ,
int bHasM,
1294 OGRErr importFromWkbInternal(
unsigned char * pabyData,
int nSize,
1297 OGRErr importFromWktInternal(
char **ppszInput,
int nRecLevel );
1304 OGRErr exportToWktInternal(
char ** ppszDstText,
1306 const char* pszSkipPrefix )
const;
1332 const char*
const* papszOptions = NULL )
const CPL_OVERRIDE;
1334 double dfMaxAngleStepSizeDegrees = 0,
1335 const char*
const* papszOptions = NULL )
const CPL_OVERRIDE;
1349 virtual double get_Length()
const;
1350 virtual double get_Area()
const;
1358 int getNumGeometries()
const;
1371 virtual OGRErr removeGeometry(
int iIndex,
int bDelete = TRUE );
1442 OGRErr _addGeometryWithExpectedSubGeometryType(
1445 OGRErr _addGeometryDirectlyWithExpectedSubGeometryType(
1490 virtual OGRSurfaceCasterToPolygon GetCasterToPolygon()
1492 virtual OGRSurfaceCasterToCurvePolygon GetCasterToCurvePolygon()
1495 virtual const char* getSubGeometryName()
const;
1498 const char* pszSkipPrefix )
const;
1500 virtual OGRPolyhedralSurfaceCastToMultiPolygon GetCasterToMultiPolygon()
1573 virtual const char* getSubGeometryName()
const CPL_OVERRIDE;
1576 virtual OGRPolyhedralSurfaceCastToMultiPolygon GetCasterToMultiPolygon()
1609 OGRErr importFromWkt_Bracketed(
char **,
int bHasM,
int bHasZ );
1725 static OGRErr createFromFgfInternal(
unsigned char *pabyData,
1729 int *pnBytesConsumed,
1739 static OGRGeometry *createFromGML(
const char * );
1748 bool bOnlyInOrder =
true );
1755 const char*
const* papszOptions = NULL );
1759 int *pbResultValidGeometry,
1760 const char **papszOptions = NULL);
1761 static bool haveGEOS();
1765 char** papszOptions );
1768 approximateArcAngles(
double dfX,
double dfY,
double dfZ,
1769 double dfPrimaryRadius,
double dfSecondaryAxis,
1771 double dfStartAngle,
double dfEndAngle,
1772 double dfMaxAngleStepSizeDegrees );
1774 static int GetCurveParmeters(
double x0,
double y0,
1775 double x1,
double y1,
1776 double x2,
double y2,
1777 double& R,
double& cx,
double& cy,
1778 double& alpha0,
double& alpha1,
1781 double x0,
double y0,
double z0,
1782 double x1,
double y1,
double z1,
1783 double x2,
double y2,
double z2,
1785 double dfMaxAngleStepSizeDegrees,
1786 const char*
const * papszOptions = NULL );
1787 static OGRCurve* curveFromLineString(
1789 const char*
const * papszOptions = NULL);
virtual OGRErr importFromWkt(char **) CPL_OVERRIDE
Assign geometry from well known text data.
Definition: ogrcurvepolygon.cpp:507
virtual void Value(double, OGRPoint *) const CPL_OVERRIDE
Fetch point at given distance along curve.
Definition: ogrlinestring.cpp:1936
virtual void Value(double, OGRPoint *) const =0
Fetch point at given distance along curve.
virtual OGRErr exportToWkb(OGRwkbByteOrder, unsigned char *, OGRwkbVariant=wkbVariantOldOgc) const CPL_OVERRIDE
Convert a geometry into well known binary format.
Definition: ogrpolygon.cpp:364
virtual void closeRings()
Force rings to be closed.
Definition: ogrgeometry.cpp:4970
virtual int WkbSize() const CPL_OVERRIDE
Returns size of related binary representation.
Definition: ogrcurvepolygon.cpp:418
virtual OGRwkbGeometryType getGeometryType() const CPL_OVERRIDE
Fetch geometry type.
Definition: ogrmulticurve.cpp:100
virtual OGRwkbGeometryType getGeometryType() const =0
Fetch geometry type.
virtual OGRErr importFromWkb(unsigned char *, int=-1, OGRwkbVariant=wkbVariantOldOgc) CPL_OVERRIDE
Assign geometry from well known binary data.
Definition: ogrpolygon.cpp:319
virtual void setCoordinateDimension(int nDimension)
Set the coordinate dimension.
Definition: ogrgeometry.cpp:1022
OGRBoolean Is3D() const
Definition: ogr_geometry.h:185
virtual void set3D(OGRBoolean bIs3D)
Add or remove the Z coordinate dimension.
Definition: ogrgeometry.cpp:1045
virtual OGRwkbGeometryType getGeometryType() const CPL_OVERRIDE
Fetch geometry type.
Definition: ogrmultisurface.cpp:101
virtual OGRBoolean hasCurveGeometry(int bLookForNonLinear=FALSE) const CPL_OVERRIDE
Returns if this geometry is or has curve geometry.
Definition: ogrmulticurve.cpp:193
virtual OGRErr exportToWkt(char **ppszDstText, OGRwkbVariant=wkbVariantOldOgc) const CPL_OVERRIDE
Convert a geometry into well known text format.
Definition: ogrgeometrycollection.cpp:801
virtual void setMeasured(OGRBoolean bIsMeasured)
Add or remove the M coordinate dimension.
Definition: ogrgeometry.cpp:1068
double y
y
Definition: ogr_geometry.h:59
Concrete representation of a multi-vertex line.
Definition: ogr_geometry.h:623
virtual OGRErr importFromWkt(char **ppszInput)=0
Assign geometry from well known text data.
virtual OGRBoolean hasCurveGeometry(int bLookForNonLinear=FALSE) const
Returns if this geometry is or has curve geometry.
Definition: ogrgeometry.cpp:3048
#define CPL_OVERRIDE
To be used in public headers only.
Definition: cpl_port.h:1055
double getY() const
Return y.
Definition: ogr_geometry.h:364
virtual OGRErr exportToWkb(OGRwkbByteOrder, unsigned char *, OGRwkbVariant=wkbVariantOldOgc) const CPL_OVERRIDE
Convert a geometry into well known binary format.
Definition: ogrcurvepolygon.cpp:473
virtual void swapXY()
Swap x and y coordinates.
Definition: ogrgeometry.cpp:5706
virtual void StartPoint(OGRPoint *) const CPL_OVERRIDE
Return the curve start point.
Definition: ogrcompoundcurve.cpp:288
virtual double get_Length() const CPL_OVERRIDE
Returns the length of the curve.
Definition: ogrlinestring.cpp:1894
Create geometry objects from well known text/binary.
Definition: ogr_geometry.h:1723
double x
x
Definition: ogr_geometry.h:57
virtual OGRErr exportToWkt(char **ppszDstText, OGRwkbVariant eWkbVariant=wkbVariantOldOgc) const CPL_OVERRIDE
Convert a geometry into well known text format.
Definition: ogrcurvepolygon.cpp:523
virtual const char * getGeometryName() const =0
Fetch WKT name for geometry type.
virtual double get_Length() const CPL_OVERRIDE
Returns the length of the curve.
Definition: ogrcompoundcurve.cpp:276
virtual OGRBoolean isCompatibleSubType(OGRwkbGeometryType) const CPL_OVERRIDE
Returns whether a geometry of the specified geometry type can be a member of this collection...
Definition: ogrmultisurface.cpp:139
OGRPolyhedralSurface()
Create an empty PolyhedralSurface.
Definition: ogrpolyhedralsurface.cpp:47
virtual OGRErr exportToWkb(OGRwkbByteOrder, unsigned char *, OGRwkbVariant=wkbVariantOldOgc) const =0
Convert a geometry into well known binary format.
OGRMultiCurve & operator=(const OGRMultiCurve &other)
Assignment operator.
Definition: ogrmulticurve.cpp:87
virtual const char * getGeometryName() const CPL_OVERRIDE
Fetch WKT name for geometry type.
Definition: ogrgeometrycollection.cpp:231
virtual OGRGeometry * clone() const CPL_WARN_UNUSED_RESULT=0
Make a copy of this object.
OGRCurve * stealExteriorRingCurve()
"Steal" reference to external ring.
Definition: ogrcurvepolygon.cpp:311
int OGRBoolean
Type for a OGR boolean.
Definition: ogr_core.h:301
virtual void Value(double, OGRPoint *) const CPL_OVERRIDE
Fetch point at given distance along curve.
Definition: ogrcompoundcurve.cpp:308
OGRCurve * getExteriorRingCurve()
Fetch reference to external polygon ring.
Definition: ogrcurvepolygon.cpp:205
virtual OGRErr addRingDirectly(OGRCurve *poNewRing) CPL_OVERRIDE
Add a ring to a polygon.
Definition: ogrtriangle.cpp:249
virtual OGRBoolean IsEmpty() const CPL_OVERRIDE
Returns TRUE (non-zero) if the object has no points.
Definition: ogr_geometry.h:357
static OGRPolygon * CastToPolygon(OGRCurvePolygon *poCP)
Convert to polygon.
Definition: ogrcurvepolygon.cpp:813
Coordinate systems services.
double getM() const
Return m.
Definition: ogr_geometry.h:368
virtual OGRwkbGeometryType getGeometryType() const CPL_OVERRIDE
Fetch geometry type.
Definition: ogrgeometrycollection.cpp:177
virtual const char * getGeometryName() const CPL_OVERRIDE
Fetch WKT name for geometry type.
Definition: ogrlinestring.cpp:2683
virtual const char * getGeometryName() const CPL_OVERRIDE
Fetch WKT name for geometry type.
Definition: ogrpolygon.cpp:123
OGRRawPoint()
Constructor.
Definition: ogr_geometry.h:51
virtual void EndPoint(OGRPoint *) const =0
Return the curve end point.
virtual OGRBoolean hasCurveGeometry(int bLookForNonLinear=FALSE) const CPL_OVERRIDE
Returns if this geometry is or has curve geometry.
Definition: ogrgeometrycollection.cpp:1299
A collection of non-overlapping OGRPolygon.
Definition: ogr_geometry.h:1432
int OGRHasPreparedGeometrySupport()
Returns if GEOS has prepared geometry support.
Definition: ogrgeometry.cpp:5736
virtual const char * getGeometryName() const CPL_OVERRIDE
Fetch WKT name for geometry type.
Definition: ogrcurvepolygon.cpp:179
virtual OGRBoolean Equals(OGRGeometry *) const =0
Returns TRUE if two geometries are equivalent.
virtual OGRErr importFromWkb(unsigned char *, int=-1, OGRwkbVariant=wkbVariantOldOgc)=0
Assign geometry from well known binary data.
OGRwkbByteOrder
Enumeration to describe byte order.
Definition: ogr_core.h:479
Concrete representation of a circular string, that is to say a curve made of one or several arc circl...
Definition: ogr_geometry.h:753
virtual void flattenTo2D()=0
Convert geometry to strictly 2D.
Abstract curve base class for OGRLineString, OGRCircularString and OGRCompoundCurve.
Definition: ogr_geometry.h:433
A collection of 1 or more geometry objects.
Definition: ogr_geometry.h:1292
int getNumInteriorRings() const
Fetch the number of internal rings.
Definition: ogrcurvepolygon.cpp:242
Concrete representation of a closed ring.
Definition: ogr_geometry.h:684
void setM(double mIn)
Set m.
Definition: ogr_geometry.h:388
virtual OGRErr exportToWkt(char **ppszDstText, OGRwkbVariant=wkbVariantOldOgc) const CPL_OVERRIDE
Convert a geometry into well known text format.
Definition: ogrpolygon.cpp:614
OGRGeometry & operator=(const OGRGeometry &other)
Assignment operator.
Definition: ogrgeometry.cpp:141
virtual int getNumPoints() const CPL_OVERRIDE
Fetch vertex count.
Definition: ogr_geometry.h:552
virtual OGRErr PointOnSurface(OGRPoint *poPoint) const
This method relates to the SFCOM IMultiSurface::get_PointOnSurface() method.
Definition: ogrmultisurface.cpp:299
virtual OGRBoolean isCompatibleSubType(OGRwkbGeometryType) const CPL_OVERRIDE
Returns whether a geometry of the specified geometry type can be a member of this collection...
Definition: ogrmulticurve.cpp:137
virtual OGRErr importFromWkt(char **) CPL_OVERRIDE
Assign geometry from well known text data.
Definition: ogrlinestring.cpp:1674
virtual int get_IsClosed() const
Return TRUE if curve is closed.
Definition: ogrcurve.cpp:95
virtual OGRGeometry * getCurveGeometry(const char *const *papszOptions=NULL) const CPL_WARN_UNUSED_RESULT
Return curve version of this geometry.
Definition: ogrgeometry.cpp:3116
virtual OGRBoolean isCompatibleSubType(OGRwkbGeometryType) const
Returns whether a geometry of the specified geometry type can be a member of this collection...
Definition: ogrgeometrycollection.cpp:1288
virtual const char * getGeometryName() const CPL_OVERRIDE
Fetch WKT name for geometry type.
Definition: ogrmulticurve.cpp:127
A collection of non-overlapping OGRSurface.
Definition: ogr_geometry.h:1391
virtual double get_Length() const =0
Returns the length of the curve.
virtual int WkbSize() const CPL_OVERRIDE
Returns size of related binary representation.
Definition: ogrlinestring.cpp:195
virtual void StartPoint(OGRPoint *) const =0
Return the curve start point.
OGRwkbGeometryType OGRFromOGCGeomType(const char *pszGeomType)
Map OGCgeometry format type to corresponding OGR constants.
Definition: ogrgeometry.cpp:2257
OGRSimpleCurve & operator=(const OGRSimpleCurve &other)
Assignment operator.
Definition: ogrlinestring.cpp:99
virtual void segmentize(double dfMaxLength) CPL_OVERRIDE
Modify the geometry such it has no segment longer then the given distance.
Definition: ogrcurvepolygon.cpp:712
virtual OGRBoolean hasCurveGeometry(int bLookForNonLinear=FALSE) const CPL_OVERRIDE
Returns if this geometry is or has curve geometry.
Definition: ogrmultisurface.cpp:278
virtual double get_Area() const =0
Get the area of the (closed) curve.
OGRErr addGeometryDirectly(OGRGeometry *poNewGeom)
Add a geometry directly to the container.
Definition: ogrpolyhedralsurface.cpp:872
Utility class to store a collection of curves.
Definition: ogr_geometry.h:906
Simple container for a position.
Definition: ogr_geometry.h:47
OGRwkbGeometryType
List of well known binary geometry types.
Definition: ogr_core.h:312
virtual void swapXY() CPL_OVERRIDE
Swap x and y coordinates.
Definition: ogrcurvepolygon.cpp:726
virtual OGRwkbGeometryType getGeometryType() const CPL_OVERRIDE
Fetch geometry type.
Definition: ogrcurvepolygon.cpp:142
virtual OGRErr addGeometry(const OGRGeometry *) CPL_OVERRIDE
Add a new geometry to a collection.
Definition: ogrtriangulatedsurface.cpp:184
virtual OGRErr importFromWkb(unsigned char *, int=-1, OGRwkbVariant=wkbVariantOldOgc) CPL_OVERRIDE
Assign geometry from well known binary data.
Definition: ogrcurvepolygon.cpp:448
virtual ~OGRPolyhedralSurface()
Destructor.
Definition: ogrpolyhedralsurface.cpp:74
OGRMultiSurface & operator=(const OGRMultiSurface &other)
Assignment operator.
Definition: ogrmultisurface.cpp:88
virtual int ContainsPoint(const OGRPoint *p) const
Returns if a point is contained in a (closed) curve.
Definition: ogrcurve.cpp:429
Interface for a point iterator.
Definition: ogr_geometry.h:415
TriangulatedSurface class.
Definition: ogr_geometry.h:1567
A collection of OGRCurve.
Definition: ogr_geometry.h:1647
virtual OGRErr PointOnSurface(OGRPoint *poPoint) const =0
This method relates to the SFCOM ISurface::get_PointOnSurface() method.
Abstract base class for 2 dimensional objects like polygons or curve polygons.
Definition: ogr_geometry.h:1014
A collection of OGRLineString.
Definition: ogr_geometry.h:1689
virtual double get_AreaOfCurveSegments() const CPL_OVERRIDE
Return area of curve segments.
Definition: ogrcompoundcurve.cpp:870
Abstract base class for all geometry classes.
Definition: ogr_geometry.h:118
virtual void empty()=0
Clear geometry information.
virtual void segmentize(double dfMaxLength)
Modify the geometry such it has no segment longer then the given distance.
Definition: ogrgeometry.cpp:804
double getZ() const
Return z.
Definition: ogr_geometry.h:366
void setX(double xIn)
Set x.
Definition: ogr_geometry.h:375
OGRBoolean IsMeasured() const
Definition: ogr_geometry.h:187
void sfcgal_geometry_t
SFCGAL geometry type.
Definition: ogr_geometry.h:67
virtual OGRBoolean IsValid() const
Test if the geometry is valid.
Definition: ogrgeometry.cpp:2028
static OGRLinearRing * CastToLinearRing(OGRCurve *poCurve)
Cast to linear ring.
Definition: ogrcurve.cpp:408
virtual double get_Area() const =0
Get the area of the surface object.
OGRTriangle & operator=(const OGRTriangle &other)
Assignment operator.
Definition: ogrtriangle.cpp:143
virtual OGRBoolean Intersects(const OGRGeometry *) const
Do these features intersect?
Definition: ogrgeometry.cpp:515
OGRPolyhedralSurface & operator=(const OGRPolyhedralSurface &other)
Assignment operator.
Definition: ogrpolyhedralsurface.cpp:87
void OGRDestroyPreparedGeometry(OGRPreparedGeometry *poPreparedGeom)
Destroys a prepared geometry.
Definition: ogrgeometry.cpp:5792
struct GEOSGeom_t * GEOSGeom
GEOS geometry type.
Definition: ogr_geometry.h:63
virtual OGRErr transform(OGRCoordinateTransformation *poCT) CPL_OVERRIDE
Apply arbitrary coordinate transformation to geometry.
Definition: ogrlinestring.cpp:2340
OGRLineString & operator=(const OGRLineString &other)
Assignment operator.
Definition: ogrlinestring.cpp:2653
virtual OGRwkbGeometryType getGeometryType() const CPL_OVERRIDE
Fetch geometry type.
Definition: ogrpolygon.cpp:106
virtual OGRGeometry * getLinearGeometry(double dfMaxAngleStepSizeDegrees=0, const char *const *papszOptions=NULL) const CPL_OVERRIDE
Return, possibly approximate, non-curve version of this geometry.
Definition: ogrcurvepolygon.cpp:587
void setZ(double zIn)
Set z.
Definition: ogr_geometry.h:383
OGRErr removeGeometry(int iIndex, int bDelete=TRUE)
Remove a geometry from the container.
Definition: ogrpolyhedralsurface.cpp:1073
virtual OGRErr exportToWkt(char **, OGRwkbVariant=wkbVariantOldOgc) const CPL_OVERRIDE
Convert a geometry into well known text format.
Definition: ogrmulticurve.cpp:182
virtual OGRGeometry * clone() const CPL_OVERRIDE
Make a copy of this object.
Definition: ogrlinestring.cpp:126
virtual double get_Area() const CPL_OVERRIDE
Get the area of the (closed) curve.
Definition: ogrcompoundcurve.cpp:830
Core portability services for cross-platform OGR code.
virtual int getDimension() const =0
Get the dimension of this object.
int OGRPreparedGeometryIntersects(const OGRPreparedGeometry *poPreparedGeom, const OGRGeometry *poOtherGeom)
Returns whether a prepared geometry intersects with a geometry.
Definition: ogrgeometry.cpp:5814
Concrete class representing curve polygons.
Definition: ogr_geometry.h:1048
virtual OGRErr transform(OGRCoordinateTransformation *poCT) CPL_OVERRIDE
Apply arbitrary coordinate transformation to geometry.
Definition: ogrcurvepolygon.cpp:653
PolyhedralSurface class.
Definition: ogr_geometry.h:1484
virtual OGRErr exportToWkb(OGRwkbByteOrder, unsigned char *, OGRwkbVariant=wkbVariantOldOgc) const CPL_OVERRIDE
Convert a geometry into well known binary format.
Definition: ogrlinestring.cpp:1580
virtual OGRPolygon * CurvePolyToPoly(double dfMaxAngleStepSizeDegrees=0, const char *const *papszOptions=NULL) const CPL_OVERRIDE
Return a polygon from a curve polygon.
Definition: ogrpolygon.cpp:802
virtual OGRErr importFromWkt(char **) CPL_OVERRIDE
Assign geometry from well known text data.
Definition: ogrgeometrycollection.cpp:788
void setY(double yIn)
Set y.
Definition: ogr_geometry.h:379
virtual OGRBoolean IsEmpty() const CPL_OVERRIDE
Returns TRUE (non-zero) if the object has no points.
Definition: ogrcurvepolygon.cpp:703
This class represents an OpenGIS Spatial Reference System, and contains methods for converting betwee...
Definition: ogr_spatialref.h:132
virtual double get_AreaOfCurveSegments() const =0
Get the area of the purely curve portions of a (closed) curve.
struct _OGRPreparedGeometry OGRPreparedGeometry
Prepared geometry API (needs GEOS >= 3.1.0)
Definition: ogr_geometry.h:1796
virtual int getDimension() const CPL_OVERRIDE
Get the dimension of this object.
Definition: ogrgeometrycollection.cpp:194
Old-style 99-402 extended dimension (Z) WKB types.
Definition: ogr_core.h:420
OGRCurvePolygon()
Create an empty curve polygon.
Definition: ogrcurvepolygon.cpp:52
virtual OGRLineString * CurveToLine(double dfMaxAngleStepSizeDegrees=0, const char *const *papszOptions=NULL) const =0
Return a linestring from a curve geometry.
OGRPreparedGeometry * OGRCreatePreparedGeometry(const OGRGeometry *poGeom)
Creates a prepared geometry.
Definition: ogrgeometry.cpp:5756
virtual OGRErr addGeometry(const OGRGeometry *)
Add a new geometry to a collection.
Definition: ogrpolyhedralsurface.cpp:836
virtual OGRBoolean hasCurveGeometry(int bLookForNonLinear=FALSE) const CPL_OVERRIDE
Returns if this geometry is or has curve geometry.
Definition: ogrcurvepolygon.cpp:572
virtual void getEnvelope(OGREnvelope *psEnvelope) const CPL_OVERRIDE
Computes and returns the bounding envelope for this geometry in the passed psEnvelope structure...
Definition: ogrlinestring.cpp:2237
virtual OGRErr addRingDirectly(OGRCurve *)
Add a ring to a polygon.
Definition: ogrcurvepolygon.cpp:397
Point class.
Definition: ogr_geometry.h:322
virtual OGRErr PointOnSurface(OGRPoint *poPoint) const CPL_OVERRIDE
This method relates to the SFCOM ISurface::get_PointOnSurface() method.
Definition: ogrcurvepolygon.cpp:597
OGRwkbVariant
Output variants of WKB we support.
Definition: ogr_core.h:418
virtual int WkbSize() const =0
Returns size of related binary representation.
virtual void getEnvelope(OGREnvelope *psEnvelope) const =0
Computes and returns the bounding envelope for this geometry in the passed psEnvelope structure...
OGRGeometryCollection & operator=(const OGRGeometryCollection &other)
Assignment operator.
Definition: ogrgeometrycollection.cpp:110
virtual void setCoordinateDimension(int nDimension) CPL_OVERRIDE
Set the coordinate dimension.
Definition: ogrcurvepolygon.cpp:683
virtual OGRErr importFromWkb(unsigned char *, int=-1, OGRwkbVariant=wkbVariantOldOgc) CPL_OVERRIDE
Assign geometry from well known binary data.
Definition: ogrlinestring.cpp:1470
virtual OGRGeometry * getLinearGeometry(double dfMaxAngleStepSizeDegrees=0, const char *const *papszOptions=NULL) const CPL_WARN_UNUSED_RESULT
Return, possibly approximate, non-curve version of this geometry.
Definition: ogrgeometry.cpp:3081
double getX() const
Return x.
Definition: ogr_geometry.h:362
Concrete class representing polygons.
Definition: ogr_geometry.h:1159
Abstract curve base class for OGRLineString and OGRCircularString.
Definition: ogr_geometry.h:491
virtual OGRErr exportToWkt(char **ppszDstText, OGRwkbVariant=wkbVariantOldOgc) const =0
Convert a geometry into well known text format.
struct GEOSContextHandle_HS * GEOSContextHandle_t
GEOS context handle type.
Definition: ogr_geometry.h:65
virtual int getNumPoints() const =0
Return the number of points of a curve geometry.
virtual const char * getGeometryName() const CPL_OVERRIDE
Fetch WKT name for geometry type.
Definition: ogrpolyhedralsurface.cpp:102
virtual void segmentize(double dfMaxLength) CPL_OVERRIDE
Modify the geometry such it has no segment longer then the given distance.
Definition: ogrlinestring.cpp:2461
virtual OGRBoolean Contains(const OGRGeometry *) const
Test for containment.
Definition: ogrgeometry.cpp:4812
virtual OGRBoolean Equals(OGRGeometry *) const CPL_OVERRIDE
Returns TRUE if two geometries are equivalent.
Definition: ogrcurvepolygon.cpp:627
OGRRawPoint(double xIn, double yIn)
Constructor.
Definition: ogr_geometry.h:54
virtual void flattenTo2D() CPL_OVERRIDE
Convert geometry to strictly 2D.
Definition: ogrcurvepolygon.cpp:169
double getX(int i) const
Get X at vertex.
Definition: ogr_geometry.h:554
virtual int getNumPoints() const CPL_OVERRIDE
Return the number of points of a curve geometry.
Definition: ogrcompoundcurve.cpp:668
static OGRMultiPolygon * CastToMultiPolygon(OGRPolyhedralSurface *poPS)
Casts the OGRPolyhedralSurface to an OGRMultiPolygon.
Definition: ogrpolyhedralsurface.cpp:815
virtual OGRwkbGeometryType getGeometryType() const CPL_OVERRIDE
Returns the WKB Type of PolyhedralSurface.
Definition: ogrpolyhedralsurface.cpp:116
static OGRCompoundCurve * CastToCompoundCurve(OGRCurve *puCurve)
Cast to compound curve.
Definition: ogrcurve.cpp:355
int getNumGeometries() const
Fetch number of geometries in PolyhedralSurface.
Definition: ogrpolyhedralsurface.cpp:914
int OGRPreparedGeometryContains(const OGRPreparedGeometry *poPreparedGeom, const OGRGeometry *poOtherGeom)
Returns whether a prepared geometry contains a geometry.
Definition: ogrgeometry.cpp:5844
virtual OGRPolygon * CurvePolyToPoly(double dfMaxAngleStepSizeDegrees=0, const char *const *papszOptions=NULL) const
Return a polygon from a curve polygon.
Definition: ogrcurvepolygon.cpp:553
virtual OGRErr addRing(OGRCurve *)
Add a ring to a polygon.
Definition: ogrcurvepolygon.cpp:338
virtual OGRPointIterator * getPointIterator() const =0
Returns a point iterator over the curve.
OGRCurvePolygon & operator=(const OGRCurvePolygon &other)
Assignment operator.
Definition: ogrcurvepolygon.cpp:91
Triangle class.
Definition: ogr_geometry.h:1244
OGRPolygon & operator=(const OGRPolygon &other)
Assignment operator.
Definition: ogrpolygon.cpp:93
static OGRLineString * CastToLineString(OGRCurve *poCurve)
Cast to linestring.
Definition: ogrcurve.cpp:386
virtual OGRErr transform(OGRCoordinateTransformation *poCT)=0
Apply arbitrary coordinate transformation to geometry.
virtual OGRPointIterator * getPointIterator() const CPL_OVERRIDE
Returns a point iterator over the curve.
Definition: ogrcompoundcurve.cpp:726
virtual OGRErr exportToWkt(char **ppszDstText, OGRwkbVariant=wkbVariantOldOgc) const CPL_OVERRIDE
Convert a geometry into well known text format.
Definition: ogrlinestring.cpp:1796
int OGRErr
Simple container for a bounding region.
Definition: ogr_core.h:285
virtual int WkbSize() const CPL_OVERRIDE
Returns size of related binary representation.
Definition: ogrpolygon.cpp:299
virtual void set3D(OGRBoolean bIs3D) CPL_OVERRIDE
Add or remove the Z coordinate dimension.
Definition: ogrcurvepolygon.cpp:689
virtual void getEnvelope(OGREnvelope *psEnvelope) const CPL_OVERRIDE
Computes and returns the bounding envelope for this geometry in the passed psEnvelope structure...
Definition: ogrcurvepolygon.cpp:607
virtual void setMeasured(OGRBoolean bIsMeasured) CPL_OVERRIDE
Add or remove the M coordinate dimension.
Definition: ogrcurvepolygon.cpp:694
virtual OGRErr exportToWkt(char **, OGRwkbVariant=wkbVariantOldOgc) const CPL_OVERRIDE
Convert a geometry into well known text format.
Definition: ogrmultisurface.cpp:267
const char * OGRToOGCGeomType(OGRwkbGeometryType eGeomType)
Map OGR geometry format constants to corresponding OGC geometry type.
Definition: ogrgeometry.cpp:2330
A collection of OGRPoint.
Definition: ogr_geometry.h:1606
virtual OGRBoolean hasCurveGeometry(int bLookForNonLinear=FALSE) const CPL_OVERRIDE
Returns if this geometry is or has curve geometry.
Definition: ogrpolygon.cpp:813
virtual const char * getGeometryName() const CPL_OVERRIDE
Fetch WKT name for geometry type.
Definition: ogrmultisurface.cpp:128
virtual void EndPoint(OGRPoint *) const CPL_OVERRIDE
Return the curve end point.
Definition: ogrcompoundcurve.cpp:298
virtual OGRBoolean IsConvex() const
Returns if a (closed) curve forms a convex shape.
Definition: ogrcurve.cpp:309
OGRCurve * getInteriorRingCurve(int)
Fetch reference to indicated internal ring.
Definition: ogrcurvepolygon.cpp:270
virtual OGRBoolean IsEmpty() const =0
Returns TRUE (non-zero) if the object has no points.
virtual OGRLineString * CurveToLine(double dfMaxAngleStepSizeDegrees=0, const char *const *papszOptions=NULL) const CPL_OVERRIDE
Return a linestring from a curve geometry.
Definition: ogrcompoundcurve.cpp:367
#define CPL_WARN_UNUSED_RESULT
Qualifier to warn when the return value of a function is not used.
Definition: cpl_port.h:999
virtual void empty() CPL_OVERRIDE
Clear geometry information.
Definition: ogrcurvepolygon.cpp:132
OGRGeometry * getGeometryRef(int i)
Fetch geometry from container.
Definition: ogrpolyhedralsurface.cpp:936
double getY(int i) const
Get Y at vertex.
Definition: ogr_geometry.h:555