32 #ifndef _OGR_GEOMETRY_H_INCLUDED
33 #define _OGR_GEOMETRY_H_INCLUDED
60 typedef struct GEOSGeom_t *GEOSGeom;
61 typedef struct GEOSContextHandle_HS *GEOSContextHandle_t;
114 OGRErr importPreambuleFromWkt(
char ** ppszInput,
115 int* pbHasZ,
int* pbHasM );
116 OGRErr importCurveCollectionFromWkt(
char ** ppszInput,
117 int bAllowEmptyComponent,
118 int bAllowLineString,
120 int bAllowCompoundCurve,
122 OGRErr importPreambuleFromWkb(
unsigned char * pabyData,
124 OGRwkbByteOrder& eByteOrder,
127 OGRErr importPreambuleOfCollectionFromWkb(
128 unsigned char * pabyData,
131 OGRwkbByteOrder& eByteOrder,
140 virtual int getDimension()
const = 0;
141 virtual int getCoordinateDimension()
const;
142 virtual OGRBoolean IsEmpty()
const = 0;
143 virtual OGRBoolean IsValid()
const;
144 virtual OGRBoolean IsSimple()
const;
145 virtual OGRBoolean IsRing()
const;
146 virtual void empty() = 0;
148 virtual void getEnvelope(
OGREnvelope * psEnvelope )
const = 0;
149 virtual void getEnvelope(
OGREnvelope3D * psEnvelope )
const = 0;
152 virtual int WkbSize()
const = 0;
155 virtual OGRErr importFromWkt(
char ** ppszInput ) = 0;
161 virtual const char *getGeometryName()
const = 0;
162 virtual void dumpReadable( FILE *,
const char * = NULL,
char** papszOptions = NULL )
const;
163 virtual void flattenTo2D() = 0;
164 virtual char * exportToGML(
const char*
const * papszOptions = NULL )
const;
165 virtual char * exportToKML()
const;
166 virtual char * exportToJson()
const;
168 static GEOSContextHandle_t createGEOSContext();
169 static void freeGEOSContext(GEOSContextHandle_t hGEOSCtxt);
170 virtual GEOSGeom exportToGEOS(GEOSContextHandle_t hGEOSCtxt)
const;
171 virtual OGRBoolean hasCurveGeometry(
int bLookForNonLinear = FALSE)
const;
172 virtual OGRGeometry* getCurveGeometry(
const char*
const* papszOptions = NULL)
const;
173 virtual OGRGeometry* getLinearGeometry(
double dfMaxAngleStepSizeDegrees = 0,
174 const char*
const* papszOptions = NULL)
const;
176 virtual void closeRings();
178 virtual void setCoordinateDimension(
int nDimension );
186 virtual void segmentize(
double dfMaxLength);
189 virtual OGRBoolean Intersects(
const OGRGeometry * )
const;
190 virtual OGRBoolean Equals(
OGRGeometry * )
const = 0;
191 virtual OGRBoolean Disjoint(
const OGRGeometry * )
const;
192 virtual OGRBoolean Touches(
const OGRGeometry * )
const;
193 virtual OGRBoolean Crosses(
const OGRGeometry * )
const;
194 virtual OGRBoolean Within(
const OGRGeometry * )
const;
195 virtual OGRBoolean Contains(
const OGRGeometry * )
const;
196 virtual OGRBoolean Overlaps(
const OGRGeometry * )
const;
200 virtual double Distance(
const OGRGeometry * )
const;
202 virtual OGRGeometry *Buffer(
double dfDist,
int nQuadSegs = 30 )
const;
208 virtual OGRErr Centroid(
OGRPoint * poPoint )
const;
209 virtual OGRGeometry *Simplify(
double dTolerance)
const;
210 OGRGeometry *SimplifyPreserveTopology(
double dTolerance)
const;
215 OGRBoolean Intersect(
OGRGeometry * ) const CPL_WARN_DEPRECATED("Non standard method. Use Intersects() instead");
216 OGRBoolean Equal(
OGRGeometry * ) const CPL_WARN_DEPRECATED("Non standard method. Use Equals() instead");
217 virtual
OGRGeometry *SymmetricDifference( const
OGRGeometry * ) const CPL_WARN_DEPRECATED("Non standard method. Use SymDifference() instead");
218 virtual
OGRGeometry *getBoundary() const CPL_WARN_DEPRECATED("Non standard method. Use Boundary() instead");
221 static
int bGenerate_DB2_V72_BYTE_ORDER;
223 virtual
void swapXY();
248 OGRPoint(
double x,
double y,
double z );
262 virtual void empty();
265 virtual OGRBoolean
IsEmpty()
const;
268 double getX()
const {
return x; }
269 double getY()
const {
return y; }
270 double getZ()
const {
return z; }
274 void setX(
double xIn ) { x = xIn;
if (nCoordDimension <= 0) nCoordDimension = 2; }
275 void setY(
double yIn ) { y = yIn;
if (nCoordDimension <= 0) nCoordDimension = 2; }
276 void setZ(
double zIn ) { z = zIn; nCoordDimension=3; }
306 virtual OGRBoolean getNextPoint(
OGRPoint* p) = 0;
325 virtual OGRCurveCasterToLineString GetCasterToLineString()
const = 0;
326 virtual OGRCurveCasterToLinearRing GetCasterToLinearRing()
const = 0;
343 const char*
const* papszOptions = NULL)
const = 0;
349 virtual OGRBoolean
IsConvex()
const;
350 virtual double get_Area()
const = 0;
382 OGRErr importFromWKTListOnly(
char ** ppszInput,
int bHasZ,
int bHasM,
386 virtual double get_LinearArea()
const;
402 virtual void empty();
405 virtual OGRBoolean
IsEmpty()
const;
412 virtual double Project(
const OGRPoint *)
const;
413 virtual OGRLineString* getSubLine(
double,
double,
int)
const;
417 void getPoint(
int,
OGRPoint * )
const;
418 double getX(
int i )
const {
return paoPoints[i].x; }
419 double getY(
int i )
const {
return paoPoints[i].y; }
420 double getZ(
int i )
const;
427 void setNumPoints(
int nNewPointCount,
int bZeroizeNewContent = TRUE );
429 void setPoint(
int,
double,
double );
430 void setZ(
int,
double );
431 void setPoint(
int,
double,
double,
double );
432 void setPoints(
int,
OGRRawPoint *,
double * = NULL );
433 void setPoints(
int,
double * padfX,
double * padfY,
434 double *padfZIn = NULL );
436 void addPoint(
double,
double );
437 void addPoint(
double,
double,
double );
439 void getPoints(
OGRRawPoint *,
double * = NULL )
const;
440 void getPoints(
void* pabyX,
int nXStride,
441 void* pabyY,
int nYStride,
442 void* pabyZ = NULL,
int nZStride = 0 )
const;
445 int nStartVertex = 0,
int nEndVertex = -1 );
446 void reversePoints(
void );
477 virtual OGRCurveCasterToLineString GetCasterToLineString()
const;
478 virtual OGRCurveCasterToLinearRing GetCasterToLinearRing()
const;
487 const char*
const* papszOptions = NULL)
const;
526 virtual int _WkbSize(
int b3D )
const;
527 virtual OGRErr _importFromWkb( OGRwkbByteOrder,
int b3D,
528 unsigned char *,
int=-1 );
529 virtual OGRErr _exportToWkb( OGRwkbByteOrder,
int b3D,
530 unsigned char * )
const;
534 virtual OGRCurveCasterToLineString GetCasterToLineString()
const;
535 virtual OGRCurveCasterToLinearRing GetCasterToLinearRing()
const;
545 virtual int isClockwise()
const;
546 virtual void reverseWindingOrder();
548 OGRBoolean isPointInRing(
const OGRPoint* pt,
int bTestEnvelope = TRUE)
const;
549 OGRBoolean isPointOnRingBoundary(
const OGRPoint* pt,
int bTestEnvelope = TRUE)
const;
578 void ExtendEnvelopeWithCircular(
OGREnvelope * psEnvelope )
const;
579 OGRBoolean IsValidFast()
const;
580 int IsFullCircle(
double& cx,
double& cy,
double& square_R )
const;
583 virtual OGRCurveCasterToLineString GetCasterToLineString()
const;
584 virtual OGRCurveCasterToLinearRing GetCasterToLinearRing()
const;
599 virtual OGRBoolean
IsValid()
const;
606 const char*
const* papszOptions = NULL)
const;
616 const char*
const* papszOptions = NULL)
const;
655 OGRErr importPreambuleFromWkb(
OGRGeometry* poGeom,
656 unsigned char * pabyData,
659 OGRwkbByteOrder& eByteOrder,
663 unsigned char * pabyData,
666 int bAcceptCompoundCurve,
674 int getNumCurves()
const;
676 const OGRCurve *getCurve(
int )
const;
705 OGRErr addCurveDirectlyInternal(
OGRCurve* poCurve,
706 double dfToleranceEps,
710 OGRLineString* CurveToLineInternal(
double dfMaxAngleStepSizeDegrees,
711 const char*
const* papszOptions,
712 int bIsLinearRing)
const;
718 virtual OGRCurveCasterToLineString GetCasterToLineString()
const;
719 virtual OGRCurveCasterToLinearRing GetCasterToLinearRing()
const;
734 virtual void empty();
737 virtual OGRBoolean
IsEmpty()
const;
745 const char*
const* papszOptions = NULL)
const;
755 int getNumCurves()
const;
757 const OGRCurve *getCurve(
int )
const;
762 OGRErr addCurve(
OGRCurve*,
double dfToleranceEps = 1e-14 );
763 OGRErr addCurveDirectly(
OGRCurve*,
double dfToleranceEps = 1e-14 );
775 const char*
const* papszOptions = NULL)
const;
792 virtual OGRSurfaceCasterToPolygon GetCasterToPolygon()
const = 0;
793 virtual OGRSurfaceCasterToCurvePolygon GetCasterToCurvePolygon()
const = 0;
796 virtual double get_Area()
const = 0;
797 virtual OGRErr PointOnSurface(
OGRPoint * poPoint )
const = 0;
824 OGRBoolean ContainsPoint(
const OGRPoint* p )
const;
825 virtual int checkRing(
OGRCurve * poNewRing )
const;
826 OGRErr addRingDirectlyInternal(
OGRCurve* poCurve,
int bNeedRealloc );
836 virtual OGRSurfaceCasterToPolygon GetCasterToPolygon()
const;
837 virtual OGRSurfaceCasterToCurvePolygon GetCasterToCurvePolygon()
const;
847 virtual void empty();
850 virtual OGRBoolean
IsEmpty()
const;
854 const char*
const* papszOptions = NULL)
const;
874 const char*
const* papszOptions = NULL)
const;
916 virtual int checkRing(
OGRCurve * poNewRing )
const;
917 OGRErr importFromWKTListOnly(
char ** ppszInput,
int bHasZ,
int bHasM,
923 virtual OGRSurfaceCasterToPolygon GetCasterToPolygon()
const;
924 virtual OGRSurfaceCasterToCurvePolygon GetCasterToCurvePolygon()
const;
936 const char*
const* papszOptions = NULL)
const;
950 const char*
const* papszOptions = NULL)
const;
960 OGRBoolean IsPointOnSurface(
const OGRPoint * )
const;
978 OGRErr importFromWkbInternal(
unsigned char * pabyData,
int nSize,
int nRecLevel,
980 OGRErr importFromWktInternal(
char **ppszInput,
int nRecLevel );
986 OGRErr exportToWktInternal(
char ** ppszDstText,
988 const char* pszSkipPrefix )
const;
1002 virtual void empty();
1005 virtual OGRBoolean
IsEmpty()
const;
1018 virtual double get_Length()
const;
1019 virtual double get_Area()
const;
1027 int getNumGeometries()
const;
1036 virtual OGRErr addGeometry(
const OGRGeometry * );
1037 virtual OGRErr addGeometryDirectly(
OGRGeometry * );
1038 virtual OGRErr removeGeometry(
int iIndex,
int bDelete = TRUE );
1071 virtual OGRErr PointOnSurface(
OGRPoint * poPoint )
const;
1124 OGRErr importFromWkt_Bracketed(
char **,
int bHasM,
int bHasZ );
1220 static OGRErr createFromFgfInternal(
unsigned char *pabyData,
1224 int *pnBytesConsumed,
1233 static OGRGeometry *createFromGML(
const char * );
1234 static OGRGeometry *createFromGEOS( GEOSContextHandle_t hGEOSCtxt, GEOSGeom );
1247 const char*
const* papszOptions = NULL );
1251 int *pbResultValidGeometry,
1252 const char **papszOptions = NULL);
1253 static int haveGEOS();
1257 char** papszOptions );
1260 approximateArcAngles(
double dfX,
double dfY,
double dfZ,
1261 double dfPrimaryRadius,
double dfSecondaryAxis,
1263 double dfStartAngle,
double dfEndAngle,
1264 double dfMaxAngleStepSizeDegrees );
1266 static int GetCurveParmeters(
double x0,
double y0,
1267 double x1,
double y1,
1268 double x2,
double y2,
1269 double& R,
double& cx,
double& cy,
1270 double& alpha0,
double& alpha1,
double& alpha2 );
1271 static OGRLineString* curveToLineString(
double x0,
double y0,
double z0,
1272 double x1,
double y1,
double z1,
1273 double x2,
double y2,
double z2,
1275 double dfMaxAngleStepSizeDegrees,
1276 const char*
const* papszOptions = NULL );
1278 const char*
const* papszOptions = NULL);
1285 typedef struct _OGRPreparedGeometry OGRPreparedGeometry;
1286 int OGRHasPreparedGeometrySupport();
1287 OGRPreparedGeometry* OGRCreatePreparedGeometry(
const OGRGeometry* poGeom );
1288 void OGRDestroyPreparedGeometry( OGRPreparedGeometry* poPreparedGeom );
1289 int OGRPreparedGeometryIntersects(
const OGRPreparedGeometry* poPreparedGeom,
virtual OGRBoolean hasCurveGeometry(int bLookForNonLinear=FALSE) const
Returns if this geometry is or has curve geometry.
Definition: ogrgeometrycollection.cpp:1075
virtual double get_Area() const
Get the area of the (closed) curve.
Definition: ogrcompoundcurve.cpp:752
virtual void Value(double, OGRPoint *) const =0
Fetch point at given distance along curve.
virtual OGRPointIterator * getPointIterator() const
Returns a point iterator over the curve.
Definition: ogrcompoundcurve.cpp:654
virtual void Value(double, OGRPoint *) const
Fetch point at given distance along curve.
Definition: ogrlinestring.cpp:1162
virtual void closeRings()
Force rings to be closed.
Definition: ogrgeometry.cpp:3929
virtual OGRwkbGeometryType getGeometryType() const =0
Fetch geometry type.
virtual int WkbSize() const
Returns size of related binary representation.
Definition: ogrcurvepolygon.cpp:335
virtual void setCoordinateDimension(int nDimension)
Set the coordinate dimension.
Definition: ogrgeometry.cpp:764
Concrete representation of a multi-vertex line.
Definition: ogr_geometry.h:468
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:2385
double getY() const
Fetch Y coordinate.
Definition: ogr_geometry.h:269
virtual OGRGeometry * clone() const =0
Make a copy of this object.
virtual void swapXY()
Swap x and y coordinates.
Definition: ogrgeometry.cpp:4508
virtual void segmentize(double dfMaxLength)
Modify the geometry such it has no segment longer then the given distance.
Definition: ogrcurvepolygon.cpp:600
virtual OGRErr exportToWkt(char **, OGRwkbVariant=wkbVariantOldOgc) const
Convert a geometry into well known text format.
Definition: ogrmulticurve.cpp:129
Create geometry objects from well known text/binary.
Definition: ogr_geometry.h:1218
virtual void StartPoint(OGRPoint *) const
Return the curve start point.
Definition: ogrcompoundcurve.cpp:238
virtual const char * getGeometryName() const =0
Fetch WKT name for geometry type.
virtual OGRErr exportToWkb(OGRwkbByteOrder, unsigned char *, OGRwkbVariant=wkbVariantOldOgc) const =0
Convert a geometry into well known binary format.
static OGRCurvePolygon * CastToCurvePolygon(OGRSurface *poSurface)
Cast to curve polygon.
Definition: ogrsurface.cpp:93
OGRCurve * stealExteriorRingCurve()
"Steal" reference to external ring.
Definition: ogrcurvepolygon.cpp:230
virtual OGRBoolean Within(const OGRGeometry *) const
Test for containment.
Definition: ogrgeometry.cpp:3691
virtual OGRErr transform(OGRCoordinateTransformation *poCT)
Apply arbitrary coordinate transformation to geometry.
Definition: ogrcurvepolygon.cpp:546
OGRCurve * getExteriorRingCurve()
Fetch reference to external polygon ring.
Definition: ogrcurvepolygon.cpp:151
virtual OGRBoolean hasCurveGeometry(int bLookForNonLinear=FALSE) const
Returns if this geometry is or has curve geometry.
Definition: ogrpolygon.cpp:668
virtual OGRGeometry * getCurveGeometry(const char *const *papszOptions=NULL) const
Return curve version of this geometry.
Definition: ogrgeometry.cpp:2449
Coordinate systems services.
static OGRLinearRing * CastToLinearRing(OGRCompoundCurve *poCC)
Cast to linear ring.
Definition: ogrcompoundcurve.cpp:703
virtual OGRErr importFromWkt(char **)
Assign geometry from well known text data.
Definition: ogrlinestring.cpp:956
virtual OGRErr importFromWkb(unsigned char *, int=-1, OGRwkbVariant=wkbVariantOldOgc)
Assign geometry from well known binary data.
Definition: ogrlinestring.cpp:796
virtual OGRErr importFromWkt(char **)
Assign geometry from well known text data.
Definition: ogrcurvepolygon.cpp:407
virtual OGRErr exportToWkt(char **ppszDstText, OGRwkbVariant eWkbVariant=wkbVariantOldOgc) const
Convert a geometry into well known text format.
Definition: ogrcurvepolygon.cpp:422
virtual void EndPoint(OGRPoint *) const =0
Return the curve end point.
A collection of non-overlapping OGRPolygon.
Definition: ogr_geometry.h:1090
virtual void Value(double, OGRPoint *) const
Fetch point at given distance along curve.
Definition: ogrcompoundcurve.cpp:258
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.
Concrete representation of a circular string, that is to say a curve made of one or several arc circl...
Definition: ogr_geometry.h:575
virtual void flattenTo2D()=0
Convert geometry to strictly 2D.
Abstract curve base class for OGRLineString, OGRCircularString and OGRCompoundCurve.
Definition: ogr_geometry.h:320
A collection of 1 or more geometry objects.
Definition: ogr_geometry.h:976
virtual OGRBoolean Equals(OGRGeometry *) const
Returns TRUE if two geometries are equivalent.
Definition: ogrcurvepolygon.cpp:525
int getNumInteriorRings() const
Fetch the number of internal rings.
Definition: ogrcurvepolygon.cpp:176
Concrete representation of a closed ring.
Definition: ogr_geometry.h:520
virtual OGRErr PointOnSurface(OGRPoint *poPoint) const
This method relates to the SFCOM IMultiSurface::get_PointOnSurface() method.
Definition: ogrmultisurface.cpp:245
virtual int WkbSize() const
Returns size of related binary representation.
Definition: ogrpolygon.cpp:220
virtual OGRLineString * CurveToLine(double dfMaxAngleStepSizeDegrees=0, const char *const *papszOptions=NULL) const
Return a linestring from a curve geometry.
Definition: ogrcompoundcurve.cpp:316
virtual int getDimension() const
Get the dimension of this object.
Definition: ogrgeometrycollection.cpp:121
virtual int get_IsClosed() const
Return TRUE if curve is closed.
Definition: ogrcurve.cpp:76
virtual void segmentize(double dfMaxLength)
Modify the geometry such it has no segment longer then the given distance.
Definition: ogrlinestring.cpp:1702
virtual int getCoordinateDimension() const
Get the dimension of the coordinates in this object.
Definition: ogrgeometry.cpp:716
virtual OGRErr importFromWkb(unsigned char *, int=-1, OGRwkbVariant=wkbVariantOldOgc)
Assign geometry from well known binary data.
Definition: ogrcurvepolygon.cpp:359
virtual OGRwkbGeometryType getGeometryType() const
Fetch geometry type.
Definition: ogrcurvepolygon.cpp:94
virtual int getNumPoints() const
Return the number of points of a curve geometry.
Definition: ogrcompoundcurve.cpp:596
A collection of non-overlapping OGRSurface.
Definition: ogr_geometry.h:1055
virtual double get_Length() const =0
Returns the length of the curve.
virtual void StartPoint(OGRPoint *) const =0
Return the curve start point.
virtual double get_Area() const =0
Get the area of the (closed) curve.
Concrete representation of a compound curve, made of curves: OGRLineString and OGRCircularString.
Definition: ogr_geometry.h:700
Simple container for a position.
Definition: ogr_geometry.h:47
OGRwkbGeometryType
List of well known binary geometry types.
Definition: ogr_core.h:309
virtual OGRErr exportToWkb(OGRwkbByteOrder, unsigned char *, OGRwkbVariant=wkbVariantOldOgc) const
Convert a geometry into well known binary format.
Definition: ogrpolygon.cpp:288
virtual OGRwkbGeometryType getGeometryType() const
Fetch geometry type.
Definition: ogrgeometrycollection.cpp:108
virtual OGRGeometry * getLinearGeometry(double dfMaxAngleStepSizeDegrees=0, const char *const *papszOptions=NULL) const
Return, possibly approximate, non-curve version of this geometry.
Definition: ogrcurvepolygon.cpp:482
virtual int ContainsPoint(const OGRPoint *p) const
Returns if a point is contained in a (closed) curve.
Definition: ogrcurve.cpp:353
virtual OGRErr exportToWkt(char **ppszDstText, OGRwkbVariant=wkbVariantOldOgc) const
Convert a geometry into well known text format.
Definition: ogrgeometrycollection.cpp:679
Interface for a point iterator.
Definition: ogr_geometry.h:302
A collection of OGRCurve.
Definition: ogr_geometry.h:1156
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:788
A collection of OGRLineString.
Definition: ogr_geometry.h:1189
virtual OGRErr exportToWkt(char **ppszDstText, OGRwkbVariant=wkbVariantOldOgc) const
Convert a geometry into well known text format.
Definition: ogrpolygon.cpp:497
Abstract base class for all geometry classes.
Definition: ogr_geometry.h:104
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:641
double getZ() const
Fetch Z coordinate.
Definition: ogr_geometry.h:270
void setX(double xIn)
Assign point X coordinate.
Definition: ogr_geometry.h:274
virtual OGRErr importFromWkt(char **)
Assign geometry from well known text data.
Definition: ogrgeometrycollection.cpp:666
virtual OGRBoolean IsValid() const
Test if the geometry is valid.
Definition: ogrgeometry.cpp:1596
static OGRLinearRing * CastToLinearRing(OGRCurve *poCurve)
Cast to linear ring.
Definition: ogrcurve.cpp:332
virtual double get_Area() const =0
Get the area of the surface object.
virtual OGRBoolean IsEmpty() const
Returns TRUE (non-zero) if the object has no points.
Definition: ogrcurvepolygon.cpp:591
virtual OGRBoolean Intersects(const OGRGeometry *) const
Do these features intersect?
Definition: ogrgeometry.cpp:350
void setZ(double zIn)
Assign point Z coordinate.
Definition: ogr_geometry.h:276
virtual void EndPoint(OGRPoint *) const
Return the curve end point.
Definition: ogrcompoundcurve.cpp:248
virtual OGRErr exportToWkb(OGRwkbByteOrder, unsigned char *, OGRwkbVariant=wkbVariantOldOgc) const
Convert a geometry into well known binary format.
Definition: ogrlinestring.cpp:882
Core portability services for cross-platform OGR code.
virtual OGRErr exportToWkt(char **ppszDstText, OGRwkbVariant=wkbVariantOldOgc) const
Convert a geometry into well known text format.
Definition: ogrlinestring.cpp:1039
virtual void getEnvelope(OGREnvelope *psEnvelope) const
Computes and returns the bounding envelope for this geometry in the passed psEnvelope structure...
Definition: ogrlinestring.cpp:1473
virtual int getDimension() const =0
Get the dimension of this object.
virtual const char * getGeometryName() const
Fetch WKT name for geometry type.
Definition: ogrmulticurve.cpp:83
Concrete class representing curve polygons.
Definition: ogr_geometry.h:821
virtual OGRErr exportToWkb(OGRwkbByteOrder, unsigned char *, OGRwkbVariant=wkbVariantOldOgc) const
Convert a geometry into well known binary format.
Definition: ogrcurvepolygon.cpp:382
virtual const char * getGeometryName() const
Fetch WKT name for geometry type.
Definition: ogrlinestring.cpp:1882
static OGRPolygon * CastToPolygon(OGRSurface *poSurface)
Cast to polygon.
Definition: ogrsurface.cpp:73
virtual OGRBoolean hasCurveGeometry(int bLookForNonLinear=FALSE) const
Returns if this geometry is or has curve geometry.
Definition: ogrcurvepolygon.cpp:468
Utility class to store a collection of curves.
Definition: ogr_geometry.h:633
void setY(double yIn)
Assign point Y coordinate.
Definition: ogr_geometry.h:275
This class respresents a OpenGIS Spatial Reference System, and contains methods for converting betwee...
Definition: ogr_spatialref.h:129
virtual double get_AreaOfCurveSegments() const =0
Get the area of the purely curve portions of a (closed) curve.
Old-style 99-402 extended dimension (Z) WKB types.
Definition: ogr_core.h:373
Simple container for a bounding region in 3D.
Definition: ogr_core.h:162
OGRCurvePolygon()
Create an empty curve polygon.
Definition: ogrcurvepolygon.cpp:45
virtual OGRLineString * CurveToLine(double dfMaxAngleStepSizeDegrees=0, const char *const *papszOptions=NULL) const =0
Return a linestring from a curve geometry.
virtual void empty()
Clear geometry information.
Definition: ogrcurvepolygon.cpp:84
virtual double get_AreaOfCurveSegments() const
Get the area of the purely curve portions of a (closed) curve.
Definition: ogrcompoundcurve.cpp:791
OGRErr addRingDirectly(OGRCurve *)
Add a ring to a polygon.
Definition: ogrcurvepolygon.cpp:314
Point class.
Definition: ogr_geometry.h:239
OGRwkbVariant
Output variants of WKB we support.
Definition: ogr_core.h:371
virtual double get_Length() const
Returns the length of the curve.
Definition: ogrlinestring.cpp:1118
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...
double getX() const
Fetch X coordinate.
Definition: ogr_geometry.h:268
Concrete class representing polygons.
Definition: ogr_geometry.h:911
Abstract curve base class for OGRLineString and OGRCircularString.
Definition: ogr_geometry.h:370
Simple container for a bounding region.
Definition: ogr_core.h:48
virtual OGRErr exportToWkt(char **ppszDstText, OGRwkbVariant=wkbVariantOldOgc) const =0
Convert a geometry into well known text format.
virtual int getNumPoints() const =0
Return the number of points of a curve geometry.
virtual OGRGeometry * clone() const
Make a copy of this object.
Definition: ogrlinestring.cpp:77
virtual void getEnvelope(OGREnvelope *psEnvelope) const
Computes and returns the bounding envelope for this geometry in the passed psEnvelope structure...
Definition: ogrcurvepolygon.cpp:505
virtual OGRGeometry * getLinearGeometry(double dfMaxAngleStepSizeDegrees=0, const char *const *papszOptions=NULL) const
Return, possibly approximate, non-curve version of this geometry.
Definition: ogrgeometry.cpp:2416
virtual OGRBoolean Contains(const OGRGeometry *) const
Test for containment.
Definition: ogrgeometry.cpp:3773
virtual OGRErr exportToWkt(char **, OGRwkbVariant=wkbVariantOldOgc) const
Convert a geometry into well known text format.
Definition: ogrmultisurface.cpp:214
double getX(int i) const
Get X at vertex.
Definition: ogr_geometry.h:418
OGRSpatialReference * getSpatialReference(void) const
Returns spatial reference system for object.
Definition: ogr_geometry.h:181
virtual OGRwkbGeometryType getGeometryType() const
Fetch geometry type.
Definition: ogrmultisurface.cpp:60
virtual int getNumPoints() const
Fetch vertex count.
Definition: ogr_geometry.h:416
static OGRCompoundCurve * CastToCompoundCurve(OGRCurve *puCurve)
Cast to compound curve.
Definition: ogrcurve.cpp:279
virtual int PointOnSurface(OGRPoint *poPoint) const
This method relates to the SFCOM ISurface::get_PointOnSurface() method.
Definition: ogrcurvepolygon.cpp:492
virtual OGRPolygon * CurvePolyToPoly(double dfMaxAngleStepSizeDegrees=0, const char *const *papszOptions=NULL) const
Return a polygon from a curve polygon.
Definition: ogrcurvepolygon.cpp:450
OGRErr addRing(OGRCurve *)
Add a ring to a polygon.
Definition: ogrcurvepolygon.cpp:257
virtual OGRPointIterator * getPointIterator() const =0
Returns a point iterator over the curve.
static OGRLineString * CastToLineString(OGRCurve *poCurve)
Cast to linestring.
Definition: ogrcurve.cpp:310
virtual OGRErr transform(OGRCoordinateTransformation *poCT)=0
Apply arbitrary coordinate transformation to geometry.
virtual OGRPolygon * CurvePolyToPoly(double dfMaxAngleStepSizeDegrees=0, const char *const *papszOptions=NULL) const
Return a polygon from a curve polygon.
Definition: ogrpolygon.cpp:658
virtual const char * getGeometryName() const
Fetch WKT name for geometry type.
Definition: ogrcurvepolygon.cpp:127
virtual const char * getGeometryName() const
Fetch WKT name for geometry type.
Definition: ogrgeometrycollection.cpp:157
virtual void flattenTo2D()
Convert geometry to strictly 2D.
Definition: ogrcurvepolygon.cpp:117
virtual OGRBoolean hasCurveGeometry(int bLookForNonLinear=FALSE) const
Returns if this geometry is or has curve geometry.
Definition: ogrmulticurve.cpp:140
virtual double get_Length() const
Returns the length of the curve.
Definition: ogrcompoundcurve.cpp:226
A collection of OGRPoint.
Definition: ogr_geometry.h:1121
virtual OGRwkbGeometryType getGeometryType() const
Fetch geometry type.
Definition: ogrmulticurve.cpp:60
virtual void swapXY()
Swap x and y coordinates.
Definition: ogrcurvepolygon.cpp:609
virtual void setCoordinateDimension(int nDimension)
Set the coordinate dimension.
Definition: ogrcurvepolygon.cpp:580
virtual OGRBoolean IsConvex() const
Returns if a (closed) curve forms a convex shape.
Definition: ogrcurve.cpp:236
virtual OGRBoolean hasCurveGeometry(int bLookForNonLinear=FALSE) const
Returns if this geometry is or has curve geometry.
Definition: ogrmultisurface.cpp:225
virtual int WkbSize() const
Returns size of related binary representation.
Definition: ogrlinestring.cpp:123
OGRCurve * getInteriorRingCurve(int)
Fetch reference to indicated internal ring.
Definition: ogrcurvepolygon.cpp:205
virtual OGRBoolean IsEmpty() const =0
Returns TRUE (non-zero) if the object has no points.
virtual const char * getGeometryName() const
Fetch WKT name for geometry type.
Definition: ogrmultisurface.cpp:83
double getY(int i) const
Get Y at vertex.
Definition: ogr_geometry.h:419