Go to the documentation of this file.
32 #ifndef OGR_GEOMETRY_H_INCLUDED
33 #define OGR_GEOMETRY_H_INCLUDED
49 #ifndef DEFINEH_OGRGeometryH
50 #define DEFINEH_OGRGeometryH
198 virtual void visit(
const OGRPoint*) = 0;
293 friend class OGRCurveCollection;
295 unsigned int flags = 0;
297 OGRErr importPreambleFromWkt(
const char ** ppszInput,
298 int* pbHasZ,
int* pbHasM,
300 OGRErr importCurveCollectionFromWkt(
301 const char ** ppszInput,
302 int bAllowEmptyComponent,
303 int bAllowLineString,
305 int bAllowCompoundCurve,
308 OGRErr importPreambleFromWkb(
const unsigned char * pabyData,
312 OGRErr importPreambleOfCollectionFromWkb(
313 const unsigned char * pabyData,
323 void HomogenizeDimensionalityWith(
OGRGeometry* poOtherGeom );
337 static const unsigned int OGR_G_NOT_EMPTY_POINT = 0x1;
338 static const unsigned int OGR_G_3D = 0x2;
339 static const unsigned int OGR_G_MEASURED = 0x4;
349 bool operator==(
const OGRGeometry& other )
const {
return CPL_TO_BOOL(Equals(&other)); }
352 bool operator!=(
const OGRGeometry& other )
const {
return !CPL_TO_BOOL(Equals(&other)); }
355 virtual int getDimension()
const = 0;
356 virtual int getCoordinateDimension()
const;
357 int CoordinateDimension()
const;
363 OGRBoolean Is3D()
const {
return flags & OGR_G_3D; }
365 OGRBoolean IsMeasured()
const {
return flags & OGR_G_MEASURED; }
367 virtual void empty() = 0;
369 virtual
void getEnvelope( OGREnvelope * psEnvelope ) const = 0;
370 virtual
void getEnvelope( OGREnvelope3D * psEnvelope ) const = 0;
373 virtual
int WkbSize() const = 0;
376 virtual
OGRErr importFromWkb( const
unsigned char *,
379 int& nBytesConsumedOut ) = 0;
382 virtual
OGRErr importFromWkt( const
char ** ppszInput ) = 0;
387 OGRErr importFromWkt(
char ** ppszInput ) CPL_WARN_DEPRECATED("Use importFromWkt(const
char**) instead")
389 return importFromWkt( const_cast<const char**>(ppszInput) );
392 virtual OGRErr exportToWkt(
char ** ppszDstText,
398 virtual const char *getGeometryName()
const = 0;
399 virtual void dumpReadable( FILE *,
const char * =
nullptr
400 ,
char** papszOptions =
nullptr )
const;
401 virtual void flattenTo2D() = 0;
402 virtual char * exportToGML(
const char*
const * papszOptions =
nullptr )
const;
403 virtual char * exportToKML()
const;
404 virtual char * exportToJson()
const;
416 virtual OGRBoolean hasCurveGeometry(
int bLookForNonLinear = FALSE)
const;
420 double dfMaxAngleStepSizeDegrees = 0,
428 virtual
void closeRings();
430 virtual
void setCoordinateDimension(
int nDimension );
432 virtual
void setMeasured(
OGRBoolean bIsMeasured );
440 virtual void segmentize(
double dfMaxLength);
456 virtual
double Distance( const
OGRGeometry * ) const ;
458 virtual
OGRGeometry *Buffer(
double dfDist,
int nQuadSegs = 30 )
472 OGRGeometry *SimplifyPreserveTopology(
double dTolerance)
479 virtual
double Distance3D( const
OGRGeometry *poOtherGeom ) const;
484 const CPL_WARN_DEPRECATED("Non standard method. "
485 "Use Intersects() instead");
487 const CPL_WARN_DEPRECATED("Non standard method. "
488 "Use Equals() instead");
490 const CPL_WARN_DEPRECATED("Non standard method. "
491 "Use SymDifference() instead");
493 const CPL_WARN_DEPRECATED("Non standard method. "
494 "Use Boundary() instead");
499 static
int bGenerate_DB2_V72_BYTE_ORDER;
502 virtual
void swapXY();
512 {
return reinterpret_cast<OGRGeometryH>(poGeom); }
518 {
return reinterpret_cast<OGRGeometry*>(hGeom); }
525 {
return cpl::down_cast<OGRPoint*>(
this); }
531 inline const OGRPoint* toPoint()
const
532 {
return cpl::down_cast<const OGRPoint*>(
this); }
539 {
return cpl::down_cast<OGRCurve*>(
this); }
545 inline const OGRCurve* toCurve()
const
546 {
return cpl::down_cast<const OGRCurve*>(
this); }
553 {
return cpl::down_cast<OGRSimpleCurve*>(
this); }
560 {
return cpl::down_cast<const OGRSimpleCurve*>(
this); }
567 {
return cpl::down_cast<OGRLineString*>(
this); }
574 {
return cpl::down_cast<const OGRLineString*>(
this); }
581 {
return cpl::down_cast<OGRLinearRing*>(
this); }
588 {
return cpl::down_cast<const OGRLinearRing*>(
this); }
595 {
return cpl::down_cast<OGRCircularString*>(
this); }
602 {
return cpl::down_cast<const OGRCircularString*>(
this); }
609 {
return cpl::down_cast<OGRCompoundCurve*>(
this); }
616 {
return cpl::down_cast<const OGRCompoundCurve*>(
this); }
623 {
return cpl::down_cast<OGRSurface*>(
this); }
630 {
return cpl::down_cast<const OGRSurface*>(
this); }
637 {
return cpl::down_cast<OGRPolygon*>(
this); }
644 {
return cpl::down_cast<const OGRPolygon*>(
this); }
651 {
return cpl::down_cast<OGRTriangle*>(
this); }
658 {
return cpl::down_cast<const OGRTriangle*>(
this); }
665 {
return cpl::down_cast<OGRCurvePolygon*>(
this); }
672 {
return cpl::down_cast<const OGRCurvePolygon*>(
this); }
679 {
return cpl::down_cast<OGRGeometryCollection*>(
this); }
686 {
return cpl::down_cast<const OGRGeometryCollection*>(
this); }
693 {
return cpl::down_cast<OGRMultiPoint*>(
this); }
700 {
return cpl::down_cast<const OGRMultiPoint*>(
this); }
707 {
return cpl::down_cast<OGRMultiLineString*>(
this); }
714 {
return cpl::down_cast<const OGRMultiLineString*>(
this); }
721 {
return cpl::down_cast<OGRMultiPolygon*>(
this); }
728 {
return cpl::down_cast<const OGRMultiPolygon*>(
this); }
735 {
return cpl::down_cast<OGRMultiCurve*>(
this); }
742 {
return cpl::down_cast<const OGRMultiCurve*>(
this); }
749 {
return cpl::down_cast<OGRMultiSurface*>(
this); }
756 {
return cpl::down_cast<const OGRMultiSurface*>(
this); }
763 {
return cpl::down_cast<OGRPolyhedralSurface*>(
this); }
770 {
return cpl::down_cast<const OGRPolyhedralSurface*>(
this); }
777 {
return cpl::down_cast<OGRTriangulatedSurface*>(
this); }
784 {
return cpl::down_cast<const OGRTriangulatedSurface*>(
this); }
789 struct CPL_DLL OGRGeometryUniquePtrDeleter
820 OGRPoint(
double x,
double y,
double z );
821 OGRPoint(
double x,
double y,
double z,
double m );
832 int& nBytesConsumedOut )
override;
845 virtual void empty()
override;
846 virtual void getEnvelope( OGREnvelope * psEnvelope )
const override;
847 virtual void getEnvelope( OGREnvelope3D * psEnvelope )
const override;
849 {
return !(flags & OGR_G_NOT_EMPTY_POINT); }
853 double getX()
const {
return x; }
855 double getY()
const {
return y; }
857 double getZ()
const {
return z; }
859 double getM()
const {
return m; }
866 void setX(
double xIn ) { x = xIn; flags |= OGR_G_NOT_EMPTY_POINT; }
870 void setY(
double yIn ) { y = yIn; flags |= OGR_G_NOT_EMPTY_POINT; }
874 void setZ(
double zIn )
875 { z = zIn; flags |= (OGR_G_NOT_EMPTY_POINT | OGR_G_3D); }
879 void setM(
double mIn )
880 { m = mIn; flags |= (OGR_G_NOT_EMPTY_POINT | OGR_G_MEASURED); }
895 virtual void swapXY()
override;
933 virtual OGRCurveCasterToLineString GetCasterToLineString()
const = 0;
934 virtual OGRCurveCasterToLinearRing GetCasterToLinearRing()
const = 0;
945 class CPL_DLL ConstIterator
948 std::unique_ptr<Private> m_poPrivate;
950 ConstIterator(
const OGRCurve* poSelf,
bool bStart);
951 ConstIterator(ConstIterator&& oOther) noexcept;
954 ConstIterator& operator++();
955 bool operator!=(
const ConstIterator& it)
const;
979 ConstIterator
begin()
const;
981 ConstIterator
end()
const;
984 virtual double get_Length()
const = 0;
985 virtual void StartPoint(
OGRPoint * )
const = 0;
986 virtual void EndPoint(
OGRPoint * )
const = 0;
987 virtual int get_IsClosed()
const;
988 virtual void Value(
double,
OGRPoint * )
const = 0;
989 virtual OGRLineString* CurveToLine(
double dfMaxAngleStepSizeDegrees = 0,
990 const char*
const* papszOptions =
nullptr)
992 virtual int getDimension()
const override;
995 virtual int getNumPoints()
const = 0;
998 virtual double get_Area()
const = 0;
1003 {
return cpl::down_cast<OGRSimpleCurve*>(
this); }
1008 {
return cpl::down_cast<const OGRSimpleCurve*>(
this); }
1017 inline OGRCurve::ConstIterator
begin(
const OGRCurve* poCurve) {
return poCurve->begin(); }
1019 inline OGRCurve::ConstIterator
end(
const OGRCurve* poCurve) {
return poCurve->end(); }
1051 OGRErr importFromWKTListOnly(
const char ** ppszInput,
int bHasZ,
int bHasM,
1058 virtual double get_LinearArea()
const;
1064 class CPL_DLL Iterator
1067 std::unique_ptr<Private> m_poPrivate;
1071 Iterator(Iterator&& oOther) noexcept;
1074 Iterator& operator++();
1075 bool operator!=(
const Iterator& it)
const;
1081 class CPL_DLL ConstIterator
1084 std::unique_ptr<Private> m_poPrivate;
1087 ConstIterator(ConstIterator&& oOther) noexcept;
1090 ConstIterator& operator++();
1091 bool operator!=(
const ConstIterator& it)
const;
1124 ConstIterator
begin()
const;
1126 ConstIterator
end()
const;
1129 virtual int WkbSize()
const override;
1130 virtual OGRErr importFromWkb(
const unsigned char *,
1133 int& nBytesConsumedOut )
override;
1138 OGRErr importFromWkt(
const char ** )
override;
1139 virtual OGRErr exportToWkt(
char ** ppszDstText,
1145 virtual void empty()
override;
1146 virtual void getEnvelope( OGREnvelope * psEnvelope )
const override;
1147 virtual void getEnvelope( OGREnvelope3D * psEnvelope )
const override;
1151 virtual double get_Length()
const override;
1152 virtual void StartPoint(
OGRPoint * )
const override;
1153 virtual void EndPoint(
OGRPoint * )
const override;
1154 virtual void Value(
double,
OGRPoint * )
const override;
1155 virtual double Project(
const OGRPoint * )
const;
1156 virtual OGRLineString* getSubLine(
double,
double,
int )
const;
1159 virtual int getNumPoints()
const override {
return nPointCount; }
1161 double getX(
int i )
const {
return paoPoints[i].
x; }
1162 double getY(
int i )
const {
return paoPoints[i].
y; }
1163 double getZ(
int i )
const;
1164 double getM(
int i )
const;
1170 virtual void setCoordinateDimension(
int nDimension )
override;
1171 virtual void set3D(
OGRBoolean bIs3D )
override;
1172 virtual void setMeasured(
OGRBoolean bIsMeasured )
override;
1173 void setNumPoints(
int nNewPointCount,
1174 int bZeroizeNewContent = TRUE );
1176 void setPoint(
int,
double,
double );
1177 void setZ(
int,
double );
1178 void setM(
int,
double );
1179 void setPoint(
int,
double,
double,
double );
1180 void setPointM(
int,
double,
double,
double );
1181 void setPoint(
int,
double,
double,
double,
double );
1182 void setPoints(
int,
const OGRRawPoint *,
const double * =
nullptr );
1183 void setPointsM(
int,
const OGRRawPoint *,
const double * );
1184 void setPoints(
int,
const OGRRawPoint *,
const double *,
const double * );
1185 void setPoints(
int,
const double * padfX,
const double * padfY,
1186 const double *padfZIn =
nullptr );
1187 void setPointsM(
int,
const double * padfX,
const double * padfY,
1188 const double *padfMIn =
nullptr );
1189 void setPoints(
int,
const double * padfX,
const double * padfY,
1190 const double *padfZIn,
const double *padfMIn );
1192 void addPoint(
double,
double );
1193 void addPoint(
double,
double,
double );
1194 void addPointM(
double,
double,
double );
1195 void addPoint(
double,
double,
double,
double );
1197 void getPoints(
OGRRawPoint *,
double * =
nullptr )
const;
1198 void getPoints(
void* pabyX,
int nXStride,
1199 void* pabyY,
int nYStride,
1200 void* pabyZ =
nullptr,
int nZStride = 0 )
const;
1201 void getPoints(
void* pabyX,
int nXStride,
1202 void* pabyY,
int nYStride,
1203 void* pabyZ,
int nZStride,
1204 void* pabyM,
int nMStride )
const;
1207 int nStartVertex = 0,
int nEndVertex = -1 );
1208 void reversePoints(
void );
1213 virtual void flattenTo2D()
override;
1214 virtual void segmentize(
double dfMaxLength)
override;
1216 virtual void swapXY()
override;
1221 inline OGRSimpleCurve::Iterator
begin(
OGRSimpleCurve* poCurve) {
return poCurve->begin(); }
1223 inline OGRSimpleCurve::Iterator
end(
OGRSimpleCurve* poCurve) {
return poCurve->end(); }
1226 inline OGRSimpleCurve::ConstIterator
begin(
const OGRSimpleCurve* poCurve) {
return poCurve->begin(); }
1228 inline OGRSimpleCurve::ConstIterator
end(
const OGRSimpleCurve* poCurve) {
return poCurve->end(); }
1253 virtual OGRCurveCasterToLineString GetCasterToLineString()
1255 virtual OGRCurveCasterToLinearRing GetCasterToLinearRing()
1271 const char*
const* papszOptions =
nullptr )
1274 const char*
const* papszOptions =
nullptr )
const override;
1275 virtual double get_Area()
const override;
1284 inline const OGRSimpleCurve* toUpperClass()
const {
return this; }
1324 virtual int _WkbSize(
int _flags )
const;
1326 const unsigned char *,
int,
1327 int& nBytesConsumedOut );
1329 unsigned char * )
const;
1331 virtual OGRCurveCasterToLineString GetCasterToLineString()
1333 virtual OGRCurveCasterToLinearRing GetCasterToLinearRing()
1350 virtual int isClockwise()
const;
1351 virtual void reverseWindingOrder();
1354 int bTestEnvelope = TRUE )
const;
1356 int bTestEnvelope = TRUE )
const;
1370 virtual int WkbSize()
const override;
1374 int& nBytesConsumedOut )
override;
1399 void ExtendEnvelopeWithCircular( OGREnvelope * psEnvelope )
const;
1401 int IsFullCircle(
double& cx,
double& cy,
double& square_R )
const;
1405 virtual OGRCurveCasterToLineString GetCasterToLineString()
1407 virtual OGRCurveCasterToLinearRing GetCasterToLinearRing()
1425 int& nBytesConsumedOut )
override;
1437 virtual void getEnvelope( OGREnvelope * psEnvelope )
const override;
1438 virtual void getEnvelope( OGREnvelope3D * psEnvelope )
const override;
1443 const char*
const* papszOptions =
nullptr )
1446 virtual double get_Area()
const override;
1451 virtual void segmentize(
double dfMaxLength )
override;
1455 double dfMaxAngleStepSizeDegrees = 0,
1456 const char*
const* papszOptions =
nullptr)
const override;
1461 inline const OGRSimpleCurve* toUpperClass()
const {
return this; }
1481 class CPL_DLL OGRCurveCollection
1490 int nCurveCount = 0;
1494 OGRCurveCollection();
1495 OGRCurveCollection(
const OGRCurveCollection& other);
1496 ~OGRCurveCollection();
1498 OGRCurveCollection&
operator=(
const OGRCurveCollection& other);
1508 OGRCurve**
end() {
return papoCurves + nCurveCount; }
1514 const OGRCurve*
const*
end()
const {
return papoCurves + nCurveCount; }
1518 void getEnvelope( OGREnvelope * psEnvelope )
const;
1519 void getEnvelope( OGREnvelope3D * psEnvelope )
const;
1525 const unsigned char * pabyData,
1529 int nMinSubGeomSize,
1531 OGRErr importBodyFromWkb(
1533 const unsigned char * pabyData,
1535 int bAcceptCompoundCurve,
1539 int& nBytesConsumedOut );
1541 char ** ppszDstText )
const;
1547 int nNewDimension );
1551 int getNumCurves()
const;
1553 const OGRCurve *getCurve(
int )
const;
1556 OGRErr removeCurve(
int iIndex,
bool bDelete =
true );
1584 OGRCurveCollection oCC{};
1587 double dfToleranceEps,
1593 OGRLineString* CurveToLineInternal(
double dfMaxAngleStepSizeDegrees,
1594 const char*
const* papszOptions,
1595 int bIsLinearRing )
const;
1606 virtual OGRCurveCasterToLineString GetCasterToLineString()
1608 virtual OGRCurveCasterToLinearRing GetCasterToLinearRing()
1625 ChildType**
begin() {
return oCC.begin(); }
1627 ChildType**
end() {
return oCC.end(); }
1631 const ChildType*
const *
begin()
const {
return oCC.begin(); }
1633 const ChildType*
const *
end()
const {
return oCC.end(); }
1636 virtual int WkbSize()
const override;
1640 int& nBytesConsumedOut )
override;
1652 virtual void empty()
override;
1653 virtual void getEnvelope( OGREnvelope * psEnvelope )
const override;
1654 virtual void getEnvelope( OGREnvelope3D * psEnvelope )
const override;
1663 const char*
const* papszOptions =
nullptr )
1668 virtual double get_Area()
const override;
1674 int getNumCurves()
const;
1676 const OGRCurve *getCurve(
int )
const;
1686 OGRErr addCurveDirectly(
OGRCurve*,
double dfToleranceEps = 1e-14 );
1695 virtual void segmentize(
double dfMaxLength)
override;
1699 double dfMaxAngleStepSizeDegrees = 0,
1700 const char*
const* papszOptions =
nullptr)
const override;
1704 virtual void swapXY()
override;
1732 virtual OGRSurfaceCasterToPolygon GetCasterToPolygon()
const = 0;
1733 virtual OGRSurfaceCasterToCurvePolygon GetCasterToCurvePolygon()
const = 0;
1737 virtual double get_Area()
const = 0;
1739 {
return PointOnSurfaceInternal(poPoint); }
1770 virtual int checkRing(
OGRCurve * poNewRing )
const;
1782 OGRCurveCollection oCC{};
1784 virtual OGRSurfaceCasterToPolygon GetCasterToPolygon()
1786 virtual OGRSurfaceCasterToCurvePolygon GetCasterToCurvePolygon()
1813 const ChildType*
const *
end()
const {
return oCC.end(); }
1819 virtual void empty()
override;
1823 virtual void segmentize(
double dfMaxLength )
override;
1827 double dfMaxAngleStepSizeDegrees = 0,
1828 const char*
const* papszOptions =
nullptr )
const override;
1831 virtual double get_Area()
const override;
1834 virtual int WkbSize()
const override;
1838 int& nBytesConsumedOut )
override;
1850 virtual void getEnvelope( OGREnvelope * psEnvelope )
const override;
1851 virtual void getEnvelope( OGREnvelope3D * psEnvelope )
const override;
1855 double dfMaxAngleStepSizeDegrees = 0,
1856 const char*
const* papszOptions =
nullptr )
const;
1885 virtual void swapXY()
override;
1923 virtual int checkRing(
OGRCurve * poNewRing )
const override;
1924 virtual OGRErr importFromWKTListOnly(
const char ** ppszInput,
1925 int bHasZ,
int bHasM,
1932 virtual OGRSurfaceCasterToPolygon GetCasterToPolygon()
1934 virtual OGRSurfaceCasterToCurvePolygon GetCasterToCurvePolygon()
1951 ChildType**
begin() {
return reinterpret_cast<ChildType**>(oCC.begin()); }
1953 ChildType**
end() {
return reinterpret_cast<ChildType**>(oCC.end()); }
1957 const ChildType*
const*
begin()
const {
return reinterpret_cast<const ChildType* const*>(oCC.begin()); }
1959 const ChildType*
const*
end()
const {
return reinterpret_cast<const ChildType* const*>(oCC.end()); }
1967 const char*
const* papszOptions =
nullptr )
const override;
1969 double dfMaxAngleStepSizeDegrees = 0,
1970 const char*
const* papszOptions =
nullptr)
const override;
1973 virtual int WkbSize()
const override;
1977 int& nBytesConsumedOut )
override;
1990 double dfMaxAngleStepSizeDegrees = 0,
1991 const char*
const* papszOptions =
nullptr )
const override;
2041 bool quickValidityCheck()
const;
2045 virtual OGRSurfaceCasterToPolygon GetCasterToPolygon()
const override;
2046 virtual OGRErr importFromWKTListOnly(
const char ** ppszInput,
2047 int bHasZ,
int bHasM,
2050 double*& padfZ )
override;
2067 int& nBytesConsumedOut )
override;
2098 OGRErr importFromWkbInternal(
const unsigned char * pabyData,
2102 OGRErr importFromWktInternal(
const char **ppszInput,
int nRecLevel );
2109 OGRErr exportToWktInternal(
char ** ppszDstText,
2111 const char* pszSkipPrefix )
const;
2131 ChildType**
begin() {
return papoGeoms; }
2133 ChildType**
end() {
return papoGeoms + nGeomCount; }
2137 const ChildType*
const*
begin()
const {
return papoGeoms; }
2139 const ChildType*
const*
end()
const {
return papoGeoms + nGeomCount; }
2145 virtual void empty()
override;
2149 virtual void segmentize(
double dfMaxLength)
override;
2153 const char*
const* papszOptions =
nullptr )
const override;
2155 double dfMaxAngleStepSizeDegrees = 0,
2156 const char*
const* papszOptions =
nullptr )
const override;
2159 virtual int WkbSize()
const override;
2163 int& nBytesConsumedOut )
override;
2174 virtual double get_Length()
const;
2175 virtual double get_Area()
const;
2179 virtual void getEnvelope( OGREnvelope * psEnvelope )
const override;
2180 virtual void getEnvelope( OGREnvelope3D * psEnvelope )
const override;
2183 int getNumGeometries()
const;
2196 virtual OGRErr removeGeometry(
int iIndex,
int bDelete = TRUE );
2202 virtual void swapXY()
override;
2252 ChildType**
begin() {
return reinterpret_cast<ChildType**>(papoGeoms); }
2254 ChildType**
end() {
return reinterpret_cast<ChildType**>(papoGeoms + nGeomCount); }
2258 const ChildType*
const*
begin()
const {
return reinterpret_cast<const ChildType* const*>(papoGeoms); }
2260 const ChildType*
const*
end()
const {
return reinterpret_cast<const ChildType* const*>(papoGeoms + nGeomCount); }
2322 OGRErr _addGeometryWithExpectedSubGeometryType(
2325 OGRErr _addGeometryDirectlyWithExpectedSubGeometryType(
2344 ChildType**
begin() {
return reinterpret_cast<ChildType**>(papoGeoms); }
2346 ChildType**
end() {
return reinterpret_cast<ChildType**>(papoGeoms + nGeomCount); }
2350 const ChildType*
const*
begin()
const {
return reinterpret_cast<const ChildType* const*>(papoGeoms); }
2352 const ChildType*
const*
end()
const {
return reinterpret_cast<const ChildType* const*>(papoGeoms + nGeomCount); }
2403 virtual OGRSurfaceCasterToPolygon GetCasterToPolygon()
2405 virtual OGRSurfaceCasterToCurvePolygon GetCasterToCurvePolygon()
2408 virtual const char* getSubGeometryName()
const;
2411 const char* pszSkipPrefix )
const;
2413 virtual OGRPolyhedralSurfaceCastToMultiPolygon GetCasterToMultiPolygon()
2438 const ChildType*
const*
end()
const {
return oMP.end(); }
2441 virtual int WkbSize()
const override;
2447 int& nBytesConsumedOut )
override;
2460 virtual void empty()
override;
2463 virtual void getEnvelope( OGREnvelope * psEnvelope )
const override;
2464 virtual void getEnvelope( OGREnvelope3D * psEnvelope )
const override;
2469 virtual double get_Area()
const override;
2485 virtual void swapXY()
override;
2522 virtual const char* getSubGeometryName()
const override;
2525 virtual OGRPolyhedralSurfaceCastToMultiPolygon GetCasterToMultiPolygon()
2542 ChildType**
begin() {
return reinterpret_cast<ChildType**>(oMP.begin()); }
2544 ChildType**
end() {
return reinterpret_cast<ChildType**>(oMP.end()); }
2548 const ChildType*
const*
begin()
const {
return reinterpret_cast<const ChildType* const*>(oMP.begin()); }
2550 const ChildType*
const*
end()
const {
return reinterpret_cast<const ChildType* const*>(oMP.end()); }
2594 OGRErr importFromWkt_Bracketed(
const char **,
int bHasM,
int bHasZ );
2613 ChildType**
begin() {
return reinterpret_cast<ChildType**>(papoGeoms); }
2615 ChildType**
end() {
return reinterpret_cast<ChildType**>(papoGeoms + nGeomCount); }
2619 const ChildType*
const*
begin()
const {
return reinterpret_cast<const ChildType* const*>(papoGeoms); }
2621 const ChildType*
const*
end()
const {
return reinterpret_cast<const ChildType* const*>(papoGeoms + nGeomCount); }
2692 ChildType**
begin() {
return reinterpret_cast<ChildType**>(papoGeoms); }
2694 ChildType**
end() {
return reinterpret_cast<ChildType**>(papoGeoms + nGeomCount); }
2698 const ChildType*
const*
begin()
const {
return reinterpret_cast<const ChildType* const*>(papoGeoms); }
2700 const ChildType*
const*
end()
const {
return reinterpret_cast<const ChildType* const*>(papoGeoms + nGeomCount); }
2767 ChildType**
begin() {
return reinterpret_cast<ChildType**>(papoGeoms); }
2769 ChildType**
end() {
return reinterpret_cast<ChildType**>(papoGeoms + nGeomCount); }
2773 const ChildType*
const*
begin()
const {
return reinterpret_cast<const ChildType* const*>(papoGeoms); }
2775 const ChildType*
const*
end()
const {
return reinterpret_cast<const ChildType* const*>(papoGeoms + nGeomCount); }
2820 static OGRErr createFromFgfInternal(
const unsigned char *pabyData,
2824 int *pnBytesConsumed,
2830 static OGRErr createFromWkb(
const void * pabyData,
2835 int& nBytesConsumedOut );
2845 CPL_WARN_DEPRECATED(
"Use createFromWkt(const char**, ...) instead")
2847 return createFromWkt( const_cast<const char**>(ppszInput), poSRS, ppoGeom);
2852 static OGRGeometry *createFromGML(
const char * );
2855 static OGRGeometry *createFromGeoJson(
const char *);
2863 bool bOnlyInOrder =
true );
2870 const char*
const* papszOptions =
nullptr );
2874 int *pbResultValidGeometry,
2875 const char **papszOptions =
nullptr);
2876 static bool haveGEOS();
2879 class CPL_DLL TransformWithOptionsCache
2883 std::unique_ptr<Private> d;
2886 TransformWithOptionsCache();
2887 ~TransformWithOptionsCache();
2892 char** papszOptions,
2893 const TransformWithOptionsCache& cache = TransformWithOptionsCache() );
2896 approximateArcAngles(
double dfX,
double dfY,
double dfZ,
2897 double dfPrimaryRadius,
double dfSecondaryAxis,
2899 double dfStartAngle,
double dfEndAngle,
2900 double dfMaxAngleStepSizeDegrees );
2902 static int GetCurveParmeters(
double x0,
double y0,
2903 double x1,
double y1,
2904 double x2,
double y2,
2905 double& R,
double& cx,
double& cy,
2906 double& alpha0,
double& alpha1,
2909 double x0,
double y0,
double z0,
2910 double x1,
double y1,
double z1,
2911 double x2,
double y2,
double z2,
2913 double dfMaxAngleStepSizeDegrees,
2914 const char*
const * papszOptions =
nullptr );
2915 static OGRCurve* curveFromLineString(
2917 const char*
const * papszOptions =
nullptr);
2934 struct CPL_DLL OGRPreparedGeometryUniquePtrDeleter
virtual void visit(OGRPoint *)=0
Visit OGRPoint.
virtual void getEnvelope(OGREnvelope *psEnvelope) const override
Computes and returns the bounding envelope for this geometry in the passed psEnvelope structure.
Definition: ogrlinestring.cpp:2310
virtual void getEnvelope(OGREnvelope *psEnvelope) const override
Computes and returns the bounding envelope for this geometry in the passed psEnvelope structure.
Definition: ogrcurvepolygon.cpp:619
virtual OGRBoolean IsEmpty() const =0
Returns TRUE (non-zero) if the object has no points.
virtual void setCoordinateDimension(int nDimension)
Set the coordinate dimension.
Definition: ogrgeometry.cpp:1002
virtual OGRErr addRingDirectly(OGRCurve *)
Add a ring to a polygon.
Definition: ogrcurvepolygon.cpp:419
ChildType ** begin()
Return begin of iterator.
Definition: ogr_geometry.h:2766
A collection of OGRCurve.
Definition: ogr_geometry.h:2668
static OGRLineString * CastToLineString(OGRCurve *poCurve)
Cast to linestring.
Definition: ogrcurve.cpp:352
OGRRawPoint()
Constructor.
Definition: ogr_geometry.h:66
virtual OGRBoolean isCompatibleSubType(OGRwkbGeometryType) const
Returns whether a geometry of the specified geometry type can be a member of this collection.
Definition: ogrgeometrycollection.cpp:1280
ChildType ** end()
Return end of iterator.
Definition: ogr_geometry.h:2431
virtual double get_Area() const =0
Get the area of the surface object.
virtual OGRErr exportToWkt(char **, OGRwkbVariant=wkbVariantOldOgc) const override
Convert a geometry into well known text format.
Definition: ogrmulticurve.cpp:174
virtual double get_AreaOfCurveSegments() const =0
Get the area of the purely curve portions of a (closed) curve.
Concrete representation of a multi-vertex line.
Definition: ogr_geometry.h:1241
int getNumGeometries() const
Fetch number of geometries in PolyhedralSurface.
Definition: ogrpolyhedralsurface.cpp:908
virtual OGRBoolean Contains(const OGRGeometry *) const
Test for containment.
Definition: ogrgeometry.cpp:4909
A collection of non-overlapping OGRPolygon.
Definition: ogr_geometry.h:2311
unsigned char GByte
Unsigned byte type.
Definition: cpl_port.h:214
static OGRMultiPolygon * CastToMultiPolygon(OGRPolyhedralSurface *poPS)
Casts the OGRPolyhedralSurface to an OGRMultiPolygon.
Definition: ogrpolyhedralsurface.cpp:819
OGRErr addGeometryDirectly(OGRGeometry *poNewGeom)
Add a geometry directly to the container.
Definition: ogrpolyhedralsurface.cpp:876
Interface for a point iterator.
Definition: ogr_geometry.h:907
OGRSurface ChildType
Type of child elements.
Definition: ogr_geometry.h:2246
ChildType ** begin()
Return begin of iterator.
Definition: ogr_geometry.h:2251
virtual void flattenTo2D() override
Convert geometry to strictly 2D. In a sense this converts all Z coordinates to 0.0.
Definition: ogrcurvepolygon.cpp:165
virtual void closeRings()
Force rings to be closed.
Definition: ogrgeometry.cpp:5045
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:2286
Utility class to store a collection of curves.
Definition: ogr_geometry.h:1580
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:2007
virtual OGRwkbGeometryType getGeometryType() const =0
Fetch geometry type.
virtual void swapXY()
Swap x and y coordinates.
Definition: ogrgeometry.cpp:5735
OGRErr importFromWkt(const char **) override
deprecated
Definition: ogrlinestring.cpp:1750
virtual OGRwkbGeometryType getGeometryType() const override
Returns the WKB Type of PolyhedralSurface.
Definition: ogrpolyhedralsurface.cpp:108
OGRSimpleCurve * toUpperClass()
Return pointer of this in upper class.
Definition: ogr_geometry.h:1281
virtual OGRBoolean hasCurveGeometry(int bLookForNonLinear=FALSE) const override
Returns if this geometry is or has curve geometry.
Definition: ogrgeometrycollection.cpp:1291
OGRLayer::FeatureIterator begin(OGRLayer *poLayer)
Return begin of feature iterator.
Definition: ogrsf_frmts.h:286
virtual OGRBoolean IsEmpty() const override
Returns TRUE (non-zero) if the object has no points.
Definition: ogrcurvepolygon.cpp:717
OGRGeometry visitor interface.
Definition: ogr_geometry.h:190
virtual OGRErr exportToWkb(OGRwkbByteOrder, unsigned char *, OGRwkbVariant=wkbVariantOldOgc) const override
Convert a geometry into well known binary format.
Definition: ogrlinestring.cpp:1652
ConstIterator end() const
Return end of a point iterator.
Definition: ogrcurve.cpp:622
ChildType ** end()
Return end of iterator.
Definition: ogr_geometry.h:2543
ConstIterator begin() const
Return begin of a point iterator.
Definition: ogrcurve.cpp:617
virtual OGRPolygon * CurvePolyToPoly(double dfMaxAngleStepSizeDegrees=0, const char *const *papszOptions=nullptr) const
Return a polygon from a curve polygon.
Definition: ogrcurvepolygon.cpp:569
ChildType ** begin()
Return begin of curve iterator.
Definition: ogr_geometry.h:1624
virtual void set3D(OGRBoolean bIs3D)
Add or remove the Z coordinate dimension.
Definition: ogrgeometry.cpp:1025
Create geometry objects from well known text/binary.
Definition: ogr_geometry.h:2817
virtual OGRGeometry * getCurveGeometry(const char *const *papszOptions=nullptr) const CPL_WARN_UNUSED_RESULT
Return curve version of this geometry.
Definition: ogrgeometry.cpp:3157
virtual OGRErr importFromWkb(const unsigned char *, int, OGRwkbVariant, int &nBytesConsumedOut) override
Assign geometry from well known binary data.
Definition: ogrpolygon.cpp:317
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:2488
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:134
ChildType ** end()
Return end of iterator.
Definition: ogr_geometry.h:2614
OGRCurve * getExteriorRingCurve()
Fetch reference to external polygon ring.
Definition: ogrcurvepolygon.cpp:201
OGRLinearRing ChildType
Type of child elements.
Definition: ogr_geometry.h:1945
virtual OGRBoolean hasCurveGeometry(int bLookForNonLinear=FALSE) const override
Returns if this geometry is or has curve geometry.
Definition: ogrcurvepolygon.cpp:594
A collection of 1 or more geometry objects.
Definition: ogr_geometry.h:2095
virtual OGRBoolean hasCurveGeometry(int bLookForNonLinear=FALSE) const
Returns if this geometry is or has curve geometry.
Definition: ogrgeometry.cpp:3089
Old-style 99-402 extended dimension (Z) WKB types.
Definition: ogr_core.h:424
This class represents an OpenGIS Spatial Reference System, and contains methods for converting betwee...
Definition: ogr_spatialref.h:155
virtual OGRErr exportToWkt(char **ppszDstText, OGRwkbVariant=wkbVariantOldOgc) const override
Convert a geometry into well known text format.
Definition: ogrgeometrycollection.cpp:804
virtual const char * getGeometryName() const override
Fetch WKT name for geometry type.
Definition: ogrpolyhedralsurface.cpp:94
PolyhedralSurface class.
Definition: ogr_geometry.h:2396
virtual void Value(double, OGRPoint *) const =0
Fetch point at given distance along curve.
virtual const char * getGeometryName() const override
Fetch WKT name for geometry type.
Definition: ogrgeometrycollection.cpp:231
Abstract base class for all geometry classes.
Definition: ogr_geometry.h:285
A collection of OGRPoint.
Definition: ogr_geometry.h:2590
virtual OGRBoolean IsValid() const
Test if the geometry is valid.
Definition: ogrgeometry.cpp:2047
virtual const char * getGeometryName() const =0
Fetch WKT name for geometry type.
virtual const char * getGeometryName() const override
Fetch WKT name for geometry type.
Definition: ogrpolygon.cpp:120
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:2008
virtual OGRErr exportToWkt(char **, OGRwkbVariant=wkbVariantOldOgc) const override
Convert a geometry into well known text format.
Definition: ogrmultisurface.cpp:265
ChildType ** begin()
Return begin of iterator.
Definition: ogr_geometry.h:2429
OGRErr importFromWkb(const GByte *, int=-1, OGRwkbVariant=wkbVariantOldOgc)
Assign geometry from well known binary data.
Definition: ogrgeometry.cpp:1368
A collection of non-overlapping OGRSurface.
Definition: ogr_geometry.h:2232
Point class.
Definition: ogr_geometry.h:809
virtual OGRErr exportToWkb(OGRwkbByteOrder, unsigned char *, OGRwkbVariant=wkbVariantOldOgc) const override
Convert a geometry into well known binary format.
Definition: ogrpolygon.cpp:371
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:2721
virtual OGRErr addGeometry(const OGRGeometry *) override
Add a new geometry to a collection.
Definition: ogrtriangulatedsurface.cpp:179
virtual OGRGeometry * getLinearGeometry(double dfMaxAngleStepSizeDegrees=0, const char *const *papszOptions=nullptr) const CPL_WARN_UNUSED_RESULT
Return, possibly approximate, non-curve version of this geometry.
Definition: ogrgeometry.cpp:3122
virtual void empty() override
Clear geometry information. This restores the geometry to its initial state after construction,...
Definition: ogrcurvepolygon.cpp:128
OGRGeometry & operator=(const OGRGeometry &other)
Assignment operator.
Definition: ogrgeometry.cpp:137
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:2369
virtual OGRErr importFromWkt(const char **ppszInput)=0
Assign geometry from well known text data.
OGRPolygon & operator=(const OGRPolygon &other)
Assignment operator.
Definition: ogrpolygon.cpp:90
int OGRBoolean
Type for a OGR boolean.
Definition: ogr_core.h:305
double x
x
Definition: ogr_geometry.h:72
ChildType ** end()
Return end of iterator.
Definition: ogr_geometry.h:2693
virtual const char * getGeometryName() const override
Fetch WKT name for geometry type.
Definition: ogrlinestring.cpp:2798
virtual void accept(IOGRGeometryVisitor *visitor)=0
Accept a visitor.
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:2203
virtual OGRErr PointOnSurface(OGRPoint *poPoint) const
This method relates to the SFCOM ISurface::get_PointOnSurface() method.
Definition: ogr_geometry.h:1737
virtual OGRErr exportToWkb(OGRwkbByteOrder, unsigned char *, OGRwkbVariant=wkbVariantOldOgc) const =0
Convert a geometry into well known binary format.
ChildType ** begin()
Return begin of iterator.
Definition: ogr_geometry.h:2343
Simple container for a position.
Definition: ogr_geometry.h:62
A collection of OGRLineString.
Definition: ogr_geometry.h:2747
OGRCurve ChildType
Type of child elements.
Definition: ogr_geometry.h:1799
virtual OGRGeometry * clone() const CPL_WARN_UNUSED_RESULT=0
Make a copy of this object.
virtual OGRErr exportToWkt(char **ppszDstText, OGRwkbVariant eWkbVariant=wkbVariantOldOgc) const override
Convert a geometry into well known text format.
Definition: ogrcurvepolygon.cpp:539
virtual void flattenTo2D()=0
Convert geometry to strictly 2D. In a sense this converts all Z coordinates to 0.0.
virtual void StartPoint(OGRPoint *) const =0
Return the curve start point.
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:136
virtual int WkbSize() const override
Returns size of related binary representation.
Definition: ogrcurvepolygon.cpp:440
virtual OGRErr addGeometry(const OGRGeometry *)
Add a new geometry to a collection.
Definition: ogrpolyhedralsurface.cpp:840
Abstract base class for 2 dimensional objects like polygons or curve polygons.
Definition: ogr_geometry.h:1727
OGRSimpleCurve & operator=(const OGRSimpleCurve &other)
Assignment operator.
Definition: ogrlinestring.cpp:113
virtual OGRBoolean hasCurveGeometry(int bLookForNonLinear=FALSE) const override
Returns if this geometry is or has curve geometry.
Definition: ogrmultisurface.cpp:276
virtual int getNumPoints() const =0
Return the number of points of a curve geometry.
OGRwkbByteOrder
Enumeration to describe byte order.
Definition: ogr_core.h:488
OGRPolyhedralSurface * toUpperClass()
Return pointer of this in upper class.
Definition: ogr_geometry.h:2559
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:1463
OGRTriangle & operator=(const OGRTriangle &other)
Assignment operator.
Definition: ogrtriangle.cpp:137
OGRTriangle ChildType
Type of child elements.
Definition: ogr_geometry.h:2536
Concrete representation of a circular string, that is to say a curve made of one or several arc circl...
Definition: ogr_geometry.h:1395
OGRCurvePolygon()
Create an empty curve polygon.
virtual OGRwkbGeometryType getGeometryType() const override
Fetch geometry type.
Definition: ogrmulticurve.cpp:97
virtual OGRBoolean Intersects(const OGRGeometry *) const
Do these features intersect?
Definition: ogrgeometry.cpp:486
virtual OGRPolygon * CurvePolyToPoly(double dfMaxAngleStepSizeDegrees=0, const char *const *papszOptions=nullptr) const override
Return a polygon from a curve polygon.
Definition: ogrpolygon.cpp:817
The CPLJSONArray class holds JSON object from CPLJSONDocument.
Definition: cpl_json.h:52
OGRGeometryCollection & operator=(const OGRGeometryCollection &other)
Assignment operator.
Definition: ogrgeometrycollection.cpp:109
int OGRHasPreparedGeometrySupport()
Returns if GEOS has prepared geometry support.
Definition: ogrgeometry.cpp:5783
virtual void set3D(OGRBoolean bIs3D) override
Add or remove the Z coordinate dimension.
Definition: ogrcurvepolygon.cpp:694
ChildType ** begin()
Return begin of iterator.
Definition: ogr_geometry.h:2691
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:2285
OGRGeometry ChildType
Type of child elements.
Definition: ogr_geometry.h:2125
virtual OGRErr importFromWkb(const unsigned char *, int, OGRwkbVariant, int &nBytesConsumedOut) override
Assign geometry from well known binary data.
Definition: ogrlinestring.cpp:1536
void sfcgal_geometry_t
SFCGAL geometry type.
Definition: ogr_geometry.h:82
virtual OGRErr transform(OGRCoordinateTransformation *poCT) override
Apply arbitrary coordinate transformation to geometry.
Definition: ogrcurvepolygon.cpp:658
virtual OGRLineString * CurveToLine(double dfMaxAngleStepSizeDegrees=0, const char *const *papszOptions=nullptr) const =0
Return a linestring from a curve geometry.
~OGRPolyhedralSurface() override
Destructor.
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:2077
OGRErr importFromWkt(const char **) override
deprecated
Definition: ogrgeometrycollection.cpp:791
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:1286
virtual int ContainsPoint(const OGRPoint *p) const
Returns if a point is contained in a (closed) curve.
Definition: ogrcurve.cpp:395
virtual void setCoordinateDimension(int nDimension) override
Set the coordinate dimension.
Definition: ogrcurvepolygon.cpp:688
ChildType ** end()
Return end of curve iterator.
Definition: ogr_geometry.h:1806
OGRGeometryCollection * toUpperClass()
Return pointer of this in upper class.
Definition: ogr_geometry.h:2281
virtual OGRErr importFromWkb(const unsigned char *, int, OGRwkbVariant, int &nBytesConsumedOut) override
Assign geometry from well known binary data.
Definition: ogrcurvepolygon.cpp:464
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:892
OGRErr removeGeometry(int iIndex, int bDelete=TRUE)
Remove a geometry from the container.
Definition: ogrpolyhedralsurface.cpp:1067
virtual void assignSpatialReference(OGRSpatialReference *poSR)
Assign spatial reference to this object.
Definition: ogrgeometry.cpp:416
virtual OGRwkbGeometryType getGeometryType() const override
Fetch geometry type.
Definition: ogrcurvepolygon.cpp:138
OGRGeometryCollection * toUpperClass()
Return pointer of this in upper class.
Definition: ogr_geometry.h:2717
static OGRPolygon * CastToPolygon(OGRCurvePolygon *poCP)
Convert to polygon.
Definition: ogrcurvepolygon.cpp:830
virtual OGRwkbGeometryType getGeometryType() const override
Fetch geometry type.
Definition: ogrpolygon.cpp:103
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:2204
OGRGeometry * getGeometryRef(int i)
Fetch geometry from container.
Definition: ogrpolyhedralsurface.cpp:930
virtual void EndPoint(OGRPoint *) const =0
Return the curve end point.
virtual void empty()=0
Clear geometry information. This restores the geometry to its initial state after construction,...
OGRCurve ChildType
Type of child elements.
Definition: ogr_geometry.h:2686
Abstract curve base class for OGRLineString and OGRCircularString.
Definition: ogr_geometry.h:1034
void OGRDestroyPreparedGeometry(OGRPreparedGeometry *poPreparedGeom)
Destroys a prepared geometry.
Definition: ogrgeometry.cpp:5839
OGRwkbGeometryType OGRFromOGCGeomType(const char *pszGeomType)
Map OGCgeometry format type to corresponding OGR constants.
Definition: ogrgeometry.cpp:2288
struct _OGRPreparedGeometry OGRPreparedGeometry
Prepared geometry API (needs GEOS >= 3.1.0)
Definition: ogr_geometry.h:2923
void * OGRGeometryH
Opaque type for a geometry.
Definition: ogr_api.h:59
virtual const char * getGeometryName() const override
Fetch WKT name for geometry type.
Definition: ogrmulticurve.cpp:124
virtual OGRErr exportToWkt(char **ppszDstText, OGRwkbVariant=wkbVariantOldOgc) const override
Convert a geometry into well known text format.
Definition: ogrlinestring.cpp:1869
ChildType ** end()
Return end of iterator.
Definition: ogr_geometry.h:2345
virtual OGRwkbGeometryType getGeometryType() const override
Fetch geometry type.
Definition: ogrmultisurface.cpp:98
virtual OGRErr addRingDirectly(OGRCurve *poNewRing) override
Add a ring to a polygon.
Definition: ogrtriangle.cpp:245
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:1882
struct GEOSGeom_t * GEOSGeom
GEOS geometry type.
Definition: ogr_geometry.h:78
OGRLayer::FeatureIterator end(OGRLayer *poLayer)
Return end of feature iterator.
Definition: ogrsf_frmts.h:291
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:2639
virtual OGRPointIterator * getPointIterator() const =0
Returns a point iterator over the curve.
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:1881
OGRGeometry visitor interface.
Definition: ogr_geometry.h:116
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:2564
ChildType ** end()
Return end of curve iterator.
Definition: ogr_geometry.h:1626
virtual OGRErr exportToWkt(char **ppszDstText, OGRwkbVariant=wkbVariantOldOgc) const override
Convert a geometry into well known text format.
Definition: ogrpolygon.cpp:620
virtual int getDimension() const =0
Get the dimension of this object.
int OGRErr
Simple container for a bounding region.
Definition: ogr_core.h:289
virtual void segmentize(double dfMaxLength) override
Modify the geometry such it has no segment longer then the given distance.
Definition: ogrlinestring.cpp:2534
virtual void segmentize(double dfMaxLength)
Modify the geometry such it has no segment longer then the given distance.
Definition: ogrgeometry.cpp:784
int OGRPreparedGeometryIntersects(const OGRPreparedGeometry *poPreparedGeom, const OGRGeometry *poOtherGeom)
Returns whether a prepared geometry intersects with a geometry.
Definition: ogrgeometry.cpp:5861
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:1701
OGRMultiSurface & operator=(const OGRMultiSurface &other)
Assignment operator.
Definition: ogrmultisurface.cpp:85
virtual int WkbSize() const override
Returns size of related binary representation.
Definition: ogrlinestring.cpp:207
int getNumInteriorRings() const
Fetch the number of internal rings.
Definition: ogrcurvepolygon.cpp:238
OGRwkbGeometryType
List of well known binary geometry types.
Definition: ogr_core.h:316
ChildType ** end()
Return end of iterator.
Definition: ogr_geometry.h:2253
virtual OGRBoolean Equals(const OGRGeometry *) const override
Returns TRUE if two geometries are equivalent.
Definition: ogrcurvepolygon.cpp:639
OGRMultiCurve & operator=(const OGRMultiCurve &other)
Assignment operator.
Definition: ogrmulticurve.cpp:84
ChildType ** begin()
Return begin of iterator.
Definition: ogr_geometry.h:2541
#define CPL_WARN_UNUSED_RESULT
Qualifier to warn when the return value of a function is not used.
Definition: cpl_port.h:937
Triangle class.
Definition: ogr_geometry.h:2035
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:2792
virtual const char * getGeometryName() const override
Fetch WKT name for geometry type.
Definition: ogrcurvepolygon.cpp:175
ChildType ** begin()
Return begin of iterator.
Definition: ogr_geometry.h:1950
OGRGeometry visitor default implementation.
Definition: ogr_geometry.h:237
OGRErr removeRing(int iIndex, bool bDelete=true)
Remove a geometry from the container.
Definition: ogrcurvepolygon.cpp:339
virtual double get_AreaOfCurveSegments() const override
Return area of curve segments.
Definition: ogrcompoundcurve.cpp:902
ChildType ** end()
Return end of sub-geometry iterator.
Definition: ogr_geometry.h:2132
ChildType ** begin()
Return begin of sub-geometry iterator.
Definition: ogr_geometry.h:2130
virtual OGRErr addRing(OGRCurve *)
Add a ring to a polygon.
Definition: ogrcurvepolygon.cpp:362
virtual OGRBoolean hasCurveGeometry(int bLookForNonLinear=FALSE) const override
Returns if this geometry is or has curve geometry.
Definition: ogrpolygon.cpp:828
virtual int WkbSize() const =0
Returns size of related binary representation.
OGRCurvePolygon & operator=(const OGRCurvePolygon &other)
Assignment operator.
Definition: ogrcurvepolygon.cpp:88
std::unique_ptr< OGRPreparedGeometry, OGRPreparedGeometryUniquePtrDeleter > OGRPreparedGeometryUniquePtr
Unique pointer type for OGRPreparedGeometry.
Definition: ogr_geometry.h:2942
virtual OGRBoolean hasCurveGeometry(int bLookForNonLinear=FALSE) const override
Returns if this geometry is or has curve geometry.
Definition: ogrmulticurve.cpp:185
Abstract curve base class for OGRLineString, OGRCircularString and OGRCompoundCurve.
Definition: ogr_geometry.h:925
virtual OGRErr transform(OGRCoordinateTransformation *poCT) override
Apply arbitrary coordinate transformation to geometry.
Definition: ogrlinestring.cpp:2413
virtual void assignSpatialReference(OGRSpatialReference *poSR) override
Assign spatial reference to this object.
Definition: ogrcurvepolygon.cpp:708
virtual double get_Length() const override
Returns the length of the curve.
Definition: ogrlinestring.cpp:1967
virtual void segmentize(double dfMaxLength) override
Modify the geometry such it has no segment longer then the given distance.
Definition: ogrcurvepolygon.cpp:726
struct GEOSContextHandle_HS * GEOSContextHandle_t
GEOS context handle type.
Definition: ogr_geometry.h:80
ChildType ** end()
Return end of iterator.
Definition: ogr_geometry.h:1952
virtual int getDimension() const override
Get the dimension of this object.
Definition: ogrgeometrycollection.cpp:192
virtual OGRErr transform(OGRCoordinateTransformation *poCT)=0
Apply arbitrary coordinate transformation to geometry.
OGRPolyhedralSurface & operator=(const OGRPolyhedralSurface &other)
Assignment operator.
Definition: ogrpolyhedralsurface.cpp:79
OGRPolyhedralSurface()
Create an empty PolyhedralSurface.
Concrete representation of a closed ring.
Definition: ogr_geometry.h:1313
std::unique_ptr< OGRGeometry, OGRGeometryUniquePtrDeleter > OGRGeometryUniquePtr
Unique pointer type for OGRGeometry.
Definition: ogr_geometry.h:797
virtual void Value(double, OGRPoint *) const override
Fetch point at given distance along curve.
Definition: ogrlinestring.cpp:2009
ChildType ** begin()
Return begin of curve iterator.
Definition: ogr_geometry.h:1804
OGRPreparedGeometry * OGRCreatePreparedGeometry(const OGRGeometry *poGeom)
Creates a prepared geometry.
Definition: ogrgeometry.cpp:5803
virtual void visit(const OGRPoint *)=0
Visit OGRPoint.
static OGRLinearRing * CastToLinearRing(OGRCurve *poCurve)
Cast to linear ring.
Definition: ogrcurve.cpp:374
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:2722
OGRPolygon ChildType
Type of child elements.
Definition: ogr_geometry.h:2424
ChildType ** begin()
Return begin of iterator.
Definition: ogr_geometry.h:2612
const char * OGRToOGCGeomType(OGRwkbGeometryType eGeomType)
Map OGR geometry format constants to corresponding OGC geometry type.
Definition: ogrgeometry.cpp:2361
double y
y
Definition: ogr_geometry.h:74
OGRErr importFromWkt(const char **) override
deprecated
Definition: ogrcurvepolygon.cpp:523
virtual void setMeasured(OGRBoolean bIsMeasured) override
Add or remove the M coordinate dimension.
Definition: ogrcurvepolygon.cpp:699
virtual int IntersectsPoint(const OGRPoint *p) const
Returns if a point intersects a (closed) curve.
Definition: ogrcurve.cpp:415
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:1285
Concrete class representing polygons.
Definition: ogr_geometry.h:1912
TriangulatedSurface class.
Definition: ogr_geometry.h:2515
Concrete class representing curve polygons.
Definition: ogr_geometry.h:1762
virtual void getEnvelope(OGREnvelope *psEnvelope) const =0
Computes and returns the bounding envelope for this geometry in the passed psEnvelope structure.
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:2487
OGRCurve * getInteriorRingCurve(int)
Fetch reference to indicated internal ring.
Definition: ogrcurvepolygon.cpp:266
virtual OGRBoolean Equals(const OGRGeometry *) const =0
Returns TRUE if two geometries are equivalent.
virtual double get_Length() const =0
Returns the length of the curve.
int OGRPreparedGeometryContains(const OGRPreparedGeometry *poPreparedGeom, const OGRGeometry *poOtherGeom)
Returns whether a prepared geometry contains a geometry.
Definition: ogrgeometry.cpp:5891
virtual OGRErr exportToWkt(char **ppszDstText, OGRwkbVariant=wkbVariantOldOgc) const =0
Convert a geometry into well known text format.
virtual const char * getGeometryName() const override
Fetch WKT name for geometry type.
Definition: ogrmultisurface.cpp:125
virtual OGRGeometry * clone() const override
Make a copy of this object.
Definition: ogrlinestring.cpp:140
OGRLineString & operator=(const OGRLineString &other)
Assignment operator.
Definition: ogrlinestring.cpp:2768
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:609
virtual OGRBoolean Within(const OGRGeometry *) const
Test for containment.
Definition: ogrgeometry.cpp:4835
virtual OGRwkbGeometryType getGeometryType() const override
Fetch geometry type.
Definition: ogrgeometrycollection.cpp:175
virtual void setMeasured(OGRBoolean bIsMeasured)
Add or remove the M coordinate dimension.
Definition: ogrgeometry.cpp:1048
OGRCurvePolygon * toUpperClass()
Return pointer of this in upper class.
Definition: ogr_geometry.h:2003
virtual OGRErr exportToWkb(OGRwkbByteOrder, unsigned char *, OGRwkbVariant=wkbVariantOldOgc) const override
Convert a geometry into well known binary format.
Definition: ogrcurvepolygon.cpp:495
virtual int WkbSize() const override
Returns size of related binary representation.
Definition: ogrpolygon.cpp:297
OGRwkbVariant
Output variants of WKB we support.
Definition: ogr_core.h:422
OGRCurve * stealExteriorRingCurve()
"Steal" reference to external ring.
Definition: ogrcurvepolygon.cpp:307
OGRPoint ChildType
Type of child elements.
Definition: ogr_geometry.h:968
virtual void swapXY() override
Swap x and y coordinates.
Definition: ogrcurvepolygon.cpp:740
virtual double get_Area() const =0
Get the area of the (closed) curve.
ChildType ** end()
Return end of iterator.
Definition: ogr_geometry.h:2768
OGRGeometry visitor default implementation.
Definition: ogr_geometry.h:163
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:1364
Generated for GDAL by
1.8.16.