32 #ifndef OGR_GEOMETRY_H_INCLUDED 33 #define OGR_GEOMETRY_H_INCLUDED 50 #ifndef DEFINEH_OGRGeometryH 51 #define DEFINEH_OGRGeometryH 85 static int defPrecision = getDefaultPrecision();
86 static bool defRound = getDefaultRound();
88 precision = defPrecision;
96 static int getDefaultPrecision();
97 static bool getDefaultRound();
238 virtual void visit(
const OGRPoint*) = 0;
333 friend class OGRCurveCollection;
335 unsigned int flags = 0;
337 OGRErr importPreambleFromWkt(
const char ** ppszInput,
338 int* pbHasZ,
int* pbHasM,
340 OGRErr importCurveCollectionFromWkt(
341 const char ** ppszInput,
342 int bAllowEmptyComponent,
343 int bAllowLineString,
345 int bAllowCompoundCurve,
348 OGRErr importPreambleFromWkb(
const unsigned char * pabyData,
352 OGRErr importPreambleOfCollectionFromWkb(
353 const unsigned char * pabyData,
357 size_t nMinSubGeomSize,
363 void HomogenizeDimensionalityWith(
OGRGeometry* poOtherGeom );
378 static const unsigned int OGR_G_NOT_EMPTY_POINT = 0x1;
379 static const unsigned int OGR_G_3D = 0x2;
380 static const unsigned int OGR_G_MEASURED = 0x4;
396 virtual int getDimension()
const = 0;
397 virtual int getCoordinateDimension()
const;
398 int CoordinateDimension()
const;
409 virtual void empty() = 0;
411 virtual
void getEnvelope(
OGREnvelope * psEnvelope ) const = 0;
412 virtual
void getEnvelope(
OGREnvelope3D * psEnvelope ) const = 0;
415 virtual
size_t WkbSize() const = 0;
416 OGRErr importFromWkb( const
GByte*,
size_t=static_cast<
size_t>(-1),
418 virtual
OGRErr importFromWkb( const
unsigned char *,
421 size_t& nBytesConsumedOut ) = 0;
424 virtual
OGRErr importFromWkt( const
char ** ppszInput ) = 0;
432 CPL_WARN_DEPRECATED(
"Use importFromWkt(const char**) instead")
435 return importFromWkt( const_cast<const char**>(ppszInput) );
439 OGRErr exportToWkt(
char ** ppszDstText,
447 OGRErr *err =
nullptr)
const = 0;
452 virtual const char *getGeometryName()
const = 0;
453 virtual void dumpReadable( FILE *,
const char * =
nullptr 454 ,
char** papszOptions =
nullptr )
const;
455 virtual void flattenTo2D() = 0;
456 virtual char * exportToGML(
const char*
const * papszOptions =
nullptr )
const;
457 virtual char * exportToKML()
const;
458 virtual char * exportToJson()
const;
470 virtual OGRBoolean hasCurveGeometry(
int bLookForNonLinear = FALSE)
const;
474 double dfMaxAngleStepSizeDegrees = 0,
482 virtual
void closeRings();
484 virtual
void setCoordinateDimension(
int nDimension );
486 virtual
void setMeasured(
OGRBoolean bIsMeasured );
494 virtual void segmentize(
double dfMaxLength);
510 virtual
double Distance( const
OGRGeometry * ) const ;
512 virtual
OGRGeometry *Buffer(
double dfDist,
int nQuadSegs = 30 )
526 OGRGeometry *SimplifyPreserveTopology(
double dTolerance)
533 virtual
double Distance3D( const
OGRGeometry *poOtherGeom ) const;
538 const CPL_WARN_DEPRECATED("Non standard method. "
539 "Use Intersects() instead");
541 const CPL_WARN_DEPRECATED("Non standard method. "
542 "Use Equals() instead");
544 const CPL_WARN_DEPRECATED("Non standard method. "
545 "Use SymDifference() instead");
547 const CPL_WARN_DEPRECATED("Non standard method. "
548 "Use Boundary() instead");
553 static
int bGenerate_DB2_V72_BYTE_ORDER;
556 virtual
void swapXY();
579 {
return cpl::down_cast<
OGRPoint*>(
this); }
586 {
return cpl::down_cast<
const OGRPoint*>(
this); }
593 {
return cpl::down_cast<
OGRCurve*>(
this); }
600 {
return cpl::down_cast<
const OGRCurve*>(
this); }
684 {
return cpl::down_cast<
const OGRSurface*>(
this); }
698 {
return cpl::down_cast<
const OGRPolygon*>(
this); }
712 {
return cpl::down_cast<
const OGRTriangle*>(
this); }
843 struct CPL_DLL OGRGeometryUniquePtrDeleter
856 #define OGR_FORBID_DOWNCAST_TO(name) \ 857 inline OGR ## name * to ## name() = delete; \ 858 inline const OGR ## name * to ## name() const = delete; 860 #define OGR_FORBID_DOWNCAST_TO_POINT OGR_FORBID_DOWNCAST_TO(Point) 861 #define OGR_FORBID_DOWNCAST_TO_CURVE OGR_FORBID_DOWNCAST_TO(Curve) 862 #define OGR_FORBID_DOWNCAST_TO_SIMPLE_CURVE OGR_FORBID_DOWNCAST_TO(SimpleCurve) 863 #define OGR_FORBID_DOWNCAST_TO_LINESTRING OGR_FORBID_DOWNCAST_TO(LineString) 864 #define OGR_FORBID_DOWNCAST_TO_LINEARRING OGR_FORBID_DOWNCAST_TO(LinearRing) 865 #define OGR_FORBID_DOWNCAST_TO_CIRCULARSTRING OGR_FORBID_DOWNCAST_TO(CircularString) 866 #define OGR_FORBID_DOWNCAST_TO_COMPOUNDCURVE OGR_FORBID_DOWNCAST_TO(CompoundCurve) 867 #define OGR_FORBID_DOWNCAST_TO_SURFACE OGR_FORBID_DOWNCAST_TO(Surface) 868 #define OGR_FORBID_DOWNCAST_TO_CURVEPOLYGON OGR_FORBID_DOWNCAST_TO(CurvePolygon) 869 #define OGR_FORBID_DOWNCAST_TO_POLYGON OGR_FORBID_DOWNCAST_TO(Polygon) 870 #define OGR_FORBID_DOWNCAST_TO_TRIANGLE OGR_FORBID_DOWNCAST_TO(Triangle) 871 #define OGR_FORBID_DOWNCAST_TO_MULTIPOINT OGR_FORBID_DOWNCAST_TO(MultiPoint) 872 #define OGR_FORBID_DOWNCAST_TO_MULTICURVE OGR_FORBID_DOWNCAST_TO(MultiCurve) 873 #define OGR_FORBID_DOWNCAST_TO_MULTILINESTRING OGR_FORBID_DOWNCAST_TO(MultiLineString) 874 #define OGR_FORBID_DOWNCAST_TO_MULTISURFACE OGR_FORBID_DOWNCAST_TO(MultiSurface) 875 #define OGR_FORBID_DOWNCAST_TO_MULTIPOLYGON OGR_FORBID_DOWNCAST_TO(MultiPolygon) 876 #define OGR_FORBID_DOWNCAST_TO_GEOMETRYCOLLECTION OGR_FORBID_DOWNCAST_TO(GeometryCollection) 877 #define OGR_FORBID_DOWNCAST_TO_POLYHEDRALSURFACE OGR_FORBID_DOWNCAST_TO(PolyhedralSurface) 878 #define OGR_FORBID_DOWNCAST_TO_TIN OGR_FORBID_DOWNCAST_TO(TriangulatedSurface) 880 #define OGR_ALLOW_UPCAST_TO(name) \ 881 inline OGR ## name * to ## name() { return this; } \ 882 inline const OGR ## name * to ## name() const { return this; } 884 #ifndef SUPPRESS_OGR_ALLOW_CAST_TO_THIS_WARNING 885 #define CAST_TO_THIS_WARNING CPL_WARN_DEPRECATED("Casting to this is useless") 887 #define CAST_TO_THIS_WARNING 890 #define OGR_ALLOW_CAST_TO_THIS(name) \ 891 inline OGR ## name * to ## name() CAST_TO_THIS_WARNING { return this; } \ 892 inline const OGR ## name * to ## name() const CAST_TO_THIS_WARNING { return this; } 894 #define OGR_FORBID_DOWNCAST_TO_ALL_CURVES \ 895 OGR_FORBID_DOWNCAST_TO_CURVE \ 896 OGR_FORBID_DOWNCAST_TO_SIMPLE_CURVE \ 897 OGR_FORBID_DOWNCAST_TO_LINESTRING \ 898 OGR_FORBID_DOWNCAST_TO_LINEARRING \ 899 OGR_FORBID_DOWNCAST_TO_CIRCULARSTRING \ 900 OGR_FORBID_DOWNCAST_TO_COMPOUNDCURVE 902 #define OGR_FORBID_DOWNCAST_TO_ALL_SURFACES \ 903 OGR_FORBID_DOWNCAST_TO_SURFACE \ 904 OGR_FORBID_DOWNCAST_TO_CURVEPOLYGON \ 905 OGR_FORBID_DOWNCAST_TO_POLYGON \ 906 OGR_FORBID_DOWNCAST_TO_TRIANGLE \ 907 OGR_FORBID_DOWNCAST_TO_POLYHEDRALSURFACE \ 908 OGR_FORBID_DOWNCAST_TO_TIN 910 #define OGR_FORBID_DOWNCAST_TO_ALL_SINGLES \ 911 OGR_FORBID_DOWNCAST_TO_POINT \ 912 OGR_FORBID_DOWNCAST_TO_ALL_CURVES \ 913 OGR_FORBID_DOWNCAST_TO_ALL_SURFACES 915 #define OGR_FORBID_DOWNCAST_TO_ALL_MULTI \ 916 OGR_FORBID_DOWNCAST_TO_GEOMETRYCOLLECTION \ 917 OGR_FORBID_DOWNCAST_TO_MULTIPOINT \ 918 OGR_FORBID_DOWNCAST_TO_MULTICURVE \ 919 OGR_FORBID_DOWNCAST_TO_MULTILINESTRING \ 920 OGR_FORBID_DOWNCAST_TO_MULTISURFACE \ 921 OGR_FORBID_DOWNCAST_TO_MULTIPOLYGON 945 OGRPoint(
double x,
double y,
double z );
946 OGRPoint(
double x,
double y,
double z,
double m );
948 static OGRPoint* createXYM(
double x,
double y,
double m );
954 size_t WkbSize()
const override;
958 size_t& nBytesConsumedOut )
override;
978 OGRErr *err =
nullptr)
const override;
983 virtual void empty()
override;
987 {
return !(flags & OGR_G_NOT_EMPTY_POINT); }
991 double getX()
const {
return x; }
993 double getY()
const {
return y; }
995 double getZ()
const {
return z; }
997 double getM()
const {
return m; }
1004 void setX(
double xIn ) { x = xIn;
if( std::isnan(x) || std::isnan(y) ) flags &= ~OGR_G_NOT_EMPTY_POINT;
else flags |= OGR_G_NOT_EMPTY_POINT; }
1008 void setY(
double yIn ) { y = yIn;
if( std::isnan(x) || std::isnan(y) ) flags &= ~OGR_G_NOT_EMPTY_POINT;
else flags |= OGR_G_NOT_EMPTY_POINT; }
1013 { z = zIn; flags |= OGR_G_3D; }
1018 { m = mIn; flags |= OGR_G_MEASURED; }
1033 virtual void swapXY()
override;
1035 OGR_ALLOW_CAST_TO_THIS(Point)
1036 OGR_FORBID_DOWNCAST_TO_ALL_CURVES
1037 OGR_FORBID_DOWNCAST_TO_ALL_SURFACES
1038 OGR_FORBID_DOWNCAST_TO_ALL_MULTI
1076 virtual OGRCurveCasterToLineString GetCasterToLineString()
const = 0;
1077 virtual OGRCurveCasterToLinearRing GetCasterToLinearRing()
const = 0;
1088 class CPL_DLL ConstIterator
1091 std::unique_ptr<Private> m_poPrivate;
1093 ConstIterator(
const OGRCurve* poSelf,
bool bStart);
1094 ConstIterator(ConstIterator&& oOther) noexcept;
1097 ConstIterator& operator++();
1098 bool operator!=(
const ConstIterator& it)
const;
1122 ConstIterator
begin()
const;
1124 ConstIterator
end()
const;
1127 virtual OGRCurve *clone()
const override = 0;
1130 virtual double get_Length()
const = 0;
1131 virtual void StartPoint(
OGRPoint * )
const = 0;
1132 virtual void EndPoint(
OGRPoint * )
const = 0;
1133 virtual int get_IsClosed()
const;
1134 virtual void Value(
double,
OGRPoint * )
const = 0;
1135 virtual OGRLineString* CurveToLine(
double dfMaxAngleStepSizeDegrees = 0,
1136 const char*
const* papszOptions =
nullptr)
1138 virtual int getDimension()
const override;
1141 virtual int getNumPoints()
const = 0;
1144 virtual double get_Area()
const = 0;
1160 OGR_FORBID_DOWNCAST_TO_POINT
1161 OGR_ALLOW_CAST_TO_THIS(Curve)
1162 OGR_FORBID_DOWNCAST_TO_ALL_SURFACES
1163 OGR_FORBID_DOWNCAST_TO_ALL_MULTI
1168 inline OGRCurve::ConstIterator
begin(
const OGRCurve* poCurve) {
return poCurve->begin(); }
1170 inline OGRCurve::ConstIterator
end(
const OGRCurve* poCurve) {
return poCurve->end(); }
1202 OGRErr importFromWKTListOnly(
const char ** ppszInput,
int bHasZ,
int bHasM,
1208 virtual double get_LinearArea()
const;
1214 class CPL_DLL Iterator
1217 std::unique_ptr<Private> m_poPrivate;
1221 Iterator(Iterator&& oOther) noexcept;
1224 Iterator& operator++();
1225 bool operator!=(
const Iterator& it)
const;
1231 class CPL_DLL ConstIterator
1234 std::unique_ptr<Private> m_poPrivate;
1237 ConstIterator(ConstIterator&& oOther) noexcept;
1240 ConstIterator& operator++();
1241 bool operator!=(
const ConstIterator& it)
const;
1274 ConstIterator
begin()
const;
1276 ConstIterator
end()
const;
1279 virtual size_t WkbSize()
const override;
1280 virtual OGRErr importFromWkb(
const unsigned char *,
1283 size_t& nBytesConsumedOut )
override;
1292 OGRErr importFromWkt(
const char ** )
override;
1303 OGRErr *err =
nullptr)
const override;
1306 virtual void empty()
override;
1307 virtual void getEnvelope(
OGREnvelope * psEnvelope )
const override;
1308 virtual void getEnvelope(
OGREnvelope3D * psEnvelope )
const override;
1313 virtual double get_Length()
const override;
1314 virtual void StartPoint(
OGRPoint * )
const override;
1315 virtual void EndPoint(
OGRPoint * )
const override;
1316 virtual void Value(
double,
OGRPoint * )
const override;
1317 virtual double Project(
const OGRPoint * )
const;
1318 virtual OGRLineString* getSubLine(
double,
double,
int )
const;
1322 void getPoint(
int,
OGRPoint * )
const;
1323 double getX(
int i )
const {
return paoPoints[i].
x; }
1324 double getY(
int i )
const {
return paoPoints[i].
y; }
1325 double getZ(
int i )
const;
1326 double getM(
int i )
const;
1332 virtual void setCoordinateDimension(
int nDimension )
override;
1333 virtual void set3D(
OGRBoolean bIs3D )
override;
1334 virtual void setMeasured(
OGRBoolean bIsMeasured )
override;
1335 void setNumPoints(
int nNewPointCount,
1336 int bZeroizeNewContent = TRUE );
1338 void setPoint(
int,
double,
double );
1339 void setZ(
int,
double );
1340 void setM(
int,
double );
1341 void setPoint(
int,
double,
double,
double );
1342 void setPointM(
int,
double,
double,
double );
1343 void setPoint(
int,
double,
double,
double,
double );
1344 void setPoints(
int,
const OGRRawPoint *,
const double * =
nullptr );
1345 void setPointsM(
int,
const OGRRawPoint *,
const double * );
1346 void setPoints(
int,
const OGRRawPoint *,
const double *,
const double * );
1347 void setPoints(
int,
const double * padfX,
const double * padfY,
1348 const double *padfZIn =
nullptr );
1349 void setPointsM(
int,
const double * padfX,
const double * padfY,
1350 const double *padfMIn =
nullptr );
1351 void setPoints(
int,
const double * padfX,
const double * padfY,
1352 const double *padfZIn,
const double *padfMIn );
1354 void addPoint(
double,
double );
1355 void addPoint(
double,
double,
double );
1356 void addPointM(
double,
double,
double );
1357 void addPoint(
double,
double,
double,
double );
1359 bool removePoint(
int );
1361 void getPoints(
OGRRawPoint *,
double * =
nullptr )
const;
1362 void getPoints(
void* pabyX,
int nXStride,
1363 void* pabyY,
int nYStride,
1364 void* pabyZ =
nullptr,
int nZStride = 0,
1365 void* pabyM =
nullptr,
int nMStride = 0 )
const;
1368 int nStartVertex = 0,
int nEndVertex = -1 );
1369 void reversePoints(
void );
1374 virtual void flattenTo2D()
override;
1375 virtual void segmentize(
double dfMaxLength)
override;
1377 virtual void swapXY()
override;
1379 OGR_ALLOW_UPCAST_TO(Curve)
1380 OGR_ALLOW_CAST_TO_THIS(SimpleCurve)
1385 inline OGRSimpleCurve::Iterator
begin(
OGRSimpleCurve* poCurve) {
return poCurve->begin(); }
1387 inline OGRSimpleCurve::Iterator
end(
OGRSimpleCurve* poCurve) {
return poCurve->end(); }
1390 inline OGRSimpleCurve::ConstIterator
begin(
const OGRSimpleCurve* poCurve) {
return poCurve->begin(); }
1392 inline OGRSimpleCurve::ConstIterator
end(
const OGRSimpleCurve* poCurve) {
return poCurve->end(); }
1417 virtual OGRCurveCasterToLineString GetCasterToLineString()
1419 virtual OGRCurveCasterToLinearRing GetCasterToLinearRing()
1436 const char*
const* papszOptions =
nullptr )
1439 const char*
const* papszOptions =
nullptr )
const override;
1440 virtual double get_Area()
const override;
1454 OGR_ALLOW_UPCAST_TO(SimpleCurve)
1455 OGR_ALLOW_CAST_TO_THIS(LineString)
1489 virtual size_t WkbSize()
const override;
1493 size_t& nBytesConsumedOut )
override;
1504 virtual size_t _WkbSize(
int _flags )
const;
1506 const unsigned char *,
size_t,
1507 size_t& nBytesConsumedOut );
1509 unsigned char * )
const;
1511 virtual OGRCurveCasterToLineString GetCasterToLineString()
1513 virtual OGRCurveCasterToLinearRing GetCasterToLinearRing()
1530 virtual int isClockwise()
const;
1531 virtual void reverseWindingOrder();
1534 int bTestEnvelope = TRUE )
const;
1536 int bTestEnvelope = TRUE )
const;
1547 OGR_ALLOW_UPCAST_TO(LineString)
1548 OGR_ALLOW_CAST_TO_THIS(LinearRing)
1570 void ExtendEnvelopeWithCircular(
OGREnvelope * psEnvelope )
const;
1572 int IsFullCircle(
double& cx,
double& cy,
double& square_R )
const;
1576 virtual OGRCurveCasterToLineString GetCasterToLineString()
1578 virtual OGRCurveCasterToLinearRing GetCasterToLinearRing()
1596 size_t& nBytesConsumedOut )
override;
1616 OGRErr *err =
nullptr)
const override;
1627 const char*
const* papszOptions =
nullptr )
1630 virtual double get_Area()
const override;
1635 virtual void segmentize(
double dfMaxLength )
override;
1639 double dfMaxAngleStepSizeDegrees = 0,
1640 const char*
const* papszOptions =
nullptr)
const override;
1650 OGR_ALLOW_UPCAST_TO(SimpleCurve)
1651 OGR_ALLOW_CAST_TO_THIS(CircularString)
1668 class CPL_DLL OGRCurveCollection
1677 int nCurveCount = 0;
1681 OGRCurveCollection();
1682 OGRCurveCollection(
const OGRCurveCollection& other);
1683 ~OGRCurveCollection();
1685 OGRCurveCollection&
operator=(
const OGRCurveCollection& other);
1695 OGRCurve**
end() {
return papoCurves + nCurveCount; }
1701 const OGRCurve*
const*
end()
const {
return papoCurves + nCurveCount; }
1712 const unsigned char * pabyData,
1714 size_t& nDataOffset,
1716 size_t nMinSubGeomSize,
1718 OGRErr importBodyFromWkb(
1720 const unsigned char * pabyData,
1722 bool bAcceptCompoundCurve,
1726 size_t& nBytesConsumedOut );
1734 int nNewDimension );
1738 int getNumCurves()
const;
1740 const OGRCurve *getCurve(
int )
const;
1743 OGRErr removeCurve(
int iIndex,
bool bDelete =
true );
1771 OGRCurveCollection oCC{};
1774 double dfToleranceEps,
1780 OGRLineString* CurveToLineInternal(
double dfMaxAngleStepSizeDegrees,
1781 const char*
const* papszOptions,
1782 int bIsLinearRing )
const;
1793 virtual OGRCurveCasterToLineString GetCasterToLineString()
1795 virtual OGRCurveCasterToLinearRing GetCasterToLinearRing()
1823 virtual size_t WkbSize()
const override;
1827 size_t& nBytesConsumedOut )
override;
1847 OGRErr *err =
nullptr)
const override;
1851 virtual void empty()
override;
1862 const char*
const* papszOptions =
nullptr )
1867 virtual double get_Area()
const override;
1873 int getNumCurves()
const;
1875 const OGRCurve *getCurve(
int )
const;
1885 OGRErr addCurveDirectly(
OGRCurve*,
double dfToleranceEps = 1e-14 );
1894 virtual void segmentize(
double dfMaxLength)
override;
1898 double dfMaxAngleStepSizeDegrees = 0,
1899 const char*
const* papszOptions =
nullptr)
const override;
1903 virtual void swapXY()
override;
1905 OGR_ALLOW_UPCAST_TO(Curve)
1906 OGR_ALLOW_CAST_TO_THIS(CompoundCurve)
1934 virtual OGRSurfaceCasterToPolygon GetCasterToPolygon()
const = 0;
1935 virtual OGRSurfaceCasterToCurvePolygon GetCasterToCurvePolygon()
const = 0;
1939 virtual double get_Area()
const = 0;
1941 {
return PointOnSurfaceInternal(poPoint); }
1949 OGR_FORBID_DOWNCAST_TO_POINT
1950 OGR_FORBID_DOWNCAST_TO_ALL_CURVES
1951 OGR_ALLOW_CAST_TO_THIS(Surface)
1952 OGR_FORBID_DOWNCAST_TO_ALL_MULTI
1979 virtual int checkRing(
OGRCurve * poNewRing )
const;
1991 OGRCurveCollection oCC{};
1993 virtual OGRSurfaceCasterToPolygon GetCasterToPolygon()
1995 virtual OGRSurfaceCasterToCurvePolygon GetCasterToCurvePolygon()
2029 virtual void empty()
override;
2033 virtual void segmentize(
double dfMaxLength )
override;
2037 double dfMaxAngleStepSizeDegrees = 0,
2038 const char*
const* papszOptions =
nullptr )
const override;
2041 virtual double get_Area()
const override;
2044 virtual size_t WkbSize()
const override;
2048 size_t& nBytesConsumedOut )
override;
2068 OGRErr *err =
nullptr)
const override;
2077 double dfMaxAngleStepSizeDegrees = 0,
2078 const char*
const* papszOptions =
nullptr )
const;
2107 virtual void swapXY()
override;
2109 OGR_ALLOW_UPCAST_TO(Surface)
2110 OGR_ALLOW_CAST_TO_THIS(CurvePolygon)
2148 virtual int checkRing(
OGRCurve * poNewRing )
const override;
2149 virtual OGRErr importFromWKTListOnly(
const char ** ppszInput,
2150 int bHasZ,
int bHasM,
2157 virtual OGRSurfaceCasterToPolygon GetCasterToPolygon()
2159 virtual OGRSurfaceCasterToCurvePolygon GetCasterToCurvePolygon()
2193 const char*
const* papszOptions =
nullptr )
const override;
2195 double dfMaxAngleStepSizeDegrees = 0,
2196 const char*
const* papszOptions =
nullptr)
const override;
2199 virtual size_t WkbSize()
const override;
2203 size_t& nBytesConsumedOut )
override;
2223 OGRErr *err =
nullptr)
const override;
2227 double dfMaxAngleStepSizeDegrees = 0,
2228 const char*
const* papszOptions =
nullptr )
const override;
2250 OGR_ALLOW_UPCAST_TO(CurvePolygon)
2251 OGR_ALLOW_CAST_TO_THIS(Polygon)
2281 bool quickValidityCheck()
const;
2285 virtual OGRSurfaceCasterToPolygon GetCasterToPolygon()
const override;
2286 virtual OGRErr importFromWKTListOnly(
const char ** ppszInput,
2287 int bHasZ,
int bHasM,
2290 double*& padfZ )
override;
2308 size_t& nBytesConsumedOut )
override;
2325 OGR_ALLOW_UPCAST_TO(Polygon)
2326 OGR_ALLOW_CAST_TO_THIS(Triangle)
2342 OGRErr importFromWkbInternal(
const unsigned char * pabyData,
2346 OGRErr importFromWktInternal(
const char **ppszInput,
int nRecLevel );
2354 std::string exclude = std::string())
const;
2388 virtual void empty()
override;
2392 virtual void segmentize(
double dfMaxLength)
override;
2396 const char*
const* papszOptions =
nullptr )
const override;
2398 double dfMaxAngleStepSizeDegrees = 0,
2399 const char*
const* papszOptions =
nullptr )
const override;
2402 virtual size_t WkbSize()
const override;
2406 size_t& nBytesConsumedOut )
override;
2426 OGRErr *err =
nullptr)
const override;
2428 virtual double get_Length()
const;
2429 virtual double get_Area()
const;
2437 int getNumGeometries()
const;
2450 virtual OGRErr removeGeometry(
int iIndex,
int bDelete = TRUE );
2456 virtual void swapXY()
override;
2464 OGR_FORBID_DOWNCAST_TO_POINT
2465 OGR_FORBID_DOWNCAST_TO_ALL_CURVES
2466 OGR_FORBID_DOWNCAST_TO_ALL_SURFACES
2467 OGR_ALLOW_CAST_TO_THIS(GeometryCollection)
2541 OGRErr *err =
nullptr)
const override;
2569 OGR_ALLOW_CAST_TO_THIS(MultiSurface)
2570 OGR_ALLOW_UPCAST_TO(GeometryCollection)
2571 OGR_FORBID_DOWNCAST_TO_MULTIPOINT
2572 OGR_FORBID_DOWNCAST_TO_MULTILINESTRING
2573 OGR_FORBID_DOWNCAST_TO_MULTICURVE
2606 OGRErr _addGeometryWithExpectedSubGeometryType(
2609 OGRErr _addGeometryDirectlyWithExpectedSubGeometryType(
2658 OGRErr *err =
nullptr)
const override;
2674 OGR_ALLOW_CAST_TO_THIS(MultiPolygon)
2675 OGR_ALLOW_UPCAST_TO(MultiSurface)
2706 virtual OGRSurfaceCasterToPolygon GetCasterToPolygon()
2708 virtual OGRSurfaceCasterToCurvePolygon GetCasterToCurvePolygon()
2711 virtual const char* getSubGeometryName()
const;
2715 virtual OGRPolyhedralSurfaceCastToMultiPolygon GetCasterToMultiPolygon()
2743 virtual size_t WkbSize()
const override;
2749 size_t& nBytesConsumedOut )
override;
2769 OGRErr *err =
nullptr)
const override;
2774 virtual void empty()
override;
2783 virtual double get_Area()
const override;
2799 virtual void swapXY()
override;
2807 OGR_ALLOW_CAST_TO_THIS(PolyhedralSurface)
2808 OGR_ALLOW_UPCAST_TO(Surface)
2839 virtual const char* getSubGeometryName()
const override;
2842 virtual OGRPolyhedralSurfaceCastToMultiPolygon GetCasterToMultiPolygon()
2893 OGR_ALLOW_CAST_TO_THIS(TriangulatedSurface)
2894 OGR_ALLOW_UPCAST_TO(PolyhedralSurface)
2920 OGRErr importFromWkt_Bracketed(
const char **,
int bHasM,
int bHasZ );
2975 OGRErr *err =
nullptr)
const override;
2992 OGR_ALLOW_CAST_TO_THIS(MultiPoint)
2993 OGR_ALLOW_UPCAST_TO(GeometryCollection)
2994 OGR_FORBID_DOWNCAST_TO_MULTILINESTRING
2995 OGR_FORBID_DOWNCAST_TO_MULTICURVE
2996 OGR_FORBID_DOWNCAST_TO_MULTISURFACE
2997 OGR_FORBID_DOWNCAST_TO_MULTIPOLYGON
3081 OGRErr *err =
nullptr)
const override;
3100 OGR_ALLOW_CAST_TO_THIS(MultiCurve)
3101 OGR_ALLOW_UPCAST_TO(GeometryCollection)
3102 OGR_FORBID_DOWNCAST_TO_MULTIPOINT
3103 OGR_FORBID_DOWNCAST_TO_MULTISURFACE
3104 OGR_FORBID_DOWNCAST_TO_MULTIPOLYGON
3176 OGRErr *err =
nullptr)
const override;
3192 OGR_ALLOW_CAST_TO_THIS(MultiLineString)
3193 OGR_ALLOW_UPCAST_TO(MultiCurve)
3194 OGR_FORBID_DOWNCAST_TO_MULTIPOINT
3195 OGR_FORBID_DOWNCAST_TO_MULTISURFACE
3196 OGR_FORBID_DOWNCAST_TO_MULTIPOLYGON
3221 static OGRErr createFromFgfInternal(
const unsigned char *pabyData,
3225 int *pnBytesConsumed,
3231 static OGRErr createFromWkb(
const void * pabyData,
3236 size_t& nBytesConsumedOut );
3246 CPL_WARN_DEPRECATED(
"Use createFromWkt(const char**, ...) instead")
3248 return createFromWkt( const_cast<const char**>(ppszInput), poSRS, ppoGeom);
3253 static OGRGeometry *createFromGML(
const char * );
3256 static OGRGeometry *createFromGeoJson(
const char *,
int = -1 );
3264 bool bOnlyInOrder =
true );
3271 const char*
const* papszOptions =
nullptr );
3277 int *pbResultValidGeometry,
3278 const char **papszOptions =
nullptr);
3279 static bool haveGEOS();
3286 std::unique_ptr<Private> d;
3295 char** papszOptions,
3299 approximateArcAngles(
double dfX,
double dfY,
double dfZ,
3300 double dfPrimaryRadius,
double dfSecondaryAxis,
3302 double dfStartAngle,
double dfEndAngle,
3303 double dfMaxAngleStepSizeDegrees,
3304 const bool bUseMaxGap =
false );
3306 static int GetCurveParameters(
double x0,
double y0,
3307 double x1,
double y1,
3308 double x2,
double y2,
3309 double& R,
double& cx,
double& cy,
3310 double& alpha0,
double& alpha1,
3313 double x0,
double y0,
double z0,
3314 double x1,
double y1,
double z1,
3315 double x2,
double y2,
double z2,
3317 double dfMaxAngleStepSizeDegrees,
3318 const char*
const * papszOptions =
nullptr );
3319 static OGRCurve* curveFromLineString(
3321 const char*
const * papszOptions =
nullptr);
3328 typedef struct _OGRPreparedGeometry OGRPreparedGeometry;
3330 struct CPL_DLL OGRPreparedGeometryUniquePtrDeleter
3332 void operator()(OGRPreparedGeometry*)
const;
const OGRPolygon * toUpperClass() const
Return pointer of this in upper class.
Definition: ogr_geometry.h:2316
virtual OGRMultiSurface * clone() const override
Make a copy of this object.
Definition: ogrmultisurface.cpp:99
OGRMultiPoint * toMultiPoint()
Down-cast to OGRMultiPoint*.
Definition: ogr_geometry.h:746
virtual void Value(double, OGRPoint *) const =0
Fetch point at given distance along curve.
virtual OGRErr PointOnSurface(OGRPoint *poPoint) const
This method relates to the SFCOM ISurface::get_PointOnSurface() method.
Definition: ogr_geometry.h:1940
const ChildType *const * end() const
Return end of iterator.
Definition: ogr_geometry.h:2184
OGRPoint ChildType
Type of child elements.
Definition: ogr_geometry.h:1253
~OGRPolyhedralSurface() override
Destructor.
virtual size_t WkbSize() const override
Returns size of related binary representation.
Definition: ogrlinestring.cpp:189
virtual void closeRings()
Force rings to be closed.
Definition: ogrgeometry.cpp:5311
virtual OGRwkbGeometryType getGeometryType() const =0
Fetch geometry type.
const OGRGeometryCollection * toUpperClass() const
Return pointer of this in upper class.
Definition: ogr_geometry.h:2983
const OGRLineString * getGeometryRef(int i) const
See OGRGeometryCollection::getGeometryRef()
Definition: ogr_geometry.h:3160
ChildType ** begin()
Return begin of iterator.
Definition: ogr_geometry.h:2939
const ChildType *const * begin() const
Return begin of iterator.
Definition: ogr_geometry.h:3051
virtual void setCoordinateDimension(int nDimension)
Set the coordinate dimension.
Definition: ogrgeometry.cpp:1024
const OGRPolyhedralSurface * toPolyhedralSurface() const
Down-cast to OGRPolyhedralSurface*.
Definition: ogr_geometry.h:823
virtual OGRBoolean IsValid() const
Test if the geometry is valid.
Definition: ogrgeometry.cpp:2145
virtual void getEnvelope(OGREnvelope *psEnvelope) const override
Computes and returns the bounding envelope for this geometry in the passed psEnvelope structure...
Definition: ogrcurvepolygon.cpp:601
OGRMultiLineString * toMultiLineString()
Down-cast to OGRMultiLineString*.
Definition: ogr_geometry.h:760
virtual void set3D(OGRBoolean bIs3D)
Add or remove the Z coordinate dimension.
Definition: ogrgeometry.cpp:1047
OGRWktFormat format
Formatting type.
Definition: ogr_geometry.h:79
virtual OGRBoolean Within(const OGRGeometry *) const
Test for containment.
Definition: ogrgeometry.cpp:5101
virtual std::string exportToWkt(const OGRWktOptions &opts=OGRWktOptions(), OGRErr *err=nullptr) const override
Export a simple curve to WKT.
Definition: ogrlinestring.cpp:1851
virtual void setMeasured(OGRBoolean bIsMeasured)
Add or remove the M coordinate dimension.
Definition: ogrgeometry.cpp:1070
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:2803
virtual OGRwkbGeometryType getGeometryType() const override
Fetch geometry type.
Definition: ogrpolygon.cpp:115
double y
y
Definition: ogr_geometry.h:115
OGRCurve ChildType
Type of child elements.
Definition: ogr_geometry.h:2010
virtual OGRLineString * CurveToLine(double dfMaxAngleStepSizeDegrees=0, const char *const *papszOptions=nullptr) const =0
Return a linestring from a curve geometry.
OGRErr importFromWkb(const GByte *, size_t=static_cast< size_t >(-1), OGRwkbVariant=wkbVariantOldOgc)
Assign geometry from well known binary data.
Definition: ogrgeometry.cpp:1427
Concrete representation of a multi-vertex line.
Definition: ogr_geometry.h:1406
OGRPoint ChildType
Type of child elements.
Definition: ogr_geometry.h:2934
virtual OGRErr importFromWkb(const unsigned char *, size_t, OGRwkbVariant, size_t &nBytesConsumedOut) override
Assign geometry from well known binary data.
Definition: ogrpolygon.cpp:329
OGRCompoundCurve * toCompoundCurve()
Down-cast to OGRCompoundCurve*.
Definition: ogr_geometry.h:662
virtual OGRBoolean isCompatibleSubType(OGRwkbGeometryType) const
Returns whether a geometry of the specified geometry type can be a member of this collection...
Definition: ogrgeometrycollection.cpp:1180
static OGRGeometryH ToHandle(OGRGeometry *poGeom)
Convert a OGRGeometry* to a OGRGeometryH.
Definition: ogr_geometry.h:565
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:1451
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:2105
virtual OGRGeometry * clone() const =0
Make a copy of this object.
virtual void swapXY()
Swap x and y coordinates.
Definition: ogrgeometry.cpp:6001
virtual OGRErr transform(OGRCoordinateTransformation *poCT) override
Apply arbitrary coordinate transformation to geometry.
Definition: ogrlinestring.cpp:2353
Format as F when abs(value) < 1, otherwise as G.
double getX() const
Return x.
Definition: ogr_geometry.h:991
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:1452
OGRCurve * toCurve()
Down-cast to OGRCurve*.
Definition: ogr_geometry.h:592
const OGRPolygon * toPolygon() const
Down-cast to OGRPolygon*.
Definition: ogr_geometry.h:697
const ChildType *const * end() const
Return end of iterator.
Definition: ogr_geometry.h:2519
Create geometry objects from well known text/binary.
Definition: ogr_geometry.h:3219
OGRMultiPolygon * toMultiPolygon()
Down-cast to OGRMultiPolygon*.
Definition: ogr_geometry.h:774
virtual OGRwkbGeometryType getGeometryType() const override
Fetch geometry type.
Definition: ogrmulticurve.cpp:108
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:1545
double x
x
Definition: ogr_geometry.h:113
virtual OGRGeometryCollection * clone() const override
Make a copy of this object.
Definition: ogrgeometrycollection.cpp:152
virtual OGRErr exportToWkb(OGRwkbByteOrder, unsigned char *, OGRwkbVariant=wkbVariantOldOgc) const override
Convert a geometry into well known binary format.
Definition: ogrlinestring.cpp:1633
ChildType ** begin()
Return begin of iterator.
Definition: ogr_geometry.h:3146
virtual const char * getGeometryName() const =0
Fetch WKT name for geometry type.
virtual OGRPolygon * clone() const override
Make a copy of this object.
Definition: ogrpolygon.cpp:105
const ChildType *const * begin() const
Return begin of iterator.
Definition: ogr_geometry.h:3152
virtual OGRErr transform(OGRCoordinateTransformation *poCT) override
Apply arbitrary coordinate transformation to geometry.
Definition: ogrcurvepolygon.cpp:640
ChildType ** end()
Return end of iterator.
Definition: ogr_geometry.h:3148
virtual void set3D(OGRBoolean bIs3D) override
Add or remove the Z coordinate dimension.
Definition: ogrcurvepolygon.cpp:676
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:1647
const OGRLinearRing * toLinearRing() const
Down-cast to OGRLinearRing*.
Definition: ogr_geometry.h:641
OGRPolyhedralSurface()
Create an empty PolyhedralSurface.
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:2802
OGRMultiSurface * toMultiSurface()
Down-cast to OGRMultiSurface*.
Definition: ogr_geometry.h:802
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:85
static OGRGeometry * FromHandle(OGRGeometryH hGeom)
Convert a OGRGeometryH to a OGRGeometry*.
Definition: ogr_geometry.h:571
virtual void setCoordinateDimension(int nDimension) override
Set the coordinate dimension.
Definition: ogrcurvepolygon.cpp:670
ChildType ** end()
Return end of curve iterator.
Definition: ogr_geometry.h:2017
Options for formatting WKT output.
Definition: ogr_geometry.h:69
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:2564
OGRCurve * stealExteriorRingCurve()
"Steal" reference to external ring.
Definition: ogrcurvepolygon.cpp:292
virtual OGRBoolean hasCurveGeometry(int bLookForNonLinear=FALSE) const
Returns if this geometry is or has curve geometry.
Definition: ogrgeometry.cpp:3193
OGRErr exportToWkt(char **ppszDstText, OGRwkbVariant=wkbVariantOldOgc) const
Convert a geometry into well known text format.
Definition: ogrgeometry.cpp:1829
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:2669
const ChildType *const * begin() const
Return begin of iterator.
Definition: ogr_geometry.h:2182
int OGRBoolean
Type for a OGR boolean.
Definition: ogr_core.h:334
OGRCurve * getExteriorRingCurve()
Fetch reference to external polygon ring.
Definition: ogrcurvepolygon.cpp:186
virtual OGRBoolean hasCurveGeometry(int bLookForNonLinear=FALSE) const override
Returns if this geometry is or has curve geometry.
Definition: ogrcurvepolygon.cpp:576
virtual OGRBoolean hasCurveGeometry(int bLookForNonLinear=FALSE) const override
Returns if this geometry is or has curve geometry.
Definition: ogrpolygon.cpp:758
const OGRCircularString * toCircularString() const
Down-cast to OGRCircularString*.
Definition: ogr_geometry.h:655
OGRErr removeRing(int iIndex, bool bDelete=true)
Remove a geometry from the container.
Definition: ogrcurvepolygon.cpp:324
static OGRPolygon * CastToPolygon(OGRCurvePolygon *poCP)
Convert to polygon.
Definition: ogrcurvepolygon.cpp:812
unsigned char GByte
Unsigned byte type.
Definition: cpl_port.h:215
Coordinate systems services.
OGRTriangulatedSurface * toTriangulatedSurface()
Down-cast to OGRTriangulatedSurface*.
Definition: ogr_geometry.h:830
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:1648
virtual OGRGeometry * getLinearGeometry(double dfMaxAngleStepSizeDegrees=0, const char *const *papszOptions=nullptr) const
Return, possibly approximate, non-curve version of this geometry.
Definition: ogrgeometry.cpp:3226
virtual size_t WkbSize() const override
Returns size of related binary representation.
Definition: ogrcurvepolygon.cpp:425
virtual OGRBoolean hasCurveGeometry(int bLookForNonLinear=FALSE) const override
Returns if this geometry is or has curve geometry.
Definition: ogrgeometrycollection.cpp:1191
virtual OGRSurface * clone() const override=0
Make a copy of this object.
OGRRawPoint()
Constructor.
Definition: ogr_geometry.h:107
virtual void EndPoint(OGRPoint *) const =0
Return the curve end point.
OGRSurface ChildType
Type of child elements.
Definition: ogr_geometry.h:2506
const OGRLineString * toLineString() const
Down-cast to OGRLineString*.
Definition: ogr_geometry.h:627
int precision
Precision of output. Interpretation depends on format.
Definition: ogr_geometry.h:75
OGRSurface * getGeometryRef(int i)
See OGRGeometryCollection::getGeometryRef()
Definition: ogr_geometry.h:2551
ChildType ** begin()
Return begin of iterator.
Definition: ogr_geometry.h:2176
virtual void assignSpatialReference(OGRSpatialReference *poSR) override
Assign spatial reference to this object.
Definition: ogrcurvepolygon.cpp:690
A collection of non-overlapping OGRPolygon.
Definition: ogr_geometry.h:2596
const OGRCompoundCurve * toCompoundCurve() const
Down-cast to OGRCompoundCurve*.
Definition: ogr_geometry.h:669
OGRPoint * toPoint()
Down-cast to OGRPoint*.
Definition: ogr_geometry.h:578
virtual void segmentize(double dfMaxLength) override
Modify the geometry such it has no segment longer then the given distance.
Definition: ogrcurvepolygon.cpp:708
const ChildType *const * begin() const
Return begin of iterator.
Definition: ogr_geometry.h:2945
const ChildType *const * end() const
Return end of curve iterator.
Definition: ogr_geometry.h:1820
OGRwkbByteOrder
Enumeration to describe byte order.
Definition: ogr_core.h:527
Concrete representation of a circular string, that is to say a curve made of one or several arc circl...
Definition: ogr_geometry.h:1567
const OGRCurve * getGeometryRef(int i) const
See OGRGeometryCollection::getGeometryRef()
Definition: ogr_geometry.h:3059
OGRCurve ChildType
Type of child elements.
Definition: ogr_geometry.h:3040
virtual OGRLineString * clone() const override
Make a copy of this object.
Definition: ogrlinestring.cpp:2889
virtual void flattenTo2D()=0
Convert geometry to strictly 2D.
Abstract curve base class for OGRLineString, OGRCircularString and OGRCompoundCurve.
Definition: ogr_geometry.h:1069
A collection of 1 or more geometry objects.
Definition: ogr_geometry.h:2340
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:3096
OGRLineString * toUpperClass()
Return pointer of this in upper class.
Definition: ogr_geometry.h:1540
Concrete representation of a closed ring.
Definition: ogr_geometry.h:1482
void setM(double mIn)
Set m.
Definition: ogr_geometry.h:1017
ChildType ** begin()
Return begin of curve iterator.
Definition: ogr_geometry.h:2015
OGRGeometry & operator=(const OGRGeometry &other)
Assignment operator.
Definition: ogrgeometry.cpp:152
virtual double get_Length() const override
Returns the length of the curve.
Definition: ogrlinestring.cpp:1907
virtual const char * getGeometryName() const override
Fetch WKT name for geometry type.
Definition: ogrpolyhedralsurface.cpp:107
OGRTriangle ChildType
Type of child elements.
Definition: ogr_geometry.h:2854
OGRCircularString * toCircularString()
Down-cast to OGRCircularString*.
Definition: ogr_geometry.h:648
static OGRErr createFromWkt(char **ppszInput, OGRSpatialReference *poSRS, OGRGeometry **ppoGeom)
Deprecated.
Definition: ogr_geometry.h:3244
virtual void setMeasured(OGRBoolean bIsMeasured) override
Add or remove the M coordinate dimension.
Definition: ogrcurvepolygon.cpp:681
const OGRTriangle * toTriangle() const
Down-cast to OGRTriangle*.
Definition: ogr_geometry.h:711
ChildType ** end()
Return end of iterator.
Definition: ogr_geometry.h:2513
OGRErr importFromWkt(const char **) override
deprecated
Definition: ogrcurvepolygon.cpp:508
ChildType ** end()
Return end of iterator.
Definition: ogr_geometry.h:2178
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:2887
The CPLJSONArray class holds JSON object from CPLJSONDocument.
Definition: cpl_json.h:53
virtual OGRErr addRingDirectly(OGRCurve *poNewRing) override
Add a ring to a polygon.
Definition: ogrtriangle.cpp:256
virtual void visit(const OGRPoint *)=0
Visit OGRPoint.
const ChildType *const * end() const
Return end of iterator.
Definition: ogr_geometry.h:3154
ChildType ** end()
Return end of iterator.
Definition: ogr_geometry.h:3047
OGRGeometry visitor interface.
Definition: ogr_geometry.h:157
ChildType ** begin()
Return begin of iterator.
Definition: ogr_geometry.h:3045
const OGRCurvePolygon * toUpperClass() const
Return pointer of this in upper class.
Definition: ogr_geometry.h:2243
OGRSurface * toSurface()
Down-cast to OGRSurface*.
Definition: ogr_geometry.h:676
A collection of non-overlapping OGRSurface.
Definition: ogr_geometry.h:2492
virtual double get_Length() const =0
Returns the length of the curve.
virtual const char * getGeometryName() const override
Fetch WKT name for geometry type.
Definition: ogrlinestring.cpp:2764
virtual OGRMultiCurve * clone() const override
Make a copy of this object.
Definition: ogrmulticurve.cpp:98
const OGRPolygon * getGeometryRef(int i) const
See OGRGeometryCollection::getGeometryRef()
Definition: ogr_geometry.h:2642
OGRSimpleCurve * toSimpleCurve()
Down-cast to OGRSimpleCurve*.
Definition: ogr_geometry.h:606
virtual OGRErr addGeometry(const OGRGeometry *) override
Add a new geometry to a collection.
Definition: ogrtriangulatedsurface.cpp:190
const ChildType *const * end() const
Return end of iterator.
Definition: ogr_geometry.h:2867
ChildType ** end()
Return end of curve iterator.
Definition: ogr_geometry.h:1814
virtual OGRGeometry * getLinearGeometry(double dfMaxAngleStepSizeDegrees=0, const char *const *papszOptions=nullptr) const override
Return, possibly approximate, non-curve version of this geometry.
Definition: ogrcurvepolygon.cpp:591
const ChildType *const * begin() const
Return begin of sub-geometry iterator.
Definition: ogr_geometry.h:2380
virtual OGRwkbGeometryType getGeometryType() const override
Returns the WKB Type of PolyhedralSurface.
Definition: ogrpolyhedralsurface.cpp:121
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:2392
double getX(int i) const
Get X at vertex.
Definition: ogr_geometry.h:1323
OGRSimpleCurve & operator=(const OGRSimpleCurve &other)
Assignment operator.
Definition: ogrlinestring.cpp:116
void visit(OGRPoint *) override
Visit OGRPoint.
Definition: ogr_geometry.h:210
OGRLineString ChildType
Type of child elements.
Definition: ogr_geometry.h:3141
virtual OGRErr exportToWkb(OGRwkbByteOrder, unsigned char *, OGRwkbVariant=wkbVariantOldOgc) const override
Convert a geometry into well known binary format.
Definition: ogrcurvepolygon.cpp:480
virtual OGRErr importFromWkt(const char **ppszInput)=0
Assign geometry from well known text data.
OGRErr importFromWkt(const char **) override
deprecated
Definition: ogrlinestring.cpp:1732
const OGRPoint * getGeometryRef(int i) const
See OGRGeometryCollection::getGeometryRef()
Definition: ogr_geometry.h:2953
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:766
Utility class to store a collection of curves.
Definition: ogr_geometry.h:1768
Simple container for a position.
Definition: ogr_geometry.h:103
OGRPolyhedralSurface * toUpperClass()
Return pointer of this in upper class.
Definition: ogr_geometry.h:2883
OGRwkbGeometryType
List of well known binary geometry types.
Definition: ogr_core.h:345
const ChildType *const * end() const
Return end of curve iterator.
Definition: ogr_geometry.h:2023
virtual OGRBoolean hasCurveGeometry(int bLookForNonLinear=FALSE) const override
Returns if this geometry is or has curve geometry.
Definition: ogrmultisurface.cpp:287
OGRTriangle * getGeometryRef(int i)
See OGRPolyhedralSurface::getGeometryRef()
Definition: ogr_geometry.h:2875
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:2888
OGRCurvePolygon * toUpperClass()
Return pointer of this in upper class.
Definition: ogr_geometry.h:2241
const OGRPoint * toPoint() const
Down-cast to OGRPoint*.
Definition: ogr_geometry.h:585
OGRWktOptions()
Constructor.
Definition: ogr_geometry.h:82
virtual const char * getGeometryName() const override
Fetch WKT name for geometry type.
Definition: ogrcurvepolygon.cpp:160
const OGRGeometryCollection * toUpperClass() const
Return pointer of this in upper class.
Definition: ogr_geometry.h:3185
virtual OGRBoolean Intersects(const OGRGeometry *) const
Do these features intersect?
Definition: ogrgeometry.cpp:504
virtual OGRBoolean hasCurveGeometry(int bLookForNonLinear=FALSE) const override
Returns if this geometry is or has curve geometry.
Definition: ogrmulticurve.cpp:196
OGRMultiSurface & operator=(const OGRMultiSurface &other)
Assignment operator.
Definition: ogrmultisurface.cpp:86
virtual void assignSpatialReference(OGRSpatialReference *poSR)
Assign spatial reference to this object.
Definition: ogrgeometry.cpp:434
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:2458
ChildType ** begin()
Return begin of curve iterator.
Definition: ogr_geometry.h:1812
const OGRSimpleCurve * toSimpleCurve() const
Down-cast to OGRSimpleCurve*.
Definition: ogr_geometry.h:1153
bool round
Whether GDAL-special rounding should be applied.
Definition: ogr_geometry.h:77
virtual OGRwkbGeometryType getGeometryType() const override
Fetch geometry type.
Definition: ogrmultisurface.cpp:109
Interface for a point iterator.
Definition: ogr_geometry.h:1051
TriangulatedSurface class.
Definition: ogr_geometry.h:2833
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:2985
const OGRSimpleCurve * toUpperClass() const
Return pointer of this in upper class.
Definition: ogr_geometry.h:1645
A collection of OGRCurve.
Definition: ogr_geometry.h:3022
const OGRGeometryCollection * toUpperClass() const
Return pointer of this in upper class.
Definition: ogr_geometry.h:2667
virtual OGRCurve * clone() const override=0
Make a copy of this object.
virtual double get_AreaOfCurveSegments() const override
Return area of curve segments.
Definition: ogrcompoundcurve.cpp:894
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:2459
Abstract base class for 2 dimensional objects like polygons or curve polygons.
Definition: ogr_geometry.h:1930
OGRGeometry visitor interface.
Definition: ogr_geometry.h:231
A collection of OGRLineString.
Definition: ogr_geometry.h:3127
virtual int getDimension() const override
Get the dimension of this object.
Definition: ogrgeometrycollection.cpp:179
OGRCurvePolygon * toCurvePolygon()
Down-cast to OGRCurvePolygon*.
Definition: ogr_geometry.h:718
const OGRSurface * getGeometryRef(int i) const
See OGRGeometryCollection::getGeometryRef()
Definition: ogr_geometry.h:2553
Abstract base class for all geometry classes.
Definition: ogr_geometry.h:326
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:2565
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:806
OGRGeometryCollection * toUpperClass()
Return pointer of this in upper class.
Definition: ogr_geometry.h:3183
OGRMultiCurve * toMultiCurve()
Down-cast to OGRMultiCurve*.
Definition: ogr_geometry.h:788
OGRPolyhedralSurface * toPolyhedralSurface()
Down-cast to OGRPolyhedralSurface*.
Definition: ogr_geometry.h:816
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:2986
void setX(double xIn)
Set x.
Definition: ogr_geometry.h:1004
virtual std::string exportToWkt(const OGRWktOptions &opts=OGRWktOptions(), OGRErr *err=nullptr) const override
Export a curve polygon to WKT.
Definition: ogrcurvepolygon.cpp:523
const OGRGeometryCollection * toUpperClass() const
Return pointer of this in upper class.
Definition: ogr_geometry.h:2562
void sfcgal_geometry_t
SFCGAL geometry type.
Definition: ogr_geometry.h:123
ChildType ** begin()
Return begin of iterator.
Definition: ogr_geometry.h:2859
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:2245
virtual OGRCurvePolygon * clone() const override
Make a copy of this object.
Definition: ogrcurvepolygon.cpp:103
static OGRLinearRing * CastToLinearRing(OGRCurve *poCurve)
Cast to linear ring.
Definition: ogrcurve.cpp:375
virtual OGRSimpleCurve * clone() const override=0
Make a copy of this object.
virtual double get_Area() const =0
Get the area of the surface object.
char ** CSLConstList
Type of a constant null-terminated list of nul terminated strings.
Definition: cpl_port.h:1169
OGRTriangle & operator=(const OGRTriangle &other)
Assignment operator.
Definition: ogrtriangle.cpp:138
double getM() const
Return m.
Definition: ogr_geometry.h:997
OGRPolyhedralSurface & operator=(const OGRPolyhedralSurface &other)
Assignment operator.
Definition: ogrpolyhedralsurface.cpp:82
const ChildType *const * begin() const
Return begin of curve iterator.
Definition: ogr_geometry.h:2021
virtual int ContainsPoint(const OGRPoint *p) const
Returns if a point is contained in a (closed) curve.
Definition: ogrcurve.cpp:396
struct GEOSGeom_t * GEOSGeom
GEOS geometry type.
Definition: ogr_geometry.h:119
OGRGeometry visitor default implementation.
Definition: ogr_geometry.h:204
virtual int getNumPoints() const override
Fetch vertex count.
Definition: ogr_geometry.h:1321
virtual void flattenTo2D() override
Convert geometry to strictly 2D.
Definition: ogrcurvepolygon.cpp:150
OGRLineString & operator=(const OGRLineString &other)
Assignment operator.
Definition: ogrlinestring.cpp:2734
ChildType ** begin()
Return begin of iterator.
Definition: ogr_geometry.h:2628
virtual void empty() override
Clear geometry information.
Definition: ogrcurvepolygon.cpp:113
OGRTriangle * toTriangle()
Down-cast to OGRTriangle*.
Definition: ogr_geometry.h:704
void setZ(double zIn)
Set z.
Definition: ogr_geometry.h:1012
OGRErr removeGeometry(int iIndex, int bDelete=TRUE)
Remove a geometry from the container.
Definition: ogrpolyhedralsurface.cpp:957
OGRPoint ChildType
Type of child elements.
Definition: ogr_geometry.h:1112
OGRLineString * getGeometryRef(int i)
See OGRGeometryCollection::getGeometryRef()
Definition: ogr_geometry.h:3158
double getY() const
Return y.
Definition: ogr_geometry.h:993
Core portability services for cross-platform OGR code.
virtual int IntersectsPoint(const OGRPoint *p) const
Returns if a point intersects a (closed) curve.
Definition: ogrcurve.cpp:416
ChildType ** end()
Return end of sub-geometry iterator.
Definition: ogr_geometry.h:2376
virtual int getDimension() const =0
Get the dimension of this object.
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:1544
OGRLineString * toLineString()
Down-cast to OGRLineString*.
Definition: ogr_geometry.h:620
Concrete class representing curve polygons.
Definition: ogr_geometry.h:1972
OGRLinearRing * toLinearRing()
Down-cast to OGRLinearRing*.
Definition: ogr_geometry.h:634
OGRBoolean IsMeasured() const
Definition: ogr_geometry.h:407
virtual OGRBoolean isCompatibleSubType(OGRwkbGeometryType) const override
Returns whether a geometry of the specified geometry type can be a member of this collection...
Definition: ogrmulticurve.cpp:145
const OGRTriangulatedSurface * toTriangulatedSurface() const
Down-cast to OGRTriangulatedSurface*.
Definition: ogr_geometry.h:837
int getNumInteriorRings() const
Fetch the number of internal rings.
Definition: ogrcurvepolygon.cpp:223
const OGRSimpleCurve * toSimpleCurve() const
Down-cast to OGRSimpleCurve*.
Definition: ogr_geometry.h:613
virtual void getEnvelope(OGREnvelope *psEnvelope) const override
Computes and returns the bounding envelope for this geometry in the passed psEnvelope structure...
Definition: ogrlinestring.cpp:2250
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:2319
PolyhedralSurface class.
Definition: ogr_geometry.h:2700
const OGRMultiCurve * toMultiCurve() const
Down-cast to OGRMultiCurve*.
Definition: ogr_geometry.h:795
const ChildType *const * begin() const
Return begin of iterator.
Definition: ogr_geometry.h:2738
OGRGeometryCollection * toUpperClass()
Return pointer of this in upper class.
Definition: ogr_geometry.h:3091
Various convenience functions for CPL.
void setY(double yIn)
Set y.
Definition: ogr_geometry.h:1008
virtual void visit(OGRPoint *)=0
Visit OGRPoint.
OGRPolygon * getGeometryRef(int i)
See OGRGeometryCollection::getGeometryRef()
Definition: ogr_geometry.h:2640
This class represents an OpenGIS Spatial Reference System, and contains methods for converting betwee...
Definition: ogr_spatialref.h:157
virtual double get_AreaOfCurveSegments() const =0
Get the area of the purely curve portions of a (closed) curve.
OGRGeometryCollection * toUpperClass()
Return pointer of this in upper class.
Definition: ogr_geometry.h:2981
virtual const char * getGeometryName() const override
Fetch WKT name for geometry type.
Definition: ogrpolygon.cpp:132
OGRCurve ChildType
Type of child elements.
Definition: ogr_geometry.h:1807
Simple container for a bounding region in 3D.
Definition: ogr_core.h:175
Old-style 99-402 extended dimension (Z) WKB types.
Definition: ogr_core.h:463
virtual OGRErr importFromWkb(const unsigned char *, size_t, OGRwkbVariant, size_t &nBytesConsumedOut) override
Assign geometry from well known binary data.
Definition: ogrlinestring.cpp:1516
ChildType ** begin()
Return begin of iterator.
Definition: ogr_geometry.h:2511
const ChildType *const * end() const
Return end of iterator.
Definition: ogr_geometry.h:2740
const OGRGeometryCollection * toGeometryCollection() const
Down-cast to OGRGeometryCollection*.
Definition: ogr_geometry.h:739
double getY(int i) const
Get Y at vertex.
Definition: ogr_geometry.h:1324
OGRCurvePolygon()
Create an empty curve polygon.
const OGRMultiPoint * toMultiPoint() const
Down-cast to OGRMultiPoint*.
Definition: ogr_geometry.h:753
OGRGeometryCollection * toUpperClass()
Return pointer of this in upper class.
Definition: ogr_geometry.h:2560
std::unique_ptr< OGRGeometry, OGRGeometryUniquePtrDeleter > OGRGeometryUniquePtr
Unique pointer type for OGRGeometry.
Definition: ogr_geometry.h:852
Interface for read and write JSON documents.
virtual void swapXY() override
Swap x and y coordinates.
Definition: ogrcurvepolygon.cpp:722
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:2246
const OGRPolyhedralSurface * toUpperClass() const
Return pointer of this in upper class.
Definition: ogr_geometry.h:2885
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:1031
virtual OGRErr exportToWkb(OGRwkbByteOrder, unsigned char *, OGRwkbVariant=wkbVariantOldOgc) const override
Convert a geometry into well known binary format.
Definition: ogrpolygon.cpp:383
virtual OGRErr addGeometry(const OGRGeometry *)
Add a new geometry to a collection.
Definition: ogrpolyhedralsurface.cpp:730
virtual OGRErr addRingDirectly(OGRCurve *)
Add a ring to a polygon.
Definition: ogrcurvepolygon.cpp:404
Point class.
Definition: ogr_geometry.h:935
void * OGRGeometryH
Opaque type for a geometry.
Definition: ogr_api.h:65
virtual const char * getGeometryName() const override
Fetch WKT name for geometry type.
Definition: ogrmultisurface.cpp:136
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:3187
const ChildType *const * end() const
Return end of iterator.
Definition: ogr_geometry.h:2947
OGRPoint * getGeometryRef(int i)
See OGRGeometryCollection::getGeometryRef()
Definition: ogr_geometry.h:2951
virtual OGRPolyhedralSurface * clone() const override
Make a copy of this object.
Definition: ogrpolyhedralsurface.cpp:97
OGRwkbVariant
Output variants of WKB we support.
Definition: ogr_core.h:461
virtual OGRBoolean IsEmpty() const override
Returns TRUE (non-zero) if the object has no points.
Definition: ogr_geometry.h:986
const OGRSurface * toSurface() const
Down-cast to OGRSurface*.
Definition: ogr_geometry.h:683
OGRLinearRing ChildType
Type of child elements.
Definition: ogr_geometry.h:2171
virtual size_t WkbSize() const =0
Returns size of related binary representation.
const ChildType *const * end() const
Return end of iterator.
Definition: ogr_geometry.h:3053
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:111
virtual OGRGeometry * getCurveGeometry(const char *const *papszOptions=nullptr) const
Return curve version of this geometry.
Definition: ogrgeometry.cpp:3261
const OGRCurvePolygon * toCurvePolygon() const
Down-cast to OGRCurvePolygon*.
Definition: ogr_geometry.h:725
virtual OGRBoolean Equals(const OGRGeometry *) const =0
Returns TRUE if two geometries are equivalent.
virtual void segmentize(double dfMaxLength) override
Modify the geometry such it has no segment longer then the given distance.
Definition: ogrlinestring.cpp:2474
OGRGeometryCollection * toUpperClass()
Return pointer of this in upper class.
Definition: ogr_geometry.h:2665
OGRSimpleCurve * toSimpleCurve()
Down-cast to OGRSimpleCurve*.
Definition: ogr_geometry.h:1148
OGRPolygon * toPolygon()
Down-cast to OGRPolygon*.
Definition: ogr_geometry.h:690
Concrete class representing polygons.
Definition: ogr_geometry.h:2138
Simple container for a bounding region (rectangle)
Definition: ogr_core.h:57
Abstract curve base class for OGRLineString and OGRCircularString.
Definition: ogr_geometry.h:1186
const OGRGeometryCollection * toUpperClass() const
Return pointer of this in upper class.
Definition: ogr_geometry.h:3093
struct GEOSContextHandle_HS * GEOSContextHandle_t
GEOS context handle type.
Definition: ogr_geometry.h:121
virtual int getNumPoints() const =0
Return the number of points of a curve geometry.
OGRGeometryCollection * toGeometryCollection()
Down-cast to OGRGeometryCollection*.
Definition: ogr_geometry.h:732
OGRGeometry ChildType
Type of child elements.
Definition: ogr_geometry.h:2369
OGRPolygon * getGeometryRef(int i)
Fetch geometry from container.
Definition: ogrpolyhedralsurface.cpp:820
OGRwkbVariant variant
Type of WKT output to produce.
Definition: ogr_geometry.h:73
virtual OGRBoolean isCompatibleSubType(OGRwkbGeometryType) const override
Returns whether a geometry of the specified geometry type can be a member of this collection...
Definition: ogrmultisurface.cpp:147
OGRWktFormat
WKT Output formatting options.
Definition: ogr_geometry.h:61
OGRGeometry visitor default implementation.
Definition: ogr_geometry.h:278
virtual std::string exportToWkt(const OGRWktOptions &opts=OGRWktOptions(), OGRErr *err=nullptr) const override
Export a geometry collection to WKT.
Definition: ogrmultisurface.cpp:276
OGRCurve * getGeometryRef(int i)
See OGRGeometryCollection::getGeometryRef()
Definition: ogr_geometry.h:3057
const OGRTriangle * getGeometryRef(int i) const
See OGRPolyhedralSurface::getGeometryRef()
Definition: ogr_geometry.h:2877
virtual OGRwkbGeometryType getGeometryType() const override
Fetch geometry type.
Definition: ogrgeometrycollection.cpp:162
OGRRawPoint(double xIn, double yIn)
Constructor.
Definition: ogr_geometry.h:110
void visit(const OGRPoint *) override
Visit OGRPoint.
Definition: ogr_geometry.h:284
OGRSimpleCurve * toUpperClass()
Return pointer of this in upper class.
Definition: ogr_geometry.h:1447
virtual OGRwkbGeometryType getGeometryType() const override
Fetch geometry type.
Definition: ogrcurvepolygon.cpp:123
const OGRCurve * toCurve() const
Down-cast to OGRCurve*.
Definition: ogr_geometry.h:599
OGRPolygon ChildType
Type of child elements.
Definition: ogr_geometry.h:2623
ChildType ** end()
Return end of iterator.
Definition: ogr_geometry.h:2734
static OGRMultiPolygon * CastToMultiPolygon(OGRPolyhedralSurface *poPS)
Casts the OGRPolyhedralSurface to an OGRMultiPolygon.
Definition: ogrpolyhedralsurface.cpp:709
virtual std::string exportToWkt(const OGRWktOptions &opts=OGRWktOptions(), OGRErr *err=nullptr) const override
Export a multicurve to WKT.
Definition: ogrmulticurve.cpp:185
const OGRMultiSurface * toMultiSurface() const
Down-cast to OGRMultiSurface*.
Definition: ogr_geometry.h:809
ChildType ** end()
Return end of iterator.
Definition: ogr_geometry.h:2630
const ChildType *const * begin() const
Return begin of iterator.
Definition: ogr_geometry.h:2517
OGRGeometry * getGeometryRef(int)
Fetch geometry from container.
Definition: ogrgeometrycollection.cpp:262
virtual OGRPolygon * CurvePolyToPoly(double dfMaxAngleStepSizeDegrees=0, const char *const *papszOptions=nullptr) const
Return a polygon from a curve polygon.
Definition: ogrcurvepolygon.cpp:551
OGRSimpleCurve * toUpperClass()
Return pointer of this in upper class.
Definition: ogr_geometry.h:1643
std::unique_ptr< OGRPreparedGeometry, OGRPreparedGeometryUniquePtrDeleter > OGRPreparedGeometryUniquePtr
Unique pointer type for OGRPreparedGeometry.
Definition: ogr_geometry.h:3339
OGRErr importFromWkt(const char **) override
deprecated
Definition: ogrgeometrycollection.cpp:778
OGRPolygon * toUpperClass()
Return pointer of this in upper class.
Definition: ogr_geometry.h:2314
OGRLayer::FeatureIterator begin(OGRLayer *poLayer)
Return begin of feature iterator.
Definition: ogrsf_frmts.h:287
virtual OGRBoolean IsEmpty() const override
Returns TRUE (non-zero) if the object has no points.
Definition: ogrcurvepolygon.cpp:699
const ChildType *const * end() const
Return end of iterator.
Definition: ogr_geometry.h:2636
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:1030
virtual OGRErr addRing(OGRCurve *)
Add a ring to a polygon.
Definition: ogrcurvepolygon.cpp:347
OGRErr importFromWkt(char **ppszInput)
Deprecated.
Definition: ogr_geometry.h:430
virtual OGRPointIterator * getPointIterator() const =0
Returns a point iterator over the curve.
OGRCurvePolygon & operator=(const OGRCurvePolygon &other)
Assignment operator.
Definition: ogrcurvepolygon.cpp:88
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:1900
Triangle class.
Definition: ogr_geometry.h:2276
ChildType ** begin()
Return begin of iterator.
Definition: ogr_geometry.h:2732
OGRPolygon & operator=(const OGRPolygon &other)
Assignment operator.
Definition: ogrpolygon.cpp:92
static OGRLineString * CastToLineString(OGRCurve *poCurve)
Cast to linestring.
Definition: ogrcurve.cpp:353
virtual OGRErr transform(OGRCoordinateTransformation *poCT)=0
Apply arbitrary coordinate transformation to geometry.
virtual size_t WkbSize() const override
Returns size of related binary representation.
Definition: ogrpolygon.cpp:309
OGRPolygon ChildType
Type of child elements.
Definition: ogr_geometry.h:2727
const ChildType *const * end() const
Return end of sub-geometry iterator.
Definition: ogr_geometry.h:2382
virtual const char * getGeometryName() const override
Fetch WKT name for geometry type.
Definition: ogrmulticurve.cpp:135
const OGRLineString * toUpperClass() const
Return pointer of this in upper class.
Definition: ogr_geometry.h:1542
int OGRErr
Type for a OGR error.
Definition: ogr_core.h:318
bool operator==(const OGRGeometry &other) const
Returns if two geometries are equal.
Definition: ogr_geometry.h:390
virtual void Value(double, OGRPoint *) const override
Fetch point at given distance along curve.
Definition: ogrlinestring.cpp:1949
ChildType ** end()
Return end of iterator.
Definition: ogr_geometry.h:2941
virtual OGRBoolean Contains(const OGRGeometry *) const
Test for containment.
Definition: ogrgeometry.cpp:5175
const OGRMultiPolygon * toMultiPolygon() const
Down-cast to OGRMultiPolygon*.
Definition: ogr_geometry.h:781
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:3188
bool operator!=(const OGRGeometry &other) const
Returns if two geometries are different.
Definition: ogr_geometry.h:393
int getNumGeometries() const
Fetch number of geometries in PolyhedralSurface.
Definition: ogrpolyhedralsurface.cpp:798
const ChildType *const * begin() const
Return begin of curve iterator.
Definition: ogr_geometry.h:1818
const char * OGRToOGCGeomType(OGRwkbGeometryType eGeomType)
Map OGR geometry format constants to corresponding OGC geometry type.
Definition: ogrgeometry.cpp:2465
OGRLayer::FeatureIterator end(OGRLayer *poLayer)
Return end of feature iterator.
Definition: ogrsf_frmts.h:292
const OGRMultiLineString * toMultiLineString() const
Down-cast to OGRMultiLineString*.
Definition: ogr_geometry.h:767
virtual std::string exportToWkt(const OGRWktOptions &opts=OGRWktOptions(), OGRErr *err=nullptr) const override
Export a polygon to WKT.
Definition: ogrpolygon.cpp:632
A collection of OGRPoint.
Definition: ogr_geometry.h:2917
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:2104
virtual const char * getGeometryName() const override
Fetch WKT name for geometry type.
Definition: ogrgeometrycollection.cpp:218
const ChildType *const * begin() const
Return begin of iterator.
Definition: ogr_geometry.h:2865
const ChildType *const * begin() const
Return begin of iterator.
Definition: ogr_geometry.h:2634
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:2670
double getZ() const
Return z.
Definition: ogr_geometry.h:995
OGRBoolean Is3D() const
Definition: ogr_geometry.h:405
OGRCurve * getInteriorRingCurve(int)
Fetch reference to indicated internal ring.
Definition: ogrcurvepolygon.cpp:251
ChildType ** begin()
Return begin of sub-geometry iterator.
Definition: ogr_geometry.h:2374
virtual OGRBoolean IsEmpty() const =0
Returns TRUE (non-zero) if the object has no points.
const OGRSimpleCurve * toUpperClass() const
Return pointer of this in upper class.
Definition: ogr_geometry.h:1449
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:1901
ChildType ** end()
Return end of iterator.
Definition: ogr_geometry.h:2861
virtual OGRPolygon * CurvePolyToPoly(double dfMaxAngleStepSizeDegrees=0, const char *const *papszOptions=nullptr) const override
Return a polygon from a curve polygon.
Definition: ogrpolygon.cpp:747
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:3095
#define CPL_WARN_UNUSED_RESULT
Qualifier to warn when the return value of a function is not used.
Definition: cpl_port.h:894
virtual std::string exportToWkt(const OGRWktOptions &opts=OGRWktOptions(), OGRErr *err=nullptr) const override
Export a geometry collection to WKT.
Definition: ogrgeometrycollection.cpp:791
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:2318
virtual OGRErr importFromWkb(const unsigned char *, size_t, OGRwkbVariant, size_t &nBytesConsumedOut) override
Assign geometry from well known binary data.
Definition: ogrcurvepolygon.cpp:449
virtual OGRBoolean Equals(const OGRGeometry *) const override
Returns TRUE if two geometries are equivalent.
Definition: ogrcurvepolygon.cpp:621