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;
362 OGRBoolean Is3D()
const {
return flags & OGR_G_3D; }
364 OGRBoolean IsMeasured()
const {
return flags & OGR_G_MEASURED; }
366 virtual void empty() = 0;
368 virtual
void getEnvelope( OGREnvelope * psEnvelope ) const = 0;
369 virtual
void getEnvelope( OGREnvelope3D * psEnvelope ) const = 0;
372 virtual
int WkbSize() const = 0;
375 virtual
OGRErr importFromWkb( const
unsigned char *,
378 int& nBytesConsumedOut ) = 0;
381 virtual
OGRErr importFromWkt( const
char ** ppszInput ) = 0;
386 OGRErr importFromWkt(
char ** ppszInput ) CPL_WARN_DEPRECATED("Use importFromWkt(const
char**) instead")
388 return importFromWkt( const_cast<const char**>(ppszInput) );
391 virtual OGRErr exportToWkt(
char ** ppszDstText,
397 virtual const char *getGeometryName()
const = 0;
398 virtual void dumpReadable( FILE *,
const char * =
nullptr
399 ,
char** papszOptions =
nullptr )
const;
400 virtual void flattenTo2D() = 0;
401 virtual char * exportToGML(
const char*
const * papszOptions =
nullptr )
const;
402 virtual char * exportToKML()
const;
403 virtual char * exportToJson()
const;
415 virtual OGRBoolean hasCurveGeometry(
int bLookForNonLinear = FALSE)
const;
419 double dfMaxAngleStepSizeDegrees = 0,
427 virtual
void closeRings();
429 virtual
void setCoordinateDimension(
int nDimension );
431 virtual
void setMeasured(
OGRBoolean bIsMeasured );
439 virtual void segmentize(
double dfMaxLength);
455 virtual
double Distance( const
OGRGeometry * ) const ;
457 virtual
OGRGeometry *Buffer(
double dfDist,
int nQuadSegs = 30 )
471 OGRGeometry *SimplifyPreserveTopology(
double dTolerance)
478 virtual
double Distance3D( const
OGRGeometry *poOtherGeom ) const;
483 const CPL_WARN_DEPRECATED("Non standard method. "
484 "Use Intersects() instead");
486 const CPL_WARN_DEPRECATED("Non standard method. "
487 "Use Equals() instead");
489 const CPL_WARN_DEPRECATED("Non standard method. "
490 "Use SymDifference() instead");
492 const CPL_WARN_DEPRECATED("Non standard method. "
493 "Use Boundary() instead");
498 static
int bGenerate_DB2_V72_BYTE_ORDER;
501 virtual
void swapXY();
511 {
return reinterpret_cast<OGRGeometryH>(poGeom); }
517 {
return reinterpret_cast<OGRGeometry*>(hGeom); }
524 {
return cpl::down_cast<OGRPoint*>(
this); }
530 inline const OGRPoint* toPoint()
const
531 {
return cpl::down_cast<const OGRPoint*>(
this); }
538 {
return cpl::down_cast<OGRCurve*>(
this); }
544 inline const OGRCurve* toCurve()
const
545 {
return cpl::down_cast<const OGRCurve*>(
this); }
552 {
return cpl::down_cast<OGRSimpleCurve*>(
this); }
559 {
return cpl::down_cast<const OGRSimpleCurve*>(
this); }
566 {
return cpl::down_cast<OGRLineString*>(
this); }
573 {
return cpl::down_cast<const OGRLineString*>(
this); }
580 {
return cpl::down_cast<OGRLinearRing*>(
this); }
587 {
return cpl::down_cast<const OGRLinearRing*>(
this); }
594 {
return cpl::down_cast<OGRCircularString*>(
this); }
601 {
return cpl::down_cast<const OGRCircularString*>(
this); }
608 {
return cpl::down_cast<OGRCompoundCurve*>(
this); }
615 {
return cpl::down_cast<const OGRCompoundCurve*>(
this); }
622 {
return cpl::down_cast<OGRSurface*>(
this); }
629 {
return cpl::down_cast<const OGRSurface*>(
this); }
636 {
return cpl::down_cast<OGRPolygon*>(
this); }
643 {
return cpl::down_cast<const OGRPolygon*>(
this); }
650 {
return cpl::down_cast<OGRTriangle*>(
this); }
657 {
return cpl::down_cast<const OGRTriangle*>(
this); }
664 {
return cpl::down_cast<OGRCurvePolygon*>(
this); }
671 {
return cpl::down_cast<const OGRCurvePolygon*>(
this); }
678 {
return cpl::down_cast<OGRGeometryCollection*>(
this); }
685 {
return cpl::down_cast<const OGRGeometryCollection*>(
this); }
692 {
return cpl::down_cast<OGRMultiPoint*>(
this); }
699 {
return cpl::down_cast<const OGRMultiPoint*>(
this); }
706 {
return cpl::down_cast<OGRMultiLineString*>(
this); }
713 {
return cpl::down_cast<const OGRMultiLineString*>(
this); }
720 {
return cpl::down_cast<OGRMultiPolygon*>(
this); }
727 {
return cpl::down_cast<const OGRMultiPolygon*>(
this); }
734 {
return cpl::down_cast<OGRMultiCurve*>(
this); }
741 {
return cpl::down_cast<const OGRMultiCurve*>(
this); }
748 {
return cpl::down_cast<OGRMultiSurface*>(
this); }
755 {
return cpl::down_cast<const OGRMultiSurface*>(
this); }
762 {
return cpl::down_cast<OGRPolyhedralSurface*>(
this); }
769 {
return cpl::down_cast<const OGRPolyhedralSurface*>(
this); }
776 {
return cpl::down_cast<OGRTriangulatedSurface*>(
this); }
783 {
return cpl::down_cast<const OGRTriangulatedSurface*>(
this); }
788 struct CPL_DLL OGRGeometryUniquePtrDeleter
819 OGRPoint(
double x,
double y,
double z );
820 OGRPoint(
double x,
double y,
double z,
double m );
831 int& nBytesConsumedOut )
override;
844 virtual void empty()
override;
845 virtual void getEnvelope( OGREnvelope * psEnvelope )
const override;
846 virtual void getEnvelope( OGREnvelope3D * psEnvelope )
const override;
848 {
return !(flags & OGR_G_NOT_EMPTY_POINT); }
852 double getX()
const {
return x; }
854 double getY()
const {
return y; }
856 double getZ()
const {
return z; }
858 double getM()
const {
return m; }
865 void setX(
double xIn ) { x = xIn; flags |= OGR_G_NOT_EMPTY_POINT; }
869 void setY(
double yIn ) { y = yIn; flags |= OGR_G_NOT_EMPTY_POINT; }
873 void setZ(
double zIn )
874 { z = zIn; flags |= (OGR_G_NOT_EMPTY_POINT | OGR_G_3D); }
878 void setM(
double mIn )
879 { m = mIn; flags |= (OGR_G_NOT_EMPTY_POINT | OGR_G_MEASURED); }
894 virtual void swapXY()
override;
932 virtual OGRCurveCasterToLineString GetCasterToLineString()
const = 0;
933 virtual OGRCurveCasterToLinearRing GetCasterToLinearRing()
const = 0;
944 class CPL_DLL ConstIterator
947 std::unique_ptr<Private> m_poPrivate;
949 ConstIterator(
const OGRCurve* poSelf,
bool bStart);
950 ConstIterator(ConstIterator&& oOther) noexcept;
953 ConstIterator& operator++();
954 bool operator!=(
const ConstIterator& it)
const;
978 ConstIterator
begin()
const;
980 ConstIterator
end()
const;
983 virtual double get_Length()
const = 0;
984 virtual void StartPoint(
OGRPoint * )
const = 0;
985 virtual void EndPoint(
OGRPoint * )
const = 0;
986 virtual int get_IsClosed()
const;
987 virtual void Value(
double,
OGRPoint * )
const = 0;
988 virtual OGRLineString* CurveToLine(
double dfMaxAngleStepSizeDegrees = 0,
989 const char*
const* papszOptions =
nullptr)
991 virtual int getDimension()
const override;
994 virtual int getNumPoints()
const = 0;
997 virtual double get_Area()
const = 0;
1002 {
return cpl::down_cast<OGRSimpleCurve*>(
this); }
1007 {
return cpl::down_cast<const OGRSimpleCurve*>(
this); }
1016 inline OGRCurve::ConstIterator
begin(
const OGRCurve* poCurve) {
return poCurve->begin(); }
1018 inline OGRCurve::ConstIterator
end(
const OGRCurve* poCurve) {
return poCurve->end(); }
1050 OGRErr importFromWKTListOnly(
const char ** ppszInput,
int bHasZ,
int bHasM,
1057 virtual double get_LinearArea()
const;
1063 class CPL_DLL Iterator
1066 std::unique_ptr<Private> m_poPrivate;
1070 Iterator(Iterator&& oOther) noexcept;
1073 Iterator& operator++();
1074 bool operator!=(
const Iterator& it)
const;
1080 class CPL_DLL ConstIterator
1083 std::unique_ptr<Private> m_poPrivate;
1086 ConstIterator(ConstIterator&& oOther) noexcept;
1089 ConstIterator& operator++();
1090 bool operator!=(
const ConstIterator& it)
const;
1123 ConstIterator
begin()
const;
1125 ConstIterator
end()
const;
1128 virtual int WkbSize()
const override;
1129 virtual OGRErr importFromWkb(
const unsigned char *,
1132 int& nBytesConsumedOut )
override;
1137 OGRErr importFromWkt(
const char ** )
override;
1138 virtual OGRErr exportToWkt(
char ** ppszDstText,
1144 virtual void empty()
override;
1145 virtual void getEnvelope( OGREnvelope * psEnvelope )
const override;
1146 virtual void getEnvelope( OGREnvelope3D * psEnvelope )
const override;
1150 virtual double get_Length()
const override;
1151 virtual void StartPoint(
OGRPoint * )
const override;
1152 virtual void EndPoint(
OGRPoint * )
const override;
1153 virtual void Value(
double,
OGRPoint * )
const override;
1154 virtual double Project(
const OGRPoint * )
const;
1155 virtual OGRLineString* getSubLine(
double,
double,
int )
const;
1158 virtual int getNumPoints()
const override {
return nPointCount; }
1160 double getX(
int i )
const {
return paoPoints[i].
x; }
1161 double getY(
int i )
const {
return paoPoints[i].
y; }
1162 double getZ(
int i )
const;
1163 double getM(
int i )
const;
1169 virtual void setCoordinateDimension(
int nDimension )
override;
1170 virtual void set3D(
OGRBoolean bIs3D )
override;
1171 virtual void setMeasured(
OGRBoolean bIsMeasured )
override;
1172 void setNumPoints(
int nNewPointCount,
1173 int bZeroizeNewContent = TRUE );
1175 void setPoint(
int,
double,
double );
1176 void setZ(
int,
double );
1177 void setM(
int,
double );
1178 void setPoint(
int,
double,
double,
double );
1179 void setPointM(
int,
double,
double,
double );
1180 void setPoint(
int,
double,
double,
double,
double );
1181 void setPoints(
int,
const OGRRawPoint *,
const double * =
nullptr );
1182 void setPointsM(
int,
const OGRRawPoint *,
const double * );
1183 void setPoints(
int,
const OGRRawPoint *,
const double *,
const double * );
1184 void setPoints(
int,
const double * padfX,
const double * padfY,
1185 const double *padfZIn =
nullptr );
1186 void setPointsM(
int,
const double * padfX,
const double * padfY,
1187 const double *padfMIn =
nullptr );
1188 void setPoints(
int,
const double * padfX,
const double * padfY,
1189 const double *padfZIn,
const double *padfMIn );
1191 void addPoint(
double,
double );
1192 void addPoint(
double,
double,
double );
1193 void addPointM(
double,
double,
double );
1194 void addPoint(
double,
double,
double,
double );
1196 void getPoints(
OGRRawPoint *,
double * =
nullptr )
const;
1197 void getPoints(
void* pabyX,
int nXStride,
1198 void* pabyY,
int nYStride,
1199 void* pabyZ =
nullptr,
int nZStride = 0 )
const;
1200 void getPoints(
void* pabyX,
int nXStride,
1201 void* pabyY,
int nYStride,
1202 void* pabyZ,
int nZStride,
1203 void* pabyM,
int nMStride )
const;
1206 int nStartVertex = 0,
int nEndVertex = -1 );
1207 void reversePoints(
void );
1212 virtual void flattenTo2D()
override;
1213 virtual void segmentize(
double dfMaxLength)
override;
1215 virtual void swapXY()
override;
1220 inline OGRSimpleCurve::Iterator
begin(
OGRSimpleCurve* poCurve) {
return poCurve->begin(); }
1222 inline OGRSimpleCurve::Iterator
end(
OGRSimpleCurve* poCurve) {
return poCurve->end(); }
1225 inline OGRSimpleCurve::ConstIterator
begin(
const OGRSimpleCurve* poCurve) {
return poCurve->begin(); }
1227 inline OGRSimpleCurve::ConstIterator
end(
const OGRSimpleCurve* poCurve) {
return poCurve->end(); }
1252 virtual OGRCurveCasterToLineString GetCasterToLineString()
1254 virtual OGRCurveCasterToLinearRing GetCasterToLinearRing()
1270 const char*
const* papszOptions =
nullptr )
1273 const char*
const* papszOptions =
nullptr )
const override;
1274 virtual double get_Area()
const override;
1283 inline const OGRSimpleCurve* toUpperClass()
const {
return this; }
1323 virtual int _WkbSize(
int _flags )
const;
1325 const unsigned char *,
int,
1326 int& nBytesConsumedOut );
1328 unsigned char * )
const;
1330 virtual OGRCurveCasterToLineString GetCasterToLineString()
1332 virtual OGRCurveCasterToLinearRing GetCasterToLinearRing()
1349 virtual int isClockwise()
const;
1350 virtual void reverseWindingOrder();
1353 int bTestEnvelope = TRUE )
const;
1355 int bTestEnvelope = TRUE )
const;
1369 virtual int WkbSize()
const override;
1373 int& nBytesConsumedOut )
override;
1398 void ExtendEnvelopeWithCircular( OGREnvelope * psEnvelope )
const;
1400 int IsFullCircle(
double& cx,
double& cy,
double& square_R )
const;
1404 virtual OGRCurveCasterToLineString GetCasterToLineString()
1406 virtual OGRCurveCasterToLinearRing GetCasterToLinearRing()
1424 int& nBytesConsumedOut )
override;
1436 virtual void getEnvelope( OGREnvelope * psEnvelope )
const override;
1437 virtual void getEnvelope( OGREnvelope3D * psEnvelope )
const override;
1442 const char*
const* papszOptions =
nullptr )
1445 virtual double get_Area()
const override;
1450 virtual void segmentize(
double dfMaxLength )
override;
1454 double dfMaxAngleStepSizeDegrees = 0,
1455 const char*
const* papszOptions =
nullptr)
const override;
1460 inline const OGRSimpleCurve* toUpperClass()
const {
return this; }
1480 class CPL_DLL OGRCurveCollection
1489 int nCurveCount = 0;
1493 OGRCurveCollection();
1494 OGRCurveCollection(
const OGRCurveCollection& other);
1495 ~OGRCurveCollection();
1497 OGRCurveCollection&
operator=(
const OGRCurveCollection& other);
1507 OGRCurve**
end() {
return papoCurves + nCurveCount; }
1513 const OGRCurve*
const*
end()
const {
return papoCurves + nCurveCount; }
1517 void getEnvelope( OGREnvelope * psEnvelope )
const;
1518 void getEnvelope( OGREnvelope3D * psEnvelope )
const;
1524 const unsigned char * pabyData,
1528 int nMinSubGeomSize,
1530 OGRErr importBodyFromWkb(
1532 const unsigned char * pabyData,
1534 int bAcceptCompoundCurve,
1538 int& nBytesConsumedOut );
1540 char ** ppszDstText )
const;
1546 int nNewDimension );
1550 int getNumCurves()
const;
1552 const OGRCurve *getCurve(
int )
const;
1555 OGRErr removeCurve(
int iIndex,
bool bDelete =
true );
1583 OGRCurveCollection oCC{};
1586 double dfToleranceEps,
1592 OGRLineString* CurveToLineInternal(
double dfMaxAngleStepSizeDegrees,
1593 const char*
const* papszOptions,
1594 int bIsLinearRing )
const;
1605 virtual OGRCurveCasterToLineString GetCasterToLineString()
1607 virtual OGRCurveCasterToLinearRing GetCasterToLinearRing()
1624 ChildType**
begin() {
return oCC.begin(); }
1626 ChildType**
end() {
return oCC.end(); }
1630 const ChildType*
const *
begin()
const {
return oCC.begin(); }
1632 const ChildType*
const *
end()
const {
return oCC.end(); }
1635 virtual int WkbSize()
const override;
1639 int& nBytesConsumedOut )
override;
1651 virtual void empty()
override;
1652 virtual void getEnvelope( OGREnvelope * psEnvelope )
const override;
1653 virtual void getEnvelope( OGREnvelope3D * psEnvelope )
const override;
1662 const char*
const* papszOptions =
nullptr )
1667 virtual double get_Area()
const override;
1673 int getNumCurves()
const;
1675 const OGRCurve *getCurve(
int )
const;
1685 OGRErr addCurveDirectly(
OGRCurve*,
double dfToleranceEps = 1e-14 );
1694 virtual void segmentize(
double dfMaxLength)
override;
1698 double dfMaxAngleStepSizeDegrees = 0,
1699 const char*
const* papszOptions =
nullptr)
const override;
1703 virtual void swapXY()
override;
1731 virtual OGRSurfaceCasterToPolygon GetCasterToPolygon()
const = 0;
1732 virtual OGRSurfaceCasterToCurvePolygon GetCasterToCurvePolygon()
const = 0;
1736 virtual double get_Area()
const = 0;
1738 {
return PointOnSurfaceInternal(poPoint); }
1769 virtual int checkRing(
OGRCurve * poNewRing )
const;
1781 OGRCurveCollection oCC{};
1783 virtual OGRSurfaceCasterToPolygon GetCasterToPolygon()
1785 virtual OGRSurfaceCasterToCurvePolygon GetCasterToCurvePolygon()
1812 const ChildType*
const *
end()
const {
return oCC.end(); }
1818 virtual void empty()
override;
1822 virtual void segmentize(
double dfMaxLength )
override;
1826 double dfMaxAngleStepSizeDegrees = 0,
1827 const char*
const* papszOptions =
nullptr )
const override;
1830 virtual double get_Area()
const override;
1833 virtual int WkbSize()
const override;
1837 int& nBytesConsumedOut )
override;
1849 virtual void getEnvelope( OGREnvelope * psEnvelope )
const override;
1850 virtual void getEnvelope( OGREnvelope3D * psEnvelope )
const override;
1854 double dfMaxAngleStepSizeDegrees = 0,
1855 const char*
const* papszOptions =
nullptr )
const;
1884 virtual void swapXY()
override;
1922 virtual int checkRing(
OGRCurve * poNewRing )
const override;
1923 virtual OGRErr importFromWKTListOnly(
const char ** ppszInput,
1924 int bHasZ,
int bHasM,
1931 virtual OGRSurfaceCasterToPolygon GetCasterToPolygon()
1933 virtual OGRSurfaceCasterToCurvePolygon GetCasterToCurvePolygon()
1950 ChildType**
begin() {
return reinterpret_cast<ChildType**>(oCC.begin()); }
1952 ChildType**
end() {
return reinterpret_cast<ChildType**>(oCC.end()); }
1956 const ChildType*
const*
begin()
const {
return reinterpret_cast<const ChildType* const*>(oCC.begin()); }
1958 const ChildType*
const*
end()
const {
return reinterpret_cast<const ChildType* const*>(oCC.end()); }
1966 const char*
const* papszOptions =
nullptr )
const override;
1968 double dfMaxAngleStepSizeDegrees = 0,
1969 const char*
const* papszOptions =
nullptr)
const override;
1972 virtual int WkbSize()
const override;
1976 int& nBytesConsumedOut )
override;
1989 double dfMaxAngleStepSizeDegrees = 0,
1990 const char*
const* papszOptions =
nullptr )
const override;
2040 bool quickValidityCheck()
const;
2044 virtual OGRSurfaceCasterToPolygon GetCasterToPolygon()
const override;
2045 virtual OGRErr importFromWKTListOnly(
const char ** ppszInput,
2046 int bHasZ,
int bHasM,
2049 double*& padfZ )
override;
2066 int& nBytesConsumedOut )
override;
2097 OGRErr importFromWkbInternal(
const unsigned char * pabyData,
2101 OGRErr importFromWktInternal(
const char **ppszInput,
int nRecLevel );
2108 OGRErr exportToWktInternal(
char ** ppszDstText,
2110 const char* pszSkipPrefix )
const;
2130 ChildType**
begin() {
return papoGeoms; }
2132 ChildType**
end() {
return papoGeoms + nGeomCount; }
2136 const ChildType*
const*
begin()
const {
return papoGeoms; }
2138 const ChildType*
const*
end()
const {
return papoGeoms + nGeomCount; }
2144 virtual void empty()
override;
2148 virtual void segmentize(
double dfMaxLength)
override;
2152 const char*
const* papszOptions =
nullptr )
const override;
2154 double dfMaxAngleStepSizeDegrees = 0,
2155 const char*
const* papszOptions =
nullptr )
const override;
2158 virtual int WkbSize()
const override;
2162 int& nBytesConsumedOut )
override;
2173 virtual double get_Length()
const;
2174 virtual double get_Area()
const;
2178 virtual void getEnvelope( OGREnvelope * psEnvelope )
const override;
2179 virtual void getEnvelope( OGREnvelope3D * psEnvelope )
const override;
2182 int getNumGeometries()
const;
2195 virtual OGRErr removeGeometry(
int iIndex,
int bDelete = TRUE );
2201 virtual void swapXY()
override;
2251 ChildType**
begin() {
return reinterpret_cast<ChildType**>(papoGeoms); }
2253 ChildType**
end() {
return reinterpret_cast<ChildType**>(papoGeoms + nGeomCount); }
2257 const ChildType*
const*
begin()
const {
return reinterpret_cast<const ChildType* const*>(papoGeoms); }
2259 const ChildType*
const*
end()
const {
return reinterpret_cast<const ChildType* const*>(papoGeoms + nGeomCount); }
2321 OGRErr _addGeometryWithExpectedSubGeometryType(
2324 OGRErr _addGeometryDirectlyWithExpectedSubGeometryType(
2343 ChildType**
begin() {
return reinterpret_cast<ChildType**>(papoGeoms); }
2345 ChildType**
end() {
return reinterpret_cast<ChildType**>(papoGeoms + nGeomCount); }
2349 const ChildType*
const*
begin()
const {
return reinterpret_cast<const ChildType* const*>(papoGeoms); }
2351 const ChildType*
const*
end()
const {
return reinterpret_cast<const ChildType* const*>(papoGeoms + nGeomCount); }
2402 virtual OGRSurfaceCasterToPolygon GetCasterToPolygon()
2404 virtual OGRSurfaceCasterToCurvePolygon GetCasterToCurvePolygon()
2407 virtual const char* getSubGeometryName()
const;
2410 const char* pszSkipPrefix )
const;
2412 virtual OGRPolyhedralSurfaceCastToMultiPolygon GetCasterToMultiPolygon()
2437 const ChildType*
const*
end()
const {
return oMP.end(); }
2440 virtual int WkbSize()
const override;
2446 int& nBytesConsumedOut )
override;
2459 virtual void empty()
override;
2462 virtual void getEnvelope( OGREnvelope * psEnvelope )
const override;
2463 virtual void getEnvelope( OGREnvelope3D * psEnvelope )
const override;
2468 virtual double get_Area()
const override;
2484 virtual void swapXY()
override;
2521 virtual const char* getSubGeometryName()
const override;
2524 virtual OGRPolyhedralSurfaceCastToMultiPolygon GetCasterToMultiPolygon()
2541 ChildType**
begin() {
return reinterpret_cast<ChildType**>(oMP.begin()); }
2543 ChildType**
end() {
return reinterpret_cast<ChildType**>(oMP.end()); }
2547 const ChildType*
const*
begin()
const {
return reinterpret_cast<const ChildType* const*>(oMP.begin()); }
2549 const ChildType*
const*
end()
const {
return reinterpret_cast<const ChildType* const*>(oMP.end()); }
2593 OGRErr importFromWkt_Bracketed(
const char **,
int bHasM,
int bHasZ );
2612 ChildType**
begin() {
return reinterpret_cast<ChildType**>(papoGeoms); }
2614 ChildType**
end() {
return reinterpret_cast<ChildType**>(papoGeoms + nGeomCount); }
2618 const ChildType*
const*
begin()
const {
return reinterpret_cast<const ChildType* const*>(papoGeoms); }
2620 const ChildType*
const*
end()
const {
return reinterpret_cast<const ChildType* const*>(papoGeoms + nGeomCount); }
2691 ChildType**
begin() {
return reinterpret_cast<ChildType**>(papoGeoms); }
2693 ChildType**
end() {
return reinterpret_cast<ChildType**>(papoGeoms + nGeomCount); }
2697 const ChildType*
const*
begin()
const {
return reinterpret_cast<const ChildType* const*>(papoGeoms); }
2699 const ChildType*
const*
end()
const {
return reinterpret_cast<const ChildType* const*>(papoGeoms + nGeomCount); }
2766 ChildType**
begin() {
return reinterpret_cast<ChildType**>(papoGeoms); }
2768 ChildType**
end() {
return reinterpret_cast<ChildType**>(papoGeoms + nGeomCount); }
2772 const ChildType*
const*
begin()
const {
return reinterpret_cast<const ChildType* const*>(papoGeoms); }
2774 const ChildType*
const*
end()
const {
return reinterpret_cast<const ChildType* const*>(papoGeoms + nGeomCount); }
2819 static OGRErr createFromFgfInternal(
const unsigned char *pabyData,
2823 int *pnBytesConsumed,
2829 static OGRErr createFromWkb(
const void * pabyData,
2834 int& nBytesConsumedOut );
2844 CPL_WARN_DEPRECATED(
"Use createFromWkt(const char**, ...) instead")
2846 return createFromWkt( const_cast<const char**>(ppszInput), poSRS, ppoGeom);
2851 static OGRGeometry *createFromGML(
const char * );
2854 static OGRGeometry *createFromGeoJson(
const char *);
2862 bool bOnlyInOrder =
true );
2869 const char*
const* papszOptions =
nullptr );
2873 int *pbResultValidGeometry,
2874 const char **papszOptions =
nullptr);
2875 static bool haveGEOS();
2879 char** papszOptions );
2882 approximateArcAngles(
double dfX,
double dfY,
double dfZ,
2883 double dfPrimaryRadius,
double dfSecondaryAxis,
2885 double dfStartAngle,
double dfEndAngle,
2886 double dfMaxAngleStepSizeDegrees );
2888 static int GetCurveParmeters(
double x0,
double y0,
2889 double x1,
double y1,
2890 double x2,
double y2,
2891 double& R,
double& cx,
double& cy,
2892 double& alpha0,
double& alpha1,
2895 double x0,
double y0,
double z0,
2896 double x1,
double y1,
double z1,
2897 double x2,
double y2,
double z2,
2899 double dfMaxAngleStepSizeDegrees,
2900 const char*
const * papszOptions =
nullptr );
2901 static OGRCurve* curveFromLineString(
2903 const char*
const * papszOptions =
nullptr);
2920 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:2279
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:2765
A collection of OGRCurve.
Definition: ogr_geometry.h:2667
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:2430
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:1240
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:4789
A collection of non-overlapping OGRPolygon.
Definition: ogr_geometry.h:2310
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:906
OGRSurface ChildType
Type of child elements.
Definition: ogr_geometry.h:2245
ChildType ** begin()
Return begin of iterator.
Definition: ogr_geometry.h:2250
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:4925
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:2285
Utility class to store a collection of curves.
Definition: ogr_geometry.h:1579
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:2006
virtual OGRwkbGeometryType getGeometryType() const =0
Fetch geometry type.
virtual void swapXY()
Swap x and y coordinates.
Definition: ogrgeometry.cpp:5615
OGRErr importFromWkt(const char **) override
deprecated
Definition: ogrlinestring.cpp:1719
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:1280
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:1621
ConstIterator end() const
Return end of a point iterator.
Definition: ogrcurve.cpp:622
ChildType ** end()
Return end of iterator.
Definition: ogr_geometry.h:2542
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:1623
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:2816
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:2487
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:2613
OGRCurve * getExteriorRingCurve()
Fetch reference to external polygon ring.
Definition: ogrcurvepolygon.cpp:201
OGRLinearRing ChildType
Type of child elements.
Definition: ogr_geometry.h:1944
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:2094
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:146
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:2395
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:2589
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:2007
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:2428
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:2231
Point class.
Definition: ogr_geometry.h:808
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:2720
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:2368
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:2692
virtual const char * getGeometryName() const override
Fetch WKT name for geometry type.
Definition: ogrlinestring.cpp:2767
virtual void accept(IOGRGeometryVisitor *visitor)=0
Accept a visitor.
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:2202
virtual OGRErr PointOnSurface(OGRPoint *poPoint) const
This method relates to the SFCOM ISurface::get_PointOnSurface() method.
Definition: ogr_geometry.h:1736
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:2342
Simple container for a position.
Definition: ogr_geometry.h:62
A collection of OGRLineString.
Definition: ogr_geometry.h:2746
OGRCurve ChildType
Type of child elements.
Definition: ogr_geometry.h:1798
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:1726
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:2558
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:1462
OGRTriangle & operator=(const OGRTriangle &other)
Assignment operator.
Definition: ogrtriangle.cpp:137
OGRTriangle ChildType
Type of child elements.
Definition: ogr_geometry.h:2535
Concrete representation of a circular string, that is to say a curve made of one or several arc circl...
Definition: ogr_geometry.h:1394
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:5663
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:2690
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:2284
OGRGeometry ChildType
Type of child elements.
Definition: ogr_geometry.h:2124
virtual OGRErr importFromWkb(const unsigned char *, int, OGRwkbVariant, int &nBytesConsumedOut) override
Assign geometry from well known binary data.
Definition: ogrlinestring.cpp:1505
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:2076
OGRErr importFromWkt(const char **) override
deprecated
Definition: ogrgeometrycollection.cpp:791
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:1285
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:1805
OGRGeometryCollection * toUpperClass()
Return pointer of this in upper class.
Definition: ogr_geometry.h:2280
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:891
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:2716
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:2203
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:2685
Abstract curve base class for OGRLineString and OGRCircularString.
Definition: ogr_geometry.h:1033
void OGRDestroyPreparedGeometry(OGRPreparedGeometry *poPreparedGeom)
Destroys a prepared geometry.
Definition: ogrgeometry.cpp:5719
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:2909
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:1838
ChildType ** end()
Return end of iterator.
Definition: ogr_geometry.h:2344
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:1881
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:2638
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:1880
OGRGeometry visitor interface.
Definition: ogr_geometry.h:116
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:2563
ChildType ** end()
Return end of curve iterator.
Definition: ogr_geometry.h:1625
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:2503
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:5741
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:1700
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:2252
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:2540
#define CPL_WARN_UNUSED_RESULT
Qualifier to warn when the return value of a function is not used.
Definition: cpl_port.h:929
Triangle class.
Definition: ogr_geometry.h:2034
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:2791
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:1949
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:2131
ChildType ** begin()
Return begin of sub-geometry iterator.
Definition: ogr_geometry.h:2129
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:2928
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:924
virtual OGRErr transform(OGRCoordinateTransformation *poCT) override
Apply arbitrary coordinate transformation to geometry.
Definition: ogrlinestring.cpp:2382
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:1936
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:1951
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:1312
std::unique_ptr< OGRGeometry, OGRGeometryUniquePtrDeleter > OGRGeometryUniquePtr
Unique pointer type for OGRGeometry.
Definition: ogr_geometry.h:796
virtual void Value(double, OGRPoint *) const override
Fetch point at given distance along curve.
Definition: ogrlinestring.cpp:1978
ChildType ** begin()
Return begin of curve iterator.
Definition: ogr_geometry.h:1803
OGRPreparedGeometry * OGRCreatePreparedGeometry(const OGRGeometry *poGeom)
Creates a prepared geometry.
Definition: ogrgeometry.cpp:5683
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:2721
OGRPolygon ChildType
Type of child elements.
Definition: ogr_geometry.h:2423
ChildType ** begin()
Return begin of iterator.
Definition: ogr_geometry.h:2611
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:1284
Concrete class representing polygons.
Definition: ogr_geometry.h:1911
TriangulatedSurface class.
Definition: ogr_geometry.h:2514
Concrete class representing curve polygons.
Definition: ogr_geometry.h:1761
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:2486
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:5771
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:2737
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:4715
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:2002
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:967
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:2767
OGRGeometry visitor default implementation.
Definition: ogr_geometry.h:163
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:1363
Generated for GDAL by
1.8.16.