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;
355 virtual int getDimension()
const = 0;
356 virtual int getCoordinateDimension()
const;
357 int CoordinateDimension()
const;
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;
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();
524 {
return cpl::down_cast<
OGRPoint*>(
this); }
531 {
return cpl::down_cast<
const OGRPoint*>(
this); }
538 {
return cpl::down_cast<
OGRCurve*>(
this); }
545 {
return cpl::down_cast<
const OGRCurve*>(
this); }
629 {
return cpl::down_cast<
const OGRSurface*>(
this); }
643 {
return cpl::down_cast<
const OGRPolygon*>(
this); }
657 {
return cpl::down_cast<
const OGRTriangle*>(
this); }
788 struct CPL_DLL OGRGeometryUniquePtrDeleter
819 OGRPoint(
double x,
double y,
double z );
820 OGRPoint(
double x,
double y,
double z,
double m );
827 int WkbSize()
const override;
828 OGRErr importFromWkb(
const unsigned char *,
831 int& nBytesConsumedOut )
override;
836 OGRErr importFromWkt(
const char ** )
override;
837 OGRErr exportToWkt(
char ** ppszDstText,
842 virtual int getDimension()
const 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); }
856 double getZ()
const {
return z; }
858 double getM()
const {
return m; }
861 virtual void setCoordinateDimension(
int nDimension )
override;
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; }
874 { z = zIn; flags |= (OGR_G_NOT_EMPTY_POINT | OGR_G_3D); }
879 { m = mIn; flags |= (OGR_G_NOT_EMPTY_POINT | OGR_G_MEASURED); }
887 virtual const char *getGeometryName()
const override;
890 virtual void flattenTo2D()
override;
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;
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;
1159 void getPoint(
int,
OGRPoint * )
const;
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()
1257 virtual double get_AreaOfCurveSegments()
const override;
1269 virtual OGRLineString* CurveToLine(
double dfMaxAngleStepSizeDegrees = 0,
1270 const char*
const* papszOptions =
nullptr )
1273 const char*
const* papszOptions =
nullptr )
const override;
1274 virtual double get_Area()
const override;
1278 virtual const char *getGeometryName()
const override;
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()
1408 virtual int IntersectsPoint(
const OGRPoint* p )
const override;
1409 virtual int ContainsPoint(
const OGRPoint* p )
const override;
1410 virtual double get_AreaOfCurveSegments()
const override;
1421 virtual OGRErr importFromWkb(
const unsigned char *,
1424 int& nBytesConsumedOut )
override;
1429 OGRErr importFromWkt(
const char ** )
override;
1430 virtual OGRErr exportToWkt(
char ** ppszDstText,
1436 virtual void getEnvelope( OGREnvelope * psEnvelope )
const override;
1437 virtual void getEnvelope( OGREnvelope3D * psEnvelope )
const override;
1440 virtual double get_Length()
const override;
1441 virtual OGRLineString* CurveToLine(
double dfMaxAngleStepSizeDegrees = 0,
1442 const char*
const* papszOptions =
nullptr )
1444 virtual void Value(
double,
OGRPoint * )
const override;
1445 virtual double get_Area()
const override;
1449 virtual const char *getGeometryName()
const override;
1450 virtual void segmentize(
double dfMaxLength )
override;
1451 virtual OGRBoolean hasCurveGeometry(
int bLookForNonLinear = FALSE )
1454 double dfMaxAngleStepSizeDegrees = 0,
1455 const char*
const* papszOptions =
nullptr)
const override;
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;
1636 virtual OGRErr importFromWkb(
const unsigned char *,
1639 int& nBytesConsumedOut )
override;
1644 OGRErr importFromWkt(
const char ** )
override;
1645 virtual OGRErr exportToWkt(
char ** ppszDstText,
1651 virtual void empty()
override;
1652 virtual void getEnvelope( OGREnvelope * psEnvelope )
const override;
1653 virtual void getEnvelope( OGREnvelope3D * psEnvelope )
const override;
1657 virtual double get_Length()
const override;
1658 virtual void StartPoint(
OGRPoint * )
const override;
1659 virtual void EndPoint(
OGRPoint * )
const override;
1660 virtual void Value(
double,
OGRPoint * )
const override;
1661 virtual OGRLineString* CurveToLine(
double dfMaxAngleStepSizeDegrees = 0,
1662 const char*
const* papszOptions =
nullptr )
1665 virtual int getNumPoints()
const override;
1666 virtual double get_AreaOfCurveSegments()
const override;
1667 virtual double get_Area()
const override;
1673 int getNumCurves()
const;
1675 const OGRCurve *getCurve(
int )
const;
1678 virtual void setCoordinateDimension(
int nDimension )
override;
1679 virtual void set3D(
OGRBoolean bIs3D )
override;
1680 virtual void setMeasured(
OGRBoolean bIsMeasured )
override;
1685 OGRErr addCurveDirectly(
OGRCurve*,
double dfToleranceEps = 1e-14 );
1691 virtual const char *getGeometryName()
const override;
1693 virtual void flattenTo2D()
override;
1694 virtual void segmentize(
double dfMaxLength)
override;
1695 virtual OGRBoolean hasCurveGeometry(
int bLookForNonLinear = FALSE)
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()
1804 ChildType**
begin() {
return oCC.begin(); }
1806 ChildType**
end() {
return oCC.end(); }
1810 const ChildType*
const *
begin()
const {
return oCC.begin(); }
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;
2059 virtual const char *getGeometryName()
const override;
2063 virtual OGRErr importFromWkb(
const unsigned char *,
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; }
2141 virtual const char *getGeometryName()
const override;
2144 virtual void empty()
override;
2146 virtual void flattenTo2D()
override;
2148 virtual void segmentize(
double dfMaxLength)
override;
2149 virtual OGRBoolean hasCurveGeometry(
int bLookForNonLinear = FALSE )
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;
2159 virtual OGRErr importFromWkb(
const unsigned char *,
2162 int& nBytesConsumedOut )
override;
2167 OGRErr importFromWkt(
const char ** )
override;
2169 virtual OGRErr exportToWkt(
char ** ppszDstText,
2173 virtual double get_Length()
const;
2174 virtual double get_Area()
const;
2177 virtual int getDimension()
const override;
2178 virtual void getEnvelope( OGREnvelope * psEnvelope )
const override;
2179 virtual void getEnvelope( OGREnvelope3D * psEnvelope )
const override;
2182 int getNumGeometries()
const;
2190 virtual void setCoordinateDimension(
int nDimension )
override;
2191 virtual void set3D(
OGRBoolean bIs3D )
override;
2192 virtual void setMeasured(
OGRBoolean bIsMeasured )
override;
2195 virtual OGRErr removeGeometry(
int iIndex,
int bDelete = TRUE );
2199 void closeRings()
override;
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); }
2262 virtual const char *getGeometryName()
const override;
2265 OGRErr importFromWkt(
const char ** )
override;
2274 virtual int getDimension()
const override;
2277 virtual OGRBoolean hasCurveGeometry(
int bLookForNonLinear = FALSE )
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()); }
2552 virtual const char *getGeometryName()
const override;
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); }
2623 virtual const char *getGeometryName()
const override;
2626 OGRErr importFromWkt(
const char ** )
override;
2631 virtual int getDimension()
const override;
2642 virtual OGRBoolean hasCurveGeometry(
int bLookForNonLinear = FALSE )
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); }
2702 virtual const char *getGeometryName()
const override;
2705 OGRErr importFromWkt(
const char ** )
override;
2710 virtual int getDimension()
const override;
2713 virtual OGRBoolean hasCurveGeometry(
int bLookForNonLinear = FALSE )
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); }
2777 virtual const char *getGeometryName()
const override;
2783 virtual OGRBoolean hasCurveGeometry(
int bLookForNonLinear = FALSE )
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
const OGRPolygon * toUpperClass() const
Return pointer of this in upper class.
Definition: ogr_geometry.h:2074
OGRMultiPoint * toMultiPoint()
Down-cast to OGRMultiPoint*.
Definition: ogr_geometry.h:691
virtual const char * getGeometryName() const override
Returns the geometry name of the TriangulatedSurface.
Definition: ogrtriangulatedsurface.cpp:116
virtual OGRErr PointOnSurface(OGRPoint *poPoint) const
This method relates to the SFCOM ISurface::get_PointOnSurface() method.
Definition: ogr_geometry.h:1737
OGRErr importFromWkt(const char **) override
deprecated
Definition: ogrpolyhedralsurface.cpp:353
const ChildType *const * end() const
Return end of iterator.
Definition: ogr_geometry.h:1958
OGRPoint ChildType
Type of child elements.
Definition: ogr_geometry.h:1102
virtual OGRErr importFromWkb(const unsigned char *, int, OGRwkbVariant, int &nBytesConsumedOut) override
Assign geometry from well known binary data.
Definition: ogrtriangle.cpp:188
~OGRPolyhedralSurface() override
Destructor.
virtual void closeRings()
Force rings to be closed.
Definition: ogrgeometry.cpp:4925
const OGRGeometryCollection * toUpperClass() const
Return pointer of this in upper class.
Definition: ogr_geometry.h:2636
ChildType ** begin()
Return begin of iterator.
Definition: ogr_geometry.h:2612
const ChildType *const * begin() const
Return begin of iterator.
Definition: ogr_geometry.h:2697
const OGRPolyhedralSurface * toPolyhedralSurface() const
Down-cast to OGRPolyhedralSurface*.
Definition: ogr_geometry.h:768
virtual OGRGeometry * getLinearGeometry(double dfMaxAngleStepSizeDegrees=0, const char *const *papszOptions=nullptr) const override
Return, possibly approximate, non-curve version of this geometry.
Definition: ogrpolygon.cpp:838
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
OGRMultiLineString * toMultiLineString()
Down-cast to OGRMultiLineString*.
Definition: ogr_geometry.h:705
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:2488
double y
y
Definition: ogr_geometry.h:75
virtual const char * getGeometryName() const override
Fetch WKT name for geometry type.
Definition: ogrtriangle.cpp:151
OGRCurve ChildType
Type of child elements.
Definition: ogr_geometry.h:1799
virtual OGRErr exportToWkt(char **ppszDstText, OGRwkbVariant=wkbVariantOldOgc) const override
Convert a geometry into well known text format.
Definition: ogrpolygon.cpp:621
Concrete representation of a multi-vertex line.
Definition: ogr_geometry.h:1241
OGRPoint ChildType
Type of child elements.
Definition: ogr_geometry.h:2607
OGRCompoundCurve * toCompoundCurve()
Down-cast to OGRCompoundCurve*.
Definition: ogr_geometry.h:607
static OGRGeometryH ToHandle(OGRGeometry *poGeom)
Convert a OGRGeometry* to a OGRGeometryH.
Definition: ogr_geometry.h:510
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:1285
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:1882
double getX() const
Return x.
Definition: ogr_geometry.h:852
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:1286
OGRCurve * toCurve()
Down-cast to OGRCurve*.
Definition: ogr_geometry.h:537
const OGRPolygon * toPolygon() const
Down-cast to OGRPolygon*.
Definition: ogr_geometry.h:642
virtual void flattenTo2D() override
Convert geometry to strictly 2D.
Definition: ogrpolyhedralsurface.cpp:613
const ChildType *const * end() const
Return end of iterator.
Definition: ogr_geometry.h:2259
Create geometry objects from well known text/binary.
Definition: ogr_geometry.h:2817
OGRMultiPolygon * toMultiPolygon()
Down-cast to OGRMultiPolygon*.
Definition: ogr_geometry.h:719
virtual int getDimension() const override
Get the dimension of this object.
Definition: ogrpolyhedralsurface.cpp:139
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:1364
double x
x
Definition: ogr_geometry.h:73
ChildType ** begin()
Return begin of iterator.
Definition: ogr_geometry.h:2766
const ChildType *const * begin() const
Return begin of iterator.
Definition: ogr_geometry.h:2772
virtual OGRErr transform(OGRCoordinateTransformation *poCT) override
Apply arbitrary coordinate transformation to geometry.
Definition: ogrcurvepolygon.cpp:658
ChildType ** end()
Return end of iterator.
Definition: ogr_geometry.h:2768
virtual void set3D(OGRBoolean bIs3D) override
Add or remove the Z coordinate dimension.
Definition: ogrcurvepolygon.cpp:694
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:1462
virtual OGRGeometry * getCurveGeometry(const char *const *papszOptions=nullptr) const CPL_WARN_UNUSED_RESULT
Return curve version of this geometry.
Definition: ogrgeometry.cpp:3157
const OGRLinearRing * toLinearRing() const
Down-cast to OGRLinearRing*.
Definition: ogr_geometry.h:586
OGRPolyhedralSurface()
Create an empty PolyhedralSurface.
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:2487
OGRMultiSurface * toMultiSurface()
Down-cast to OGRMultiSurface*.
Definition: ogr_geometry.h:747
virtual void set3D(OGRBoolean bIs3D) override
Set the type as 3D geometry.
Definition: ogrpolyhedralsurface.cpp:978
static OGRGeometry * FromHandle(OGRGeometryH hGeom)
Convert a OGRGeometryH to a OGRGeometry*.
Definition: ogr_geometry.h:516
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
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:2285
virtual void getEnvelope(OGREnvelope *psEnvelope) const override
Computes and returns the bounding envelope for this geometry in the passed psEnvelope structure...
Definition: ogrpolyhedralsurface.cpp:193
OGRCurve * stealExteriorRingCurve()
"Steal" reference to external ring.
Definition: ogrcurvepolygon.cpp:307
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 accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:2368
const ChildType *const * begin() const
Return begin of iterator.
Definition: ogr_geometry.h:1956
int OGRBoolean
Type for a OGR boolean.
Definition: ogr_core.h:306
OGRCurve * getExteriorRingCurve()
Fetch reference to external polygon ring.
Definition: ogrcurvepolygon.cpp:201
virtual OGRBoolean hasCurveGeometry(int bLookForNonLinear=FALSE) const override
Returns if this geometry is or has curve geometry.
Definition: ogrpolygon.cpp:829
const OGRCircularString * toCircularString() const
Down-cast to OGRCircularString*.
Definition: ogr_geometry.h:600
OGRErr removeRing(int iIndex, bool bDelete=true)
Remove a geometry from the container.
Definition: ogrcurvepolygon.cpp:339
static OGRPolygon * CastToPolygon(OGRCurvePolygon *poCP)
Convert to polygon.
Definition: ogrcurvepolygon.cpp:830
unsigned char GByte
Unsigned byte type.
Definition: cpl_port.h:215
Coordinate systems services.
virtual OGRBoolean IsEmpty() const override
Checks if the PolyhedralSurface is empty.
Definition: ogrpolyhedralsurface.cpp:965
OGRTriangulatedSurface * toTriangulatedSurface()
Down-cast to OGRTriangulatedSurface*.
Definition: ogr_geometry.h:775
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:1463
OGRRawPoint()
Constructor.
Definition: ogr_geometry.h:67
OGRSurface ChildType
Type of child elements.
Definition: ogr_geometry.h:2246
const OGRLineString * toLineString() const
Down-cast to OGRLineString*.
Definition: ogr_geometry.h:572
ChildType ** begin()
Return begin of iterator.
Definition: ogr_geometry.h:1950
virtual void assignSpatialReference(OGRSpatialReference *poSR) override
Assign spatial reference to this object.
Definition: ogrcurvepolygon.cpp:708
A collection of non-overlapping OGRPolygon.
Definition: ogr_geometry.h:2311
const OGRCompoundCurve * toCompoundCurve() const
Down-cast to OGRCompoundCurve*.
Definition: ogr_geometry.h:614
OGRPoint * toPoint()
Down-cast to OGRPoint*.
Definition: ogr_geometry.h:523
virtual void segmentize(double dfMaxLength) override
Modify the geometry such it has no segment longer then the given distance.
Definition: ogrcurvepolygon.cpp:726
int OGRHasPreparedGeometrySupport()
Returns if GEOS has prepared geometry support.
Definition: ogrgeometry.cpp:5663
const ChildType *const * begin() const
Return begin of iterator.
Definition: ogr_geometry.h:2618
const ChildType *const * end() const
Return end of curve iterator.
Definition: ogr_geometry.h:1632
virtual OGRGeometry * clone() const override
Make a copy of this object.
Definition: ogrcurvepolygon.cpp:103
OGRwkbByteOrder
Enumeration to describe byte order.
Definition: ogr_core.h:489
Concrete representation of a circular string, that is to say a curve made of one or several arc circl...
Definition: ogr_geometry.h:1395
OGRCurve ChildType
Type of child elements.
Definition: ogr_geometry.h:2686
Abstract curve base class for OGRLineString, OGRCircularString and OGRCompoundCurve.
Definition: ogr_geometry.h:925
A collection of 1 or more geometry objects.
Definition: ogr_geometry.h:2095
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:2722
OGRLineString * toUpperClass()
Return pointer of this in upper class.
Definition: ogr_geometry.h:1359
Concrete representation of a closed ring.
Definition: ogr_geometry.h:1313
void setM(double mIn)
Set m.
Definition: ogr_geometry.h:878
ChildType ** begin()
Return begin of curve iterator.
Definition: ogr_geometry.h:1804
virtual void setCoordinateDimension(int nDimension) override
Set the coordinate dimension.
Definition: ogrpolyhedralsurface.cpp:1014
OGRTriangle ChildType
Type of child elements.
Definition: ogr_geometry.h:2536
OGRCircularString * toCircularString()
Down-cast to OGRCircularString*.
Definition: ogr_geometry.h:593
static OGRErr createFromWkt(char **ppszInput, OGRSpatialReference *poSRS, OGRGeometry **ppoGeom)
Deprecated.
Definition: ogr_geometry.h:2842
virtual void setMeasured(OGRBoolean bIsMeasured) override
Add or remove the M coordinate dimension.
Definition: ogrcurvepolygon.cpp:699
const OGRTriangle * toTriangle() const
Down-cast to OGRTriangle*.
Definition: ogr_geometry.h:656
ChildType ** end()
Return end of iterator.
Definition: ogr_geometry.h:2253
ChildType ** end()
Return end of iterator.
Definition: ogr_geometry.h:1952
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:2563
The CPLJSONArray class holds JSON object from CPLJSONDocument.
Definition: cpl_json.h:53
virtual OGRErr addRingDirectly(OGRCurve *poNewRing) override
Add a ring to a polygon.
Definition: ogrtriangle.cpp:246
virtual void visit(const OGRPoint *)=0
Visit OGRPoint.
const ChildType *const * end() const
Return end of iterator.
Definition: ogr_geometry.h:2774
ChildType ** end()
Return end of iterator.
Definition: ogr_geometry.h:2693
virtual int WkbSize() const override
Returns size of related binary representation.
Definition: ogrpolygon.cpp:298
virtual OGRBoolean Equals(const OGRGeometry *) const override
Returns TRUE if two geometries are equivalent.
Definition: ogrpolyhedralsurface.cpp:706
OGRGeometry visitor interface.
Definition: ogr_geometry.h:117
ChildType ** begin()
Return begin of iterator.
Definition: ogr_geometry.h:2691
const OGRCurvePolygon * toUpperClass() const
Return pointer of this in upper class.
Definition: ogr_geometry.h:2005
OGRSurface * toSurface()
Down-cast to OGRSurface*.
Definition: ogr_geometry.h:621
A collection of non-overlapping OGRSurface.
Definition: ogr_geometry.h:2232
OGRSimpleCurve * toSimpleCurve()
Down-cast to OGRSimpleCurve*.
Definition: ogr_geometry.h:551
virtual OGRErr addGeometry(const OGRGeometry *) override
Add a new geometry to a collection.
Definition: ogrtriangulatedsurface.cpp:180
const ChildType *const * end() const
Return end of iterator.
Definition: ogr_geometry.h:2549
ChildType ** end()
Return end of curve iterator.
Definition: ogr_geometry.h:1626
const ChildType *const * begin() const
Return begin of sub-geometry iterator.
Definition: ogr_geometry.h:2136
OGRwkbGeometryType OGRFromOGCGeomType(const char *pszGeomType)
Map OGCgeometry format type to corresponding OGR constants.
Definition: ogrgeometry.cpp:2288
double getX(int i) const
Get X at vertex.
Definition: ogr_geometry.h:1160
void visit(OGRPoint *) override
Visit OGRPoint.
Definition: ogr_geometry.h:170
OGRLineString ChildType
Type of child elements.
Definition: ogr_geometry.h:2761
virtual OGRErr importFromWkt(const char **ppszInput)=0
Assign geometry from well known text data.
OGRErr addGeometryDirectly(OGRGeometry *poNewGeom)
Add a geometry directly to the container.
Definition: ogrpolyhedralsurface.cpp:874
Utility class to store a collection of curves.
Definition: ogr_geometry.h:1580
Simple container for a position.
Definition: ogr_geometry.h:63
OGRPolyhedralSurface * toUpperClass()
Return pointer of this in upper class.
Definition: ogr_geometry.h:2559
OGRwkbGeometryType
List of well known binary geometry types.
Definition: ogr_core.h:317
const ChildType *const * end() const
Return end of curve iterator.
Definition: ogr_geometry.h:1812
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:2564
OGRCurvePolygon * toUpperClass()
Return pointer of this in upper class.
Definition: ogr_geometry.h:2003
const OGRPoint * toPoint() const
Down-cast to OGRPoint*.
Definition: ogr_geometry.h:530
const OGRGeometryCollection * toUpperClass() const
Return pointer of this in upper class.
Definition: ogr_geometry.h:2789
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:2203
ChildType ** begin()
Return begin of curve iterator.
Definition: ogr_geometry.h:1624
const OGRSimpleCurve * toSimpleCurve() const
Down-cast to OGRSimpleCurve*.
Definition: ogr_geometry.h:1006
Interface for a point iterator.
Definition: ogr_geometry.h:907
TriangulatedSurface class.
Definition: ogr_geometry.h:2515
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:2638
const OGRSimpleCurve * toUpperClass() const
Return pointer of this in upper class.
Definition: ogr_geometry.h:1460
virtual void swapXY() override
Swap x and y coordinates.
Definition: ogrpolyhedralsurface.cpp:1029
A collection of OGRCurve.
Definition: ogr_geometry.h:2668
const OGRGeometryCollection * toUpperClass() const
Return pointer of this in upper class.
Definition: ogr_geometry.h:2366
virtual double get_AreaOfCurveSegments() const override
Return area of curve segments.
Definition: ogrcompoundcurve.cpp:903
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:2204
Abstract base class for 2 dimensional objects like polygons or curve polygons.
Definition: ogr_geometry.h:1727
OGRGeometry visitor interface.
Definition: ogr_geometry.h:191
A collection of OGRLineString.
Definition: ogr_geometry.h:2747
OGRCurvePolygon * toCurvePolygon()
Down-cast to OGRCurvePolygon*.
Definition: ogr_geometry.h:663
Abstract base class for all geometry classes.
Definition: ogr_geometry.h:286
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:2286
OGRGeometryCollection * toUpperClass()
Return pointer of this in upper class.
Definition: ogr_geometry.h:2787
OGRMultiCurve * toMultiCurve()
Down-cast to OGRMultiCurve*.
Definition: ogr_geometry.h:733
OGRPolyhedralSurface * toPolyhedralSurface()
Down-cast to OGRPolyhedralSurface*.
Definition: ogr_geometry.h:761
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:2639
void setX(double xIn)
Set x.
Definition: ogr_geometry.h:865
const OGRGeometryCollection * toUpperClass() const
Return pointer of this in upper class.
Definition: ogr_geometry.h:2283
void sfcgal_geometry_t
SFCGAL geometry type.
Definition: ogr_geometry.h:83
ChildType ** begin()
Return begin of iterator.
Definition: ogr_geometry.h:2541
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:2007
OGRTriangle & operator=(const OGRTriangle &other)
Assignment operator.
Definition: ogrtriangle.cpp:138
double getM() const
Return m.
Definition: ogr_geometry.h:858
const ChildType *const * begin() const
Return begin of curve iterator.
Definition: ogr_geometry.h:1810
void OGRDestroyPreparedGeometry(OGRPreparedGeometry *poPreparedGeom)
Destroys a prepared geometry.
Definition: ogrgeometry.cpp:5719
virtual int ContainsPoint(const OGRPoint *p) const
Returns if a point is contained in a (closed) curve.
Definition: ogrcurve.cpp:396
struct GEOSGeom_t * GEOSGeom
GEOS geometry type.
Definition: ogr_geometry.h:79
OGRGeometry visitor default implementation.
Definition: ogr_geometry.h:164
virtual int getNumPoints() const override
Fetch vertex count.
Definition: ogr_geometry.h:1158
virtual void flattenTo2D() override
Convert geometry to strictly 2D.
Definition: ogrcurvepolygon.cpp:165
virtual OGRErr importFromWkb(const unsigned char *, int, OGRwkbVariant, int &nBytesConsumedOut) override
Assign geometry from well known binary data.
Definition: ogrpolyhedralsurface.cpp:211
ChildType ** begin()
Return begin of iterator.
Definition: ogr_geometry.h:2343
virtual void empty() override
Clear geometry information.
Definition: ogrcurvepolygon.cpp:128
OGRTriangle * toTriangle()
Down-cast to OGRTriangle*.
Definition: ogr_geometry.h:649
void setZ(double zIn)
Set z.
Definition: ogr_geometry.h:873
OGRErr removeGeometry(int iIndex, int bDelete=TRUE)
Remove a geometry from the container.
Definition: ogrpolyhedralsurface.cpp:1065
OGRPoint ChildType
Type of child elements.
Definition: ogr_geometry.h:968
virtual double get_Area() const override
Get the area of the surface object.
Definition: ogrcurvepolygon.cpp:668
double getY() const
Return y.
Definition: ogr_geometry.h:854
Core portability services for cross-platform OGR code.
virtual int IntersectsPoint(const OGRPoint *p) const
Returns if a point intersects a (closed) curve.
Definition: ogrcurve.cpp:416
ChildType ** end()
Return end of sub-geometry iterator.
Definition: ogr_geometry.h:2132
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:1363
virtual void setMeasured(OGRBoolean bIsMeasured) override
Set the type as Measured.
Definition: ogrpolyhedralsurface.cpp:993
OGRLineString * toLineString()
Down-cast to OGRLineString*.
Definition: ogr_geometry.h:565
OGRErr importFromWkt(const char **) override
deprecated
Definition: ogrpolygon.cpp:445
int OGRPreparedGeometryIntersects(const OGRPreparedGeometry *poPreparedGeom, const OGRGeometry *poOtherGeom)
Returns whether a prepared geometry intersects with a geometry.
Definition: ogrgeometry.cpp:5741
Concrete class representing curve polygons.
Definition: ogr_geometry.h:1762
OGRLinearRing * toLinearRing()
Down-cast to OGRLinearRing*.
Definition: ogr_geometry.h:579
OGRBoolean IsMeasured() const
Definition: ogr_geometry.h:364
const OGRTriangulatedSurface * toTriangulatedSurface() const
Down-cast to OGRTriangulatedSurface*.
Definition: ogr_geometry.h:782
virtual OGRGeometry * clone() const override
Make a copy of this object.
Definition: ogrpolyhedralsurface.cpp:166
int getNumInteriorRings() const
Fetch the number of internal rings.
Definition: ogrcurvepolygon.cpp:238
const OGRSimpleCurve * toSimpleCurve() const
Down-cast to OGRSimpleCurve*.
Definition: ogr_geometry.h:558
virtual OGRBoolean hasCurveGeometry(int bLookForNonLinear=FALSE) const override
Returns if this geometry is or has curve geometry.
Definition: ogrpolyhedralsurface.cpp:1039
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:2077
PolyhedralSurface class.
Definition: ogr_geometry.h:2396
const OGRMultiCurve * toMultiCurve() const
Down-cast to OGRMultiCurve*.
Definition: ogr_geometry.h:740
const ChildType *const * begin() const
Return begin of iterator.
Definition: ogr_geometry.h:2435
OGRGeometryCollection * toUpperClass()
Return pointer of this in upper class.
Definition: ogr_geometry.h:2717
virtual int getDimension() const override
Get the dimension of this object.
Definition: ogrcurvepolygon.cpp:155
Various convenience functions for CPL.
void setY(double yIn)
Set y.
Definition: ogr_geometry.h:869
virtual void visit(OGRPoint *)=0
Visit OGRPoint.
This class represents an OpenGIS Spatial Reference System, and contains methods for converting betwee...
Definition: ogr_spatialref.h:147
OGRGeometryCollection * toUpperClass()
Return pointer of this in upper class.
Definition: ogr_geometry.h:2634
OGRCurve ChildType
Type of child elements.
Definition: ogr_geometry.h:1619
struct _OGRPreparedGeometry OGRPreparedGeometry
Prepared geometry API (needs GEOS >= 3.1.0)
Definition: ogr_geometry.h:2910
Old-style 99-402 extended dimension (Z) WKB types.
Definition: ogr_core.h:425
virtual OGRErr transform(OGRCoordinateTransformation *) override
Apply arbitrary coordinate transformation to geometry.
Definition: ogrpolyhedralsurface.cpp:625
ChildType ** begin()
Return begin of iterator.
Definition: ogr_geometry.h:2251
const ChildType *const * end() const
Return end of iterator.
Definition: ogr_geometry.h:2437
const OGRGeometryCollection * toGeometryCollection() const
Down-cast to OGRGeometryCollection*.
Definition: ogr_geometry.h:684
double getY(int i) const
Get Y at vertex.
Definition: ogr_geometry.h:1161
OGRCurvePolygon()
Create an empty curve polygon.
const OGRMultiPoint * toMultiPoint() const
Down-cast to OGRMultiPoint*.
Definition: ogr_geometry.h:698
OGRGeometryCollection * toUpperClass()
Return pointer of this in upper class.
Definition: ogr_geometry.h:2281
std::unique_ptr< OGRGeometry, OGRGeometryUniquePtrDeleter > OGRGeometryUniquePtr
Unique pointer type for OGRGeometry.
Definition: ogr_geometry.h:797
Interface for read and write JSON documents.
virtual void swapXY() override
Swap x and y coordinates.
Definition: ogrcurvepolygon.cpp:740
OGRPreparedGeometry * OGRCreatePreparedGeometry(const OGRGeometry *poGeom)
Creates a prepared geometry.
Definition: ogrgeometry.cpp:5683
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:2008
const OGRPolyhedralSurface * toUpperClass() const
Return pointer of this in upper class.
Definition: ogr_geometry.h:2561
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:892
virtual OGRErr exportToWkb(OGRwkbByteOrder, unsigned char *, OGRwkbVariant=wkbVariantOldOgc) const override
Convert a geometry into well known binary format.
Definition: ogrpolygon.cpp:372
virtual void empty() override
Clear geometry information.
Definition: ogrpolyhedralsurface.cpp:148
virtual OGRBoolean Intersects(const OGRGeometry *) const override
Do these features intersect?
Definition: ogrcurvepolygon.cpp:799
Point class.
Definition: ogr_geometry.h:809
void * OGRGeometryH
Opaque type for a geometry.
Definition: ogr_api.h:60
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:2791
const ChildType *const * end() const
Return end of iterator.
Definition: ogr_geometry.h:2620
OGRwkbVariant
Output variants of WKB we support.
Definition: ogr_core.h:423
virtual OGRBoolean IsEmpty() const override
Returns TRUE (non-zero) if the object has no points.
Definition: ogr_geometry.h:847
OGRErr importFromWkt(char **ppszInput) CPL_WARN_DEPRECATED("Use importFromWkt( const char**) instead")
Deprecated.
Definition: ogr_geometry.h:386
const OGRSurface * toSurface() const
Down-cast to OGRSurface*.
Definition: ogr_geometry.h:628
OGRSpatialReference * getSpatialReference(void) const
Returns spatial reference system for object.
Definition: ogr_geometry.h:434
OGRLinearRing ChildType
Type of child elements.
Definition: ogr_geometry.h:1945
const ChildType *const * end() const
Return end of iterator.
Definition: ogr_geometry.h:2699
virtual OGRwkbGeometryType getGeometryType() const override
Returns the WKB Type of TriangulatedSurface.
Definition: ogrtriangulatedsurface.cpp:130
const OGRCurvePolygon * toCurvePolygon() const
Down-cast to OGRCurvePolygon*.
Definition: ogr_geometry.h:670
OGRGeometryCollection * toUpperClass()
Return pointer of this in upper class.
Definition: ogr_geometry.h:2364
OGRSimpleCurve * toSimpleCurve()
Down-cast to OGRSimpleCurve*.
Definition: ogr_geometry.h:1001
OGRPolygon * toPolygon()
Down-cast to OGRPolygon*.
Definition: ogr_geometry.h:635
Concrete class representing polygons.
Definition: ogr_geometry.h:1912
Abstract curve base class for OGRLineString and OGRCircularString.
Definition: ogr_geometry.h:1034
const OGRGeometryCollection * toUpperClass() const
Return pointer of this in upper class.
Definition: ogr_geometry.h:2719
struct GEOSContextHandle_HS * GEOSContextHandle_t
GEOS context handle type.
Definition: ogr_geometry.h:81
OGRGeometryCollection * toGeometryCollection()
Down-cast to OGRGeometryCollection*.
Definition: ogr_geometry.h:677
OGRGeometry ChildType
Type of child elements.
Definition: ogr_geometry.h:2125
virtual double get_Area() const override
Returns the area enclosed.
Definition: ogrpolyhedralsurface.cpp:746
OGRGeometry visitor default implementation.
Definition: ogr_geometry.h:238
OGRTriangulatedSurface & operator=(const OGRTriangulatedSurface &other)
Assignment operator.
Definition: ogrtriangulatedsurface.cpp:84
virtual OGRErr exportToWkb(OGRwkbByteOrder, unsigned char *, OGRwkbVariant=wkbVariantOldOgc) const override
Convert a geometry into well known binary format.
Definition: ogrpolyhedralsurface.cpp:303
OGRRawPoint(double xIn, double yIn)
Constructor.
Definition: ogr_geometry.h:70
virtual void closeRings() override
Force rings to be closed.
Definition: ogrpolygon.cpp:807
void visit(const OGRPoint *) override
Visit OGRPoint.
Definition: ogr_geometry.h:244
OGRSimpleCurve * toUpperClass()
Return pointer of this in upper class.
Definition: ogr_geometry.h:1281
const OGRCurve * toCurve() const
Down-cast to OGRCurve*.
Definition: ogr_geometry.h:544
OGRPolygon ChildType
Type of child elements.
Definition: ogr_geometry.h:2338
ChildType ** end()
Return end of iterator.
Definition: ogr_geometry.h:2431
static OGRMultiPolygon * CastToMultiPolygon(OGRPolyhedralSurface *poPS)
Casts the OGRPolyhedralSurface to an OGRMultiPolygon.
Definition: ogrpolyhedralsurface.cpp:817
const OGRMultiSurface * toMultiSurface() const
Down-cast to OGRMultiSurface*.
Definition: ogr_geometry.h:754
ChildType ** end()
Return end of iterator.
Definition: ogr_geometry.h:2345
const ChildType *const * begin() const
Return begin of iterator.
Definition: ogr_geometry.h:2257
OGRSimpleCurve * toUpperClass()
Return pointer of this in upper class.
Definition: ogr_geometry.h:1458
std::unique_ptr< OGRPreparedGeometry, OGRPreparedGeometryUniquePtrDeleter > OGRPreparedGeometryUniquePtr
Unique pointer type for OGRPreparedGeometry.
Definition: ogr_geometry.h:2929
OGRPolygon * toUpperClass()
Return pointer of this in upper class.
Definition: ogr_geometry.h:2072
OGRLayer::FeatureIterator begin(OGRLayer *poLayer)
Return begin of feature iterator.
Definition: ogrsf_frmts.h:287
virtual OGRBoolean IsEmpty() const override
Returns TRUE (non-zero) if the object has no points.
Definition: ogrcurvepolygon.cpp:717
const ChildType *const * end() const
Return end of iterator.
Definition: ogr_geometry.h:2351
int OGRPreparedGeometryContains(const OGRPreparedGeometry *poPreparedGeom, const OGRGeometry *poOtherGeom)
Returns whether a prepared geometry contains a geometry.
Definition: ogrgeometry.cpp:5771
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:891
virtual OGRErr addRing(OGRCurve *)
Add a ring to a polygon.
Definition: ogrcurvepolygon.cpp:362
virtual OGRErr exportToWkt(char **ppszDstText, OGRwkbVariant=wkbVariantOldOgc) const override
Convert a geometry into well known text format.
Definition: ogrpolyhedralsurface.cpp:448
virtual int WkbSize() const override
Returns size of related binary representation.
Definition: ogrpolyhedralsurface.cpp:125
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:1700
Triangle class.
Definition: ogr_geometry.h:2035
ChildType ** begin()
Return begin of iterator.
Definition: ogr_geometry.h:2429
OGRPolygon ChildType
Type of child elements.
Definition: ogr_geometry.h:2424
const ChildType *const * end() const
Return end of sub-geometry iterator.
Definition: ogr_geometry.h:2138
const OGRLineString * toUpperClass() const
Return pointer of this in upper class.
Definition: ogr_geometry.h:1361
int OGRErr
Simple container for a bounding region.
Definition: ogr_core.h:290
bool operator==(const OGRGeometry &other) const
Returns if two geometries are equal.
Definition: ogr_geometry.h:349
virtual OGRBoolean Contains(const OGRGeometry *) const override
Test for containment.
Definition: ogrcurvepolygon.cpp:783
virtual OGRErr PointOnSurface(OGRPoint *) const override
This method relates to the SFCOM ISurface::get_PointOnSurface() method.
Definition: ogrpolyhedralsurface.cpp:773
ChildType ** end()
Return end of iterator.
Definition: ogr_geometry.h:2614
const OGRMultiPolygon * toMultiPolygon() const
Down-cast to OGRMultiPolygon*.
Definition: ogr_geometry.h:726
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:2792
bool operator!=(const OGRGeometry &other) const
Returns if two geometries are different.
Definition: ogr_geometry.h:352
int getNumGeometries() const
Fetch number of geometries in PolyhedralSurface.
Definition: ogrpolyhedralsurface.cpp:906
const ChildType *const * begin() const
Return begin of curve iterator.
Definition: ogr_geometry.h:1630
const char * OGRToOGCGeomType(OGRwkbGeometryType eGeomType)
Map OGR geometry format constants to corresponding OGC geometry type.
Definition: ogrgeometry.cpp:2361
OGRLayer::FeatureIterator end(OGRLayer *poLayer)
Return end of feature iterator.
Definition: ogrsf_frmts.h:292
const OGRMultiLineString * toMultiLineString() const
Down-cast to OGRMultiLineString*.
Definition: ogr_geometry.h:712
virtual OGRwkbGeometryType getGeometryType() const override
Fetch geometry type.
Definition: ogrtriangle.cpp:160
A collection of OGRPoint.
Definition: ogr_geometry.h:2590
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:1881
virtual void assignSpatialReference(OGRSpatialReference *poSR) override
Assign spatial reference to this object.
Definition: ogrpolyhedralsurface.cpp:1074
const ChildType *const * begin() const
Return begin of iterator.
Definition: ogr_geometry.h:2547
const ChildType *const * begin() const
Return begin of iterator.
Definition: ogr_geometry.h:2349
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:2369
double getZ() const
Return z.
Definition: ogr_geometry.h:856
OGRBoolean Is3D() const
Definition: ogr_geometry.h:362
OGRCurve * getInteriorRingCurve(int)
Fetch reference to indicated internal ring.
Definition: ogrcurvepolygon.cpp:266
ChildType ** begin()
Return begin of sub-geometry iterator.
Definition: ogr_geometry.h:2130
const OGRSimpleCurve * toUpperClass() const
Return pointer of this in upper class.
Definition: ogr_geometry.h:1283
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:1701
ChildType ** end()
Return end of iterator.
Definition: ogr_geometry.h:2543
virtual OGRPolygon * CurvePolyToPoly(double dfMaxAngleStepSizeDegrees=0, const char *const *papszOptions=nullptr) const override
Return a polygon from a curve polygon.
Definition: ogrpolygon.cpp:818
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:2721
#define CPL_WARN_UNUSED_RESULT
Qualifier to warn when the return value of a function is not used.
Definition: cpl_port.h:931
OGRGeometry * getGeometryRef(int i)
Fetch geometry from container.
Definition: ogrpolyhedralsurface.cpp:928
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:2076
virtual OGRBoolean Equals(const OGRGeometry *) const override
Returns TRUE if two geometries are equivalent.
Definition: ogrcurvepolygon.cpp:639