Go to the documentation of this file.
32 #ifndef OGR_GEOMETRY_H_INCLUDED
33 #define OGR_GEOMETRY_H_INCLUDED
50 #ifndef DEFINEH_OGRGeometryH
51 #define DEFINEH_OGRGeometryH
86 static int defPrecision = getDefaultPrecision();
87 static bool defRound = getDefaultRound();
89 precision = defPrecision;
97 static int getDefaultPrecision();
98 static bool getDefaultRound();
245 virtual void visit(
const OGRPoint *) = 0;
341 friend class OGRCurveCollection;
343 unsigned int flags = 0;
345 OGRErr importPreambleFromWkt(
const char **ppszInput,
int *pbHasZ,
346 int *pbHasM,
bool *pbIsEmpty);
347 OGRErr importCurveCollectionFromWkt(
348 const char **ppszInput,
int bAllowEmptyComponent,
int bAllowLineString,
349 int bAllowCurve,
int bAllowCompoundCurve,
351 OGRErr importPreambleFromWkb(
const unsigned char *pabyData,
size_t nSize,
354 OGRErr importPreambleOfCollectionFromWkb(
const unsigned char *pabyData,
355 size_t &nSize,
size_t &nDataOffset,
357 size_t nMinSubGeomSize,
363 void HomogenizeDimensionalityWith(
OGRGeometry *poOtherGeom);
377 static const unsigned int OGR_G_NOT_EMPTY_POINT = 0x1;
378 static const unsigned int OGR_G_3D = 0x2;
379 static const unsigned int OGR_G_MEASURED = 0x4;
391 return CPL_TO_BOOL(Equals(&other));
397 return !CPL_TO_BOOL(Equals(&other));
401 virtual int getDimension()
const = 0;
402 virtual int getCoordinateDimension()
const;
403 int CoordinateDimension()
const;
412 return (flags & OGR_G_3D) != 0;
417 return (flags & OGR_G_MEASURED) != 0;
420 virtual void empty() = 0;
422 virtual
void getEnvelope(
OGREnvelope *psEnvelope) const = 0;
423 virtual
void getEnvelope(
OGREnvelope3D *psEnvelope) const = 0;
426 virtual
size_t WkbSize() const = 0;
427 OGRErr importFromWkb(const
GByte *,
size_t = static_cast<
size_t>(-1),
430 size_t &nBytesConsumedOut) = 0;
433 virtual
OGRErr importFromWkt(const
char **ppszInput) = 0;
441 CPL_WARN_DEPRECATED(
"Use importFromWkt(const char**) instead")
444 return importFromWkt(
const_cast<const char **
>(ppszInput));
448 OGRErr exportToWkt(
char **ppszDstText,
456 OGRErr *err =
nullptr)
const = 0;
461 virtual const char *getGeometryName()
const = 0;
462 void dumpReadable(FILE *,
const char * =
nullptr,
464 std::string dumpReadable(
const char * =
nullptr,
466 virtual void flattenTo2D() = 0;
467 virtual char *exportToGML(
const char *
const *papszOptions =
nullptr)
const;
468 virtual char *exportToKML()
const;
469 virtual char *exportToJson()
const;
481 virtual OGRBoolean hasCurveGeometry(
int bLookForNonLinear = FALSE)
const;
485 double dfMaxAngleStepSizeDegrees = 0,
493 virtual
void closeRings();
495 virtual
void setCoordinateDimension(
int nDimension);
497 virtual
void setMeasured(
OGRBoolean bIsMeasured);
508 virtual void segmentize(
double dfMaxLength);
525 virtual
double Distance(const
OGRGeometry *) const;
547 DelaunayTriangulation(
double dfTolerance,
552 virtual
double Distance3D(const
OGRGeometry *poOtherGeom) const;
557 CPL_WARN_DEPRECATED("Non standard method. "
558 "Use Intersects() instead");
560 CPL_WARN_DEPRECATED("Non standard method. "
561 "Use Equals() instead");
563 CPL_WARN_DEPRECATED("Non standard method. "
564 "Use SymDifference() instead");
566 CPL_WARN_DEPRECATED("Non standard method. "
567 "Use Boundary() instead");
572 static
int bGenerate_DB2_V72_BYTE_ORDER;
575 virtual
void swapXY();
606 return cpl::down_cast<OGRPoint *>(
this);
615 return cpl::down_cast<const OGRPoint *>(
this);
625 return cpl::down_cast<OGRCurve *>(
this);
635 return cpl::down_cast<const OGRCurve *>(
this);
645 return cpl::down_cast<OGRSimpleCurve *>(
this);
655 return cpl::down_cast<const OGRSimpleCurve *>(
this);
665 return cpl::down_cast<OGRLineString *>(
this);
675 return cpl::down_cast<const OGRLineString *>(
this);
684 return cpl::down_cast<OGRLinearRing *>(
this);
693 return cpl::down_cast<const OGRLinearRing *>(
this);
703 return cpl::down_cast<OGRCircularString *>(
this);
713 return cpl::down_cast<const OGRCircularString *>(
this);
723 return cpl::down_cast<OGRCompoundCurve *>(
this);
733 return cpl::down_cast<const OGRCompoundCurve *>(
this);
743 return cpl::down_cast<OGRSurface *>(
this);
753 return cpl::down_cast<const OGRSurface *>(
this);
763 return cpl::down_cast<OGRPolygon *>(
this);
773 return cpl::down_cast<const OGRPolygon *>(
this);
782 return cpl::down_cast<OGRTriangle *>(
this);
791 return cpl::down_cast<const OGRTriangle *>(
this);
801 return cpl::down_cast<OGRCurvePolygon *>(
this);
811 return cpl::down_cast<const OGRCurvePolygon *>(
this);
821 return cpl::down_cast<OGRGeometryCollection *>(
this);
831 return cpl::down_cast<const OGRGeometryCollection *>(
this);
841 return cpl::down_cast<OGRMultiPoint *>(
this);
851 return cpl::down_cast<const OGRMultiPoint *>(
this);
861 return cpl::down_cast<OGRMultiLineString *>(
this);
871 return cpl::down_cast<const OGRMultiLineString *>(
this);
881 return cpl::down_cast<OGRMultiPolygon *>(
this);
891 return cpl::down_cast<const OGRMultiPolygon *>(
this);
901 return cpl::down_cast<OGRMultiCurve *>(
this);
911 return cpl::down_cast<const OGRMultiCurve *>(
this);
921 return cpl::down_cast<OGRMultiSurface *>(
this);
931 return cpl::down_cast<const OGRMultiSurface *>(
this);
941 return cpl::down_cast<OGRPolyhedralSurface *>(
this);
951 return cpl::down_cast<const OGRPolyhedralSurface *>(
this);
960 return cpl::down_cast<OGRTriangulatedSurface *>(
this);
969 return cpl::down_cast<const OGRTriangulatedSurface *>(
this);
974 struct CPL_DLL OGRGeometryUniquePtrDeleter
983 typedef std::unique_ptr<OGRGeometry, OGRGeometryUniquePtrDeleter>
987 #define OGR_FORBID_DOWNCAST_TO(name) \
988 inline OGR##name *to##name() = delete; \
989 inline const OGR##name *to##name() const = delete;
991 #define OGR_FORBID_DOWNCAST_TO_POINT OGR_FORBID_DOWNCAST_TO(Point)
992 #define OGR_FORBID_DOWNCAST_TO_CURVE OGR_FORBID_DOWNCAST_TO(Curve)
993 #define OGR_FORBID_DOWNCAST_TO_SIMPLE_CURVE OGR_FORBID_DOWNCAST_TO(SimpleCurve)
994 #define OGR_FORBID_DOWNCAST_TO_LINESTRING OGR_FORBID_DOWNCAST_TO(LineString)
995 #define OGR_FORBID_DOWNCAST_TO_LINEARRING OGR_FORBID_DOWNCAST_TO(LinearRing)
996 #define OGR_FORBID_DOWNCAST_TO_CIRCULARSTRING \
997 OGR_FORBID_DOWNCAST_TO(CircularString)
998 #define OGR_FORBID_DOWNCAST_TO_COMPOUNDCURVE \
999 OGR_FORBID_DOWNCAST_TO(CompoundCurve)
1000 #define OGR_FORBID_DOWNCAST_TO_SURFACE OGR_FORBID_DOWNCAST_TO(Surface)
1001 #define OGR_FORBID_DOWNCAST_TO_CURVEPOLYGON OGR_FORBID_DOWNCAST_TO(CurvePolygon)
1002 #define OGR_FORBID_DOWNCAST_TO_POLYGON OGR_FORBID_DOWNCAST_TO(Polygon)
1003 #define OGR_FORBID_DOWNCAST_TO_TRIANGLE OGR_FORBID_DOWNCAST_TO(Triangle)
1004 #define OGR_FORBID_DOWNCAST_TO_MULTIPOINT OGR_FORBID_DOWNCAST_TO(MultiPoint)
1005 #define OGR_FORBID_DOWNCAST_TO_MULTICURVE OGR_FORBID_DOWNCAST_TO(MultiCurve)
1006 #define OGR_FORBID_DOWNCAST_TO_MULTILINESTRING \
1007 OGR_FORBID_DOWNCAST_TO(MultiLineString)
1008 #define OGR_FORBID_DOWNCAST_TO_MULTISURFACE OGR_FORBID_DOWNCAST_TO(MultiSurface)
1009 #define OGR_FORBID_DOWNCAST_TO_MULTIPOLYGON OGR_FORBID_DOWNCAST_TO(MultiPolygon)
1010 #define OGR_FORBID_DOWNCAST_TO_GEOMETRYCOLLECTION \
1011 OGR_FORBID_DOWNCAST_TO(GeometryCollection)
1012 #define OGR_FORBID_DOWNCAST_TO_POLYHEDRALSURFACE \
1013 OGR_FORBID_DOWNCAST_TO(PolyhedralSurface)
1014 #define OGR_FORBID_DOWNCAST_TO_TIN OGR_FORBID_DOWNCAST_TO(TriangulatedSurface)
1016 #define OGR_ALLOW_UPCAST_TO(name) \
1017 inline OGR##name *to##name() \
1021 inline const OGR##name *to##name() const \
1026 #ifndef SUPPRESS_OGR_ALLOW_CAST_TO_THIS_WARNING
1027 #define CAST_TO_THIS_WARNING CPL_WARN_DEPRECATED("Casting to this is useless")
1029 #define CAST_TO_THIS_WARNING
1032 #define OGR_ALLOW_CAST_TO_THIS(name) \
1033 inline OGR##name *to##name() CAST_TO_THIS_WARNING \
1037 inline const OGR##name *to##name() const CAST_TO_THIS_WARNING \
1042 #define OGR_FORBID_DOWNCAST_TO_ALL_CURVES \
1043 OGR_FORBID_DOWNCAST_TO_CURVE \
1044 OGR_FORBID_DOWNCAST_TO_SIMPLE_CURVE \
1045 OGR_FORBID_DOWNCAST_TO_LINESTRING \
1046 OGR_FORBID_DOWNCAST_TO_LINEARRING \
1047 OGR_FORBID_DOWNCAST_TO_CIRCULARSTRING \
1048 OGR_FORBID_DOWNCAST_TO_COMPOUNDCURVE
1050 #define OGR_FORBID_DOWNCAST_TO_ALL_SURFACES \
1051 OGR_FORBID_DOWNCAST_TO_SURFACE \
1052 OGR_FORBID_DOWNCAST_TO_CURVEPOLYGON \
1053 OGR_FORBID_DOWNCAST_TO_POLYGON \
1054 OGR_FORBID_DOWNCAST_TO_TRIANGLE \
1055 OGR_FORBID_DOWNCAST_TO_POLYHEDRALSURFACE \
1056 OGR_FORBID_DOWNCAST_TO_TIN
1058 #define OGR_FORBID_DOWNCAST_TO_ALL_SINGLES \
1059 OGR_FORBID_DOWNCAST_TO_POINT \
1060 OGR_FORBID_DOWNCAST_TO_ALL_CURVES \
1061 OGR_FORBID_DOWNCAST_TO_ALL_SURFACES
1063 #define OGR_FORBID_DOWNCAST_TO_ALL_MULTI \
1064 OGR_FORBID_DOWNCAST_TO_GEOMETRYCOLLECTION \
1065 OGR_FORBID_DOWNCAST_TO_MULTIPOINT \
1066 OGR_FORBID_DOWNCAST_TO_MULTICURVE \
1067 OGR_FORBID_DOWNCAST_TO_MULTILINESTRING \
1068 OGR_FORBID_DOWNCAST_TO_MULTISURFACE \
1069 OGR_FORBID_DOWNCAST_TO_MULTIPOLYGON
1093 OGRPoint(
double x,
double y,
double z);
1094 OGRPoint(
double x,
double y,
double z,
double m);
1096 static OGRPoint *createXYM(
double x,
double y,
double m);
1102 size_t WkbSize()
const override;
1104 size_t &nBytesConsumedOut)
override;
1123 OGRErr *err =
nullptr)
const override;
1128 virtual void empty()
override;
1133 return !(flags & OGR_G_NOT_EMPTY_POINT);
1166 if (std::isnan(x) || std::isnan(y))
1167 flags &= ~OGR_G_NOT_EMPTY_POINT;
1169 flags |= OGR_G_NOT_EMPTY_POINT;
1177 if (std::isnan(x) || std::isnan(y))
1178 flags &= ~OGR_G_NOT_EMPTY_POINT;
1180 flags |= OGR_G_NOT_EMPTY_POINT;
1196 flags |= OGR_G_MEASURED;
1211 visitor->
visit(
this);
1215 visitor->
visit(
this);
1218 virtual void swapXY()
override;
1220 OGR_ALLOW_CAST_TO_THIS(Point)
1221 OGR_FORBID_DOWNCAST_TO_ALL_CURVES
1222 OGR_FORBID_DOWNCAST_TO_ALL_SURFACES
1223 OGR_FORBID_DOWNCAST_TO_ALL_MULTI
1261 virtual OGRCurveCasterToLineString GetCasterToLineString()
const = 0;
1262 virtual OGRCurveCasterToLinearRing GetCasterToLinearRing()
const = 0;
1272 class CPL_DLL ConstIterator
1275 std::unique_ptr<Private> m_poPrivate;
1278 ConstIterator(
const OGRCurve *poSelf,
bool bStart);
1279 ConstIterator(ConstIterator &&oOther) noexcept;
1280 ConstIterator &operator=(ConstIterator &&oOther);
1283 ConstIterator &operator++();
1284 bool operator!=(
const ConstIterator &it)
const;
1288 friend inline ConstIterator
end(
const OGRCurve *);
1308 ConstIterator
begin()
const;
1310 ConstIterator
end()
const;
1313 virtual OGRCurve *clone()
const override = 0;
1316 virtual double get_Length()
const = 0;
1317 virtual void StartPoint(
OGRPoint *)
const = 0;
1318 virtual void EndPoint(
OGRPoint *)
const = 0;
1319 virtual int get_IsClosed()
const;
1320 virtual void Value(
double,
OGRPoint *)
const = 0;
1322 CurveToLine(
double dfMaxAngleStepSizeDegrees = 0,
1323 const char *
const *papszOptions =
nullptr)
const = 0;
1324 virtual int getDimension()
const override;
1327 virtual int getNumPoints()
const = 0;
1330 virtual double get_Area()
const = 0;
1331 virtual int isClockwise()
const;
1338 return cpl::down_cast<OGRSimpleCurve *>(
this);
1346 return cpl::down_cast<const OGRSimpleCurve *>(
this);
1353 OGR_FORBID_DOWNCAST_TO_POINT
1354 OGR_ALLOW_CAST_TO_THIS(Curve)
1355 OGR_FORBID_DOWNCAST_TO_ALL_SURFACES
1356 OGR_FORBID_DOWNCAST_TO_ALL_MULTI
1361 inline OGRCurve::ConstIterator
begin(
const OGRCurve *poCurve)
1363 return poCurve->begin();
1366 inline OGRCurve::ConstIterator
end(
const OGRCurve *poCurve)
1368 return poCurve->end();
1413 void setX(
double xIn);
1417 void setY(
double yIn);
1421 void setZ(
double zIn);
1425 void setM(
double mIn);
1448 int m_nPointCapacity = 0;
1458 OGRErr importFromWKTListOnly(
const char **ppszInput,
int bHasZ,
int bHasM,
1463 virtual double get_LinearArea()
const;
1469 class CPL_DLL Iterator
1472 std::unique_ptr<Private> m_poPrivate;
1477 Iterator(Iterator &&oOther) noexcept;
1481 Iterator &operator++();
1482 bool operator!=(
const Iterator &it)
const;
1488 class CPL_DLL ConstIterator
1491 std::unique_ptr<Private> m_poPrivate;
1496 ConstIterator &&oOther) noexcept;
1500 ConstIterator &operator++();
1501 bool operator!=(
const ConstIterator &it)
const;
1534 ConstIterator
begin()
const;
1536 ConstIterator
end()
const;
1539 virtual size_t WkbSize()
const override;
1541 size_t &nBytesConsumedOut)
override;
1549 OGRErr importFromWkt(
const char **)
override;
1560 OGRErr *err =
nullptr)
const override;
1563 virtual void empty()
override;
1564 virtual void getEnvelope(
OGREnvelope *psEnvelope)
const override;
1565 virtual void getEnvelope(
OGREnvelope3D *psEnvelope)
const override;
1570 virtual double get_Length()
const override;
1571 virtual void StartPoint(
OGRPoint *)
const override;
1572 virtual void EndPoint(
OGRPoint *)
const override;
1573 virtual void Value(
double,
OGRPoint *)
const override;
1574 virtual double Project(
const OGRPoint *)
const;
1575 virtual OGRLineString *getSubLine(
double,
double,
int)
const;
1582 void getPoint(
int,
OGRPoint *)
const;
1585 return paoPoints[i].
x;
1589 return paoPoints[i].
y;
1591 double getZ(
int i)
const;
1592 double getM(
int i)
const;
1598 virtual void setCoordinateDimension(
int nDimension)
override;
1599 virtual void set3D(
OGRBoolean bIs3D)
override;
1600 virtual void setMeasured(
OGRBoolean bIsMeasured)
override;
1601 void setNumPoints(
int nNewPointCount,
int bZeroizeNewContent = TRUE);
1603 void setPoint(
int,
double,
double);
1604 void setZ(
int,
double);
1605 void setM(
int,
double);
1606 void setPoint(
int,
double,
double,
double);
1607 void setPointM(
int,
double,
double,
double);
1608 void setPoint(
int,
double,
double,
double,
double);
1609 void setPoints(
int,
const OGRRawPoint *,
const double * =
nullptr);
1610 void setPointsM(
int,
const OGRRawPoint *,
const double *);
1611 void setPoints(
int,
const OGRRawPoint *,
const double *,
const double *);
1612 void setPoints(
int,
const double *padfX,
const double *padfY,
1613 const double *padfZIn =
nullptr);
1614 void setPointsM(
int,
const double *padfX,
const double *padfY,
1615 const double *padfMIn =
nullptr);
1616 void setPoints(
int,
const double *padfX,
const double *padfY,
1617 const double *padfZIn,
const double *padfMIn);
1619 void addPoint(
double,
double);
1620 void addPoint(
double,
double,
double);
1621 void addPointM(
double,
double,
double);
1622 void addPoint(
double,
double,
double,
double);
1624 bool removePoint(
int);
1626 void getPoints(
OGRRawPoint *,
double * =
nullptr)
const;
1627 void getPoints(
void *pabyX,
int nXStride,
void *pabyY,
int nYStride,
1628 void *pabyZ =
nullptr,
int nZStride = 0,
1629 void *pabyM =
nullptr,
int nMStride = 0)
const;
1631 void addSubLineString(
const OGRLineString *,
int nStartVertex = 0,
1632 int nEndVertex = -1);
1633 void reversePoints(
void);
1638 virtual void flattenTo2D()
override;
1639 virtual void segmentize(
double dfMaxLength)
override;
1641 virtual void swapXY()
override;
1643 OGR_ALLOW_UPCAST_TO(Curve)
1644 OGR_ALLOW_CAST_TO_THIS(SimpleCurve)
1651 return poCurve->begin();
1656 return poCurve->end();
1662 return poCurve->begin();
1667 return poCurve->end();
1692 virtual OGRCurveCasterToLineString GetCasterToLineString()
const override;
1693 virtual OGRCurveCasterToLinearRing GetCasterToLinearRing()
const override;
1710 const char *
const *papszOptions =
nullptr)
const override;
1712 getCurveGeometry(
const char *
const *papszOptions =
nullptr)
const override;
1713 virtual double get_Area()
const override;
1733 visitor->
visit(
this);
1737 visitor->
visit(
this);
1740 OGR_ALLOW_UPCAST_TO(SimpleCurve)
1741 OGR_ALLOW_CAST_TO_THIS(LineString)
1775 virtual size_t WkbSize()
const override;
1777 size_t &nBytesConsumedOut)
override;
1787 virtual size_t _WkbSize(
int _flags)
const;
1789 const unsigned char *,
size_t,
1790 size_t &nBytesConsumedOut);
1792 unsigned char *)
const;
1794 virtual OGRCurveCasterToLineString GetCasterToLineString()
const override;
1795 virtual OGRCurveCasterToLinearRing GetCasterToLinearRing()
const override;
1811 virtual void reverseWindingOrder();
1814 int bTestEnvelope = TRUE)
const;
1816 int bTestEnvelope = TRUE)
const;
1832 visitor->
visit(
this);
1836 visitor->
visit(
this);
1839 OGR_ALLOW_UPCAST_TO(LineString)
1840 OGR_ALLOW_CAST_TO_THIS(LinearRing)
1862 void ExtendEnvelopeWithCircular(
OGREnvelope *psEnvelope)
const;
1864 int IsFullCircle(
double &cx,
double &cy,
double &square_R)
const;
1868 virtual OGRCurveCasterToLineString GetCasterToLineString()
const override;
1869 virtual OGRCurveCasterToLinearRing GetCasterToLinearRing()
const override;
1884 size_t &nBytesConsumedOut)
override;
1903 OGRErr *err =
nullptr)
const override;
1915 const char *
const *papszOptions =
nullptr)
const override;
1917 virtual double get_Area()
const override;
1922 virtual void segmentize(
double dfMaxLength)
override;
1927 const char *
const *papszOptions =
nullptr)
const override;
1942 visitor->
visit(
this);
1946 visitor->
visit(
this);
1949 OGR_ALLOW_UPCAST_TO(SimpleCurve)
1950 OGR_ALLOW_CAST_TO_THIS(CircularString)
1967 class CPL_DLL OGRCurveCollection
1976 int nCurveCount = 0;
1980 OGRCurveCollection();
1981 OGRCurveCollection(
const OGRCurveCollection &other);
1982 ~OGRCurveCollection();
1984 OGRCurveCollection &
operator=(
const OGRCurveCollection &other);
1999 return papoCurves + nCurveCount;
2011 return papoCurves + nCurveCount;
2023 const unsigned char *pabyData,
size_t &nSize,
2024 size_t &nDataOffset,
2026 size_t nMinSubGeomSize,
2029 importBodyFromWkb(
OGRGeometry *poGeom,
const unsigned char *pabyData,
2030 size_t nSize,
bool bAcceptCompoundCurve,
2044 int getNumCurves()
const;
2046 const OGRCurve *getCurve(
int)
const;
2049 OGRErr removeCurve(
int iIndex,
bool bDelete =
true);
2076 OGRCurveCollection oCC{};
2078 OGRErr addCurveDirectlyInternal(
OGRCurve *poCurve,
double dfToleranceEps,
2084 OGRLineString *CurveToLineInternal(
double dfMaxAngleStepSizeDegrees,
2085 const char *
const *papszOptions,
2086 int bIsLinearRing)
const;
2097 virtual OGRCurveCasterToLineString GetCasterToLineString()
const override;
2098 virtual OGRCurveCasterToLinearRing GetCasterToLinearRing()
const override;
2137 virtual size_t WkbSize()
const override;
2139 size_t &nBytesConsumedOut)
override;
2158 OGRErr *err =
nullptr)
const override;
2162 virtual void empty()
override;
2174 const char *
const *papszOptions =
nullptr)
const override;
2178 virtual double get_Area()
const override;
2184 int getNumCurves()
const;
2186 const OGRCurve *getCurve(
int)
const;
2196 OGRErr addCurve(
const OGRCurve *,
double dfToleranceEps = 1e-14);
2197 OGRErr addCurveDirectly(
OGRCurve *,
double dfToleranceEps = 1e-14);
2198 OGRErr addCurve(std::unique_ptr<OGRCurve>,
double dfToleranceEps = 1e-14);
2207 virtual void segmentize(
double dfMaxLength)
override;
2212 const char *
const *papszOptions =
nullptr)
const override;
2215 visitor->
visit(
this);
2219 visitor->
visit(
this);
2222 virtual void swapXY()
override;
2224 OGR_ALLOW_UPCAST_TO(Curve)
2225 OGR_ALLOW_CAST_TO_THIS(CompoundCurve)
2233 return poCurve->
begin();
2239 return poCurve->
end();
2245 return poCurve->
begin();
2250 return poCurve->
end();
2267 virtual OGRSurfaceCasterToPolygon GetCasterToPolygon()
const = 0;
2268 virtual OGRSurfaceCasterToCurvePolygon GetCasterToCurvePolygon()
const = 0;
2272 virtual double get_Area()
const = 0;
2275 return PointOnSurfaceInternal(poPoint);
2284 OGR_FORBID_DOWNCAST_TO_POINT
2285 OGR_FORBID_DOWNCAST_TO_ALL_CURVES
2286 OGR_ALLOW_CAST_TO_THIS(Surface)
2287 OGR_FORBID_DOWNCAST_TO_ALL_MULTI
2314 virtual int checkRing(
OGRCurve *poNewRing)
const;
2315 OGRErr addRingDirectlyInternal(
OGRCurve *poCurve,
int bNeedRealloc);
2325 OGRCurveCollection oCC{};
2327 virtual OGRSurfaceCasterToPolygon GetCasterToPolygon()
const override;
2328 virtual OGRSurfaceCasterToCurvePolygon
2329 GetCasterToCurvePolygon()
const override;
2374 virtual void empty()
override;
2378 virtual void segmentize(
double dfMaxLength)
override;
2383 const char *
const *papszOptions =
nullptr)
const override;
2386 virtual double get_Area()
const override;
2389 virtual size_t WkbSize()
const override;
2391 size_t &nBytesConsumedOut)
override;
2410 OGRErr *err =
nullptr)
const override;
2420 const char *
const *papszOptions =
nullptr)
const;
2450 visitor->
visit(
this);
2454 visitor->
visit(
this);
2457 virtual void swapXY()
override;
2459 OGR_ALLOW_UPCAST_TO(Surface)
2460 OGR_ALLOW_CAST_TO_THIS(CurvePolygon)
2468 return poGeom->
begin();
2474 return poGeom->
end();
2480 return poGeom->
begin();
2485 return poGeom->
end();
2512 virtual int checkRing(
OGRCurve *poNewRing)
const override;
2513 virtual OGRErr importFromWKTListOnly(
const char **ppszInput,
int bHasZ,
2515 int &nMaxPoints,
double *&padfZ);
2519 virtual OGRSurfaceCasterToPolygon GetCasterToPolygon()
const override;
2520 virtual OGRSurfaceCasterToCurvePolygon
2521 GetCasterToCurvePolygon()
const override;
2539 return reinterpret_cast<ChildType **
>(oCC.begin());
2544 return reinterpret_cast<ChildType **
>(oCC.end());
2551 return reinterpret_cast<const ChildType *
const *
>(oCC.begin());
2556 return reinterpret_cast<const ChildType *
const *
>(oCC.end());
2566 getCurveGeometry(
const char *
const *papszOptions =
nullptr)
const override;
2569 const char *
const *papszOptions =
nullptr)
const override;
2572 virtual size_t WkbSize()
const override;
2574 size_t &nBytesConsumedOut)
override;
2593 OGRErr *err =
nullptr)
const override;
2598 const char *
const *papszOptions =
nullptr)
const override;
2623 visitor->
visit(
this);
2627 visitor->
visit(
this);
2632 OGR_ALLOW_UPCAST_TO(CurvePolygon)
2633 OGR_ALLOW_CAST_TO_THIS(Polygon)
2640 return poGeom->
begin();
2645 return poGeom->
end();
2651 return poGeom->
begin();
2656 return poGeom->
end();
2675 bool quickValidityCheck()
const;
2679 virtual OGRSurfaceCasterToPolygon GetCasterToPolygon()
const override;
2680 virtual OGRErr importFromWKTListOnly(
const char **ppszInput,
int bHasZ,
2683 double *&padfZ)
override;
2699 size_t &nBytesConsumedOut)
override;
2717 visitor->
visit(
this);
2721 visitor->
visit(
this);
2728 OGR_ALLOW_UPCAST_TO(Polygon)
2729 OGR_ALLOW_CAST_TO_THIS(Triangle)
2745 OGRErr importFromWktInternal(
const char **ppszInput,
int nRecLevel);
2754 const std::string &exclude = std::string())
const;
2759 OGRErr importFromWkbInternal(
const unsigned char *pabyData,
size_t nSize,
2761 size_t &nBytesConsumedOut);
2785 return papoGeoms + nGeomCount;
2797 return papoGeoms + nGeomCount;
2804 virtual void empty()
override;
2808 virtual void segmentize(
double dfMaxLength)
override;
2812 getCurveGeometry(
const char *
const *papszOptions =
nullptr)
const override;
2815 const char *
const *papszOptions =
nullptr)
const override;
2818 virtual size_t WkbSize()
const override;
2820 size_t &nBytesConsumedOut)
override;
2839 OGRErr *err =
nullptr)
const override;
2841 virtual double get_Length()
const;
2842 virtual double get_Area()
const;
2850 int getNumGeometries()
const;
2863 OGRErr addGeometry(std::unique_ptr<OGRGeometry> geom);
2864 virtual OGRErr removeGeometry(
int iIndex,
int bDelete = TRUE);
2871 virtual void swapXY()
override;
2875 visitor->
visit(
this);
2879 visitor->
visit(
this);
2885 OGR_FORBID_DOWNCAST_TO_POINT
2886 OGR_FORBID_DOWNCAST_TO_ALL_CURVES
2887 OGR_FORBID_DOWNCAST_TO_ALL_SURFACES
2888 OGR_ALLOW_CAST_TO_THIS(GeometryCollection)
2896 return poGeom->
begin();
2902 return poGeom->
end();
2908 return poGeom->
begin();
2913 return poGeom->
end();
2947 return reinterpret_cast<ChildType **
>(papoGeoms);
2952 return reinterpret_cast<ChildType **
>(papoGeoms + nGeomCount);
2959 return reinterpret_cast<const ChildType *
const *
>(papoGeoms);
2964 return reinterpret_cast<const ChildType *
const *
>(papoGeoms +
2988 OGRErr *err =
nullptr)
const override;
3025 visitor->
visit(
this);
3029 visitor->
visit(
this);
3034 OGR_ALLOW_CAST_TO_THIS(MultiSurface)
3035 OGR_ALLOW_UPCAST_TO(GeometryCollection)
3036 OGR_FORBID_DOWNCAST_TO_MULTIPOINT
3037 OGR_FORBID_DOWNCAST_TO_MULTILINESTRING
3038 OGR_FORBID_DOWNCAST_TO_MULTICURVE
3046 return poGeom->
begin();
3052 return poGeom->
end();
3058 return poGeom->
begin();
3063 return poGeom->
end();
3084 OGRErr _addGeometryWithExpectedSubGeometryType(
3086 OGRErr _addGeometryDirectlyWithExpectedSubGeometryType(
3105 return reinterpret_cast<ChildType **
>(papoGeoms);
3110 return reinterpret_cast<ChildType **
>(papoGeoms + nGeomCount);
3117 return reinterpret_cast<const ChildType *
const *
>(papoGeoms);
3122 return reinterpret_cast<const ChildType *
const *
>(papoGeoms +
3148 size_t &nBytesConsumedOut)
override;
3155 OGRErr *err =
nullptr)
const override;
3174 visitor->
visit(
this);
3178 visitor->
visit(
this);
3183 OGR_ALLOW_CAST_TO_THIS(MultiPolygon)
3184 OGR_ALLOW_UPCAST_TO(MultiSurface)
3192 return poGeom->
begin();
3198 return poGeom->
end();
3204 return poGeom->
begin();
3209 return poGeom->
end();
3229 virtual OGRSurfaceCasterToPolygon GetCasterToPolygon()
const override;
3230 virtual OGRSurfaceCasterToCurvePolygon
3231 GetCasterToCurvePolygon()
const override;
3233 virtual const char *getSubGeometryName()
const;
3238 virtual OGRPolyhedralSurfaceCastToMultiPolygon
3239 GetCasterToMultiPolygon()
const;
3278 virtual size_t WkbSize()
const override;
3282 size_t &nBytesConsumedOut)
override;
3301 OGRErr *err =
nullptr)
const override;
3306 virtual void empty()
override;
3315 virtual double get_Area()
const override;
3333 virtual void swapXY()
override;
3338 visitor->
visit(
this);
3342 visitor->
visit(
this);
3348 OGR_ALLOW_CAST_TO_THIS(PolyhedralSurface)
3349 OGR_ALLOW_UPCAST_TO(Surface)
3357 return poGeom->
begin();
3363 return poGeom->
end();
3369 return poGeom->
begin();
3374 return poGeom->
end();
3393 virtual const char *getSubGeometryName()
const override;
3396 virtual OGRPolyhedralSurfaceCastToMultiPolygon
3397 GetCasterToMultiPolygon()
const override;
3414 return reinterpret_cast<ChildType **
>(oMP.begin());
3419 return reinterpret_cast<ChildType **
>(oMP.end());
3426 return reinterpret_cast<const ChildType *
const *
>(oMP.begin());
3431 return reinterpret_cast<const ChildType *
const *
>(oMP.end());
3470 visitor->
visit(
this);
3474 visitor->
visit(
this);
3480 OGR_ALLOW_CAST_TO_THIS(TriangulatedSurface)
3481 OGR_ALLOW_UPCAST_TO(PolyhedralSurface)
3489 return poGeom->
begin();
3495 return poGeom->
end();
3501 return poGeom->
begin();
3506 return poGeom->
end();
3521 OGRErr importFromWkt_Bracketed(
const char **,
int bHasM,
int bHasZ);
3541 return reinterpret_cast<ChildType **
>(papoGeoms);
3546 return reinterpret_cast<ChildType **
>(papoGeoms + nGeomCount);
3553 return reinterpret_cast<const ChildType *
const *
>(papoGeoms);
3558 return reinterpret_cast<const ChildType *
const *
>(papoGeoms +
3594 OGRErr *err =
nullptr)
const override;
3612 visitor->
visit(
this);
3616 visitor->
visit(
this);
3623 OGR_ALLOW_CAST_TO_THIS(MultiPoint)
3624 OGR_ALLOW_UPCAST_TO(GeometryCollection)
3625 OGR_FORBID_DOWNCAST_TO_MULTILINESTRING
3626 OGR_FORBID_DOWNCAST_TO_MULTICURVE
3627 OGR_FORBID_DOWNCAST_TO_MULTISURFACE
3628 OGR_FORBID_DOWNCAST_TO_MULTIPOLYGON
3635 return poGeom->
begin();
3640 return poGeom->
end();
3646 return poGeom->
begin();
3651 return poGeom->
end();
3689 return reinterpret_cast<ChildType **
>(papoGeoms);
3694 return reinterpret_cast<ChildType **
>(papoGeoms + nGeomCount);
3701 return reinterpret_cast<const ChildType *
const *
>(papoGeoms);
3706 return reinterpret_cast<const ChildType *
const *
>(papoGeoms +
3742 OGRErr *err =
nullptr)
const override;
3764 visitor->
visit(
this);
3768 visitor->
visit(
this);
3773 OGR_ALLOW_CAST_TO_THIS(MultiCurve)
3774 OGR_ALLOW_UPCAST_TO(GeometryCollection)
3775 OGR_FORBID_DOWNCAST_TO_MULTIPOINT
3776 OGR_FORBID_DOWNCAST_TO_MULTISURFACE
3777 OGR_FORBID_DOWNCAST_TO_MULTIPOLYGON
3784 return poGeom->
begin();
3789 return poGeom->
end();
3795 return poGeom->
begin();
3800 return poGeom->
end();
3832 return reinterpret_cast<ChildType **
>(papoGeoms);
3837 return reinterpret_cast<ChildType **
>(papoGeoms + nGeomCount);
3844 return reinterpret_cast<const ChildType *
const *
>(papoGeoms);
3849 return reinterpret_cast<const ChildType *
const *
>(papoGeoms +
3875 size_t &nBytesConsumedOut)
override;
3882 OGRErr *err =
nullptr)
const override;
3901 visitor->
visit(
this);
3905 visitor->
visit(
this);
3910 OGR_ALLOW_CAST_TO_THIS(MultiLineString)
3911 OGR_ALLOW_UPCAST_TO(MultiCurve)
3912 OGR_FORBID_DOWNCAST_TO_MULTIPOINT
3913 OGR_FORBID_DOWNCAST_TO_MULTISURFACE
3914 OGR_FORBID_DOWNCAST_TO_MULTIPOLYGON
3922 return poGeom->
begin();
3928 return poGeom->
end();
3934 return poGeom->
begin();
3939 return poGeom->
end();
3953 static OGRErr createFromFgfInternal(
const unsigned char *pabyData,
3956 int *pnBytesConsumed,
int nRecLevel);
3961 size_t =
static_cast<size_t>(-1),
3963 static OGRErr createFromWkb(
const void *pabyData,
3966 size_t &nBytesConsumedOut);
3977 CPL_WARN_DEPRECATED(
"Use createFromWkt(const char**, ...) instead")
3979 return createFromWkt(
const_cast<const char **
>(ppszInput), poSRS,
3987 static OGRGeometry *createFromGeoJson(
const char *,
int = -1);
3995 bool bOnlyInOrder =
true);
4002 const char *
const *papszOptions =
nullptr);
4008 int *pbResultValidGeometry,
4009 const char **papszOptions =
nullptr);
4010 static bool haveGEOS();
4017 std::unique_ptr<Private> d;
4026 char **papszOptions,
4030 approximateArcAngles(
double dfX,
double dfY,
double dfZ,
4031 double dfPrimaryRadius,
double dfSecondaryAxis,
4032 double dfRotation,
double dfStartAngle,
4033 double dfEndAngle,
double dfMaxAngleStepSizeDegrees,
4034 const bool bUseMaxGap =
false);
4036 static int GetCurveParameters(
double x0,
double y0,
double x1,
double y1,
4037 double x2,
double y2,
double &R,
double &cx,
4038 double &cy,
double &alpha0,
double &alpha1,
4041 curveToLineString(
double x0,
double y0,
double z0,
double x1,
double y1,
4042 double z1,
double x2,
double y2,
double z2,
int bHasZ,
4043 double dfMaxAngleStepSizeDegrees,
4044 const char *
const *papszOptions =
nullptr);
4047 const char *
const *papszOptions =
nullptr);
4052 bool bCamelCase =
false,
4053 bool bAddZM =
false,
4054 bool bSpaceBeforeZM =
false);
4057 typedef struct _OGRPreparedGeometry OGRPreparedGeometry;
4059 struct CPL_DLL OGRPreparedGeometryUniquePtrDeleter
4061 void operator()(OGRPreparedGeometry *)
const;
4068 typedef std::unique_ptr<OGRPreparedGeometry,
4069 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:2262
virtual void getEnvelope(OGREnvelope *psEnvelope) const override
Computes and returns the bounding envelope for this geometry in the passed psEnvelope structure.
Definition: ogrcurvepolygon.cpp:640
OGRErr importFromWkt(char **ppszInput)
Deprecated.
Definition: ogr_geometry.h:439
OGRBoolean Is3D() const
Definition: ogr_geometry.h:410
virtual OGRBoolean IsEmpty() const =0
Returns TRUE (non-zero) if the object has no points.
OGRMultiPolygon * toMultiPolygon()
Down-cast to OGRMultiPolygon*.
Definition: ogr_geometry.h:879
OGRPolygon ChildType
Type of child elements.
Definition: ogr_geometry.h:3098
OGRLineString ChildType
Type of child elements.
Definition: ogr_geometry.h:3825
OGRPolygon * getGeometryRef(int i)
See OGRGeometryCollection::getGeometryRef()
Definition: ogr_geometry.h:3128
virtual void setCoordinateDimension(int nDimension)
Set the coordinate dimension.
Definition: ogrgeometry.cpp:1064
virtual OGRErr addRingDirectly(OGRCurve *)
Add a ring to a polygon.
Definition: ogrcurvepolygon.cpp:418
OGRGeometryCollection * toUpperClass()
Return pointer of this in upper class.
Definition: ogr_geometry.h:3889
ChildType ** begin()
Return begin of iterator.
Definition: ogr_geometry.h:3830
A collection of OGRCurve.
Definition: ogr_geometry.h:3665
static OGRLineString * CastToLineString(OGRCurve *poCurve)
Cast to linestring.
Definition: ogrcurve.cpp:353
OGRRawPoint()
Constructor.
Definition: ogr_geometry.h:108
virtual OGRBoolean isCompatibleSubType(OGRwkbGeometryType) const
Returns whether a geometry of the specified geometry type can be a member of this collection.
Definition: ogrgeometrycollection.cpp:1209
double getX(int i) const
Get X at vertex.
Definition: ogr_geometry.h:1583
ChildType ** end()
Return end of iterator.
Definition: ogr_geometry.h:3260
virtual double get_Area() const =0
Get the area of the surface object.
virtual double get_AreaOfCurveSegments() const =0
Get the area of the purely curve portions of a (closed) curve.
bool operator==(const OGRGeometry &other) const
Returns if two geometries are equal.
Definition: ogr_geometry.h:389
const ChildType *const * begin() const
Return begin of iterator.
Definition: ogr_geometry.h:3424
Concrete representation of a multi-vertex line.
Definition: ogr_geometry.h:1682
const ChildType *const * begin() const
Return begin of iterator.
Definition: ogr_geometry.h:3842
int getNumGeometries() const
Fetch number of geometries in PolyhedralSurface.
Definition: ogrpolyhedralsurface.cpp:822
OGRPolygon * getGeometryRef(int i)
Fetch geometry from container.
Definition: ogrpolyhedralsurface.cpp:844
virtual OGRBoolean Contains(const OGRGeometry *) const
Test for containment.
Definition: ogrgeometry.cpp:5445
A collection of non-overlapping OGRPolygon.
Definition: ogr_geometry.h:3075
unsigned char GByte
Unsigned byte type.
Definition: cpl_port.h:196
static OGRMultiPolygon * CastToMultiPolygon(OGRPolyhedralSurface *poPS)
Casts the OGRPolyhedralSurface to an OGRMultiPolygon.
Definition: ogrpolyhedralsurface.cpp:707
OGRErr addGeometryDirectly(OGRGeometry *poNewGeom)
Add a geometry directly to the container.
Definition: ogrpolyhedralsurface.cpp:766
OGRGeometryCollection * toUpperClass()
Return pointer of this in upper class.
Definition: ogr_geometry.h:3600
virtual OGRSimpleCurve * clone() const override=0
Make a copy of this object.
Interface for a point iterator.
Definition: ogr_geometry.h:1236
OGRSurface ChildType
Type of child elements.
Definition: ogr_geometry.h:2940
ChildType ** begin()
Return begin of iterator.
Definition: ogr_geometry.h:2945
virtual void flattenTo2D() override
Convert geometry to strictly 2D. In a sense this converts all Z coordinates to 0.0.
Definition: ogrcurvepolygon.cpp:148
virtual void closeRings()
Force rings to be closed.
Definition: ogrgeometry.cpp:5579
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:3027
Utility class to store a collection of curves.
Definition: ogr_geometry.h:2073
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:2621
virtual OGRGeometry * clone() const =0
Make a copy of this object.
virtual int getNumPoints() const override
Fetch vertex count.
Definition: ogr_geometry.h:1578
virtual OGRwkbGeometryType getGeometryType() const =0
Fetch geometry type.
virtual void swapXY()
Swap x and y coordinates.
Definition: ogrgeometry.cpp:6261
OGRErr importFromWkt(const char **) override
deprecated
Definition: ogrlinestring.cpp:1737
virtual OGRwkbGeometryType getGeometryType() const override
Returns the WKB Type of PolyhedralSurface.
Definition: ogrpolyhedralsurface.cpp:120
OGRSimpleCurve * toUpperClass()
Return pointer of this in upper class.
Definition: ogr_geometry.h:1721
virtual OGRBoolean hasCurveGeometry(int bLookForNonLinear=FALSE) const override
Returns if this geometry is or has curve geometry.
Definition: ogrgeometrycollection.cpp:1220
OGRCurve * toCurve()
Down-cast to OGRCurve*.
Definition: ogr_geometry.h:623
OGRWktFormat format
Formatting type.
Definition: ogr_geometry.h:79
OGRLayer::FeatureIterator begin(OGRLayer *poLayer)
Return begin of feature iterator.
Definition: ogrsf_frmts.h:411
const ChildType *const * end() const
Return end of iterator.
Definition: ogr_geometry.h:3847
virtual OGRBoolean IsEmpty() const override
Returns TRUE (non-zero) if the object has no points.
Definition: ogrcurvepolygon.cpp:738
const ChildType *const * end() const
Return end of iterator.
Definition: ogr_geometry.h:2554
OGRSurface * getGeometryRef(int i)
See OGRGeometryCollection::getGeometryRef()
Definition: ogr_geometry.h:2998
OGRGeometry visitor interface.
Definition: ogr_geometry.h:238
OGRWktOptions()
Constructor.
Definition: ogr_geometry.h:82
virtual OGRErr exportToWkb(OGRwkbByteOrder, unsigned char *, OGRwkbVariant=wkbVariantOldOgc) const override
Convert a geometry into well known binary format.
Definition: ogrlinestring.cpp:1635
void setM(double mIn)
Set m.
Definition: ogr_geometry.h:1193
ChildType ** end()
Return end of iterator.
Definition: ogr_geometry.h:3417
virtual void assignSpatialReference(const OGRSpatialReference *poSR)
Assign spatial reference to this object.
Definition: ogrgeometry.cpp:468
virtual size_t WkbSize() const override
Returns size of related binary representation.
Definition: ogrlinestring.cpp:185
const OGRLineString * toUpperClass() const
Return pointer of this in upper class.
Definition: ogr_geometry.h:1825
virtual OGRPolygon * CurvePolyToPoly(double dfMaxAngleStepSizeDegrees=0, const char *const *papszOptions=nullptr) const
Return a polygon from a curve polygon.
Definition: ogrcurvepolygon.cpp:590
ChildType ** begin()
Return begin of curve iterator.
Definition: ogr_geometry.h:2114
virtual void set3D(OGRBoolean bIs3D)
Add or remove the Z coordinate dimension.
Definition: ogrgeometry.cpp:1087
const OGRCompoundCurve * toCompoundCurve() const
Down-cast to OGRCompoundCurve*.
Definition: ogr_geometry.h:731
Create geometry objects from well known text/binary.
Definition: ogr_geometry.h:3951
const ChildType *const * end() const
Return end of sub-geometry iterator.
Definition: ogr_geometry.h:2795
OGRMultiSurface * toMultiSurface()
Down-cast to OGRMultiSurface*.
Definition: ogr_geometry.h:919
const OGRGeometryCollection * toUpperClass() const
Return pointer of this in upper class.
Definition: ogr_geometry.h:3167
const ChildType *const * end() const
Return end of iterator.
Definition: ogr_geometry.h:3704
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:3340
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:144
const OGRPolygon * toUpperClass() const
Return pointer of this in upper class.
Definition: ogr_geometry.h:2710
ChildType ** end()
Return end of iterator.
Definition: ogr_geometry.h:3544
static OGRGeometry * FromHandle(OGRGeometryH hGeom)
Convert a OGRGeometryH to a OGRGeometry*.
Definition: ogr_geometry.h:595
const OGRSurface * getGeometryRef(int i) const
See OGRGeometryCollection::getGeometryRef()
Definition: ogr_geometry.h:3003
OGRLinearRing ChildType
Type of child elements.
Definition: ogr_geometry.h:2532
virtual OGRBoolean hasCurveGeometry(int bLookForNonLinear=FALSE) const override
Returns if this geometry is or has curve geometry.
Definition: ogrcurvepolygon.cpp:615
A collection of 1 or more geometry objects.
Definition: ogr_geometry.h:2743
virtual OGRBoolean hasCurveGeometry(int bLookForNonLinear=FALSE) const
Returns if this geometry is or has curve geometry.
Definition: ogrgeometry.cpp:3273
@ wkbVariantOldOgc
Old-style 99-402 extended dimension (Z) WKB types.
Definition: ogr_core.h:542
This class represents an OpenGIS Spatial Reference System, and contains methods for converting betwee...
Definition: ogr_spatialref.h:166
virtual const char * getGeometryName() const override
Fetch WKT name for geometry type.
Definition: ogrpolyhedralsurface.cpp:106
OGRGeometry * getGeometryRef(int)
Fetch geometry from container.
Definition: ogrgeometrycollection.cpp:259
OGRCircularString * toCircularString()
Down-cast to OGRCircularString*.
Definition: ogr_geometry.h:701
PolyhedralSurface class.
Definition: ogr_geometry.h:3223
virtual int isClockwise() const
Returns TRUE if the ring has clockwise winding (or less than 2 points)
Definition: ogrcurve.cpp:711
const OGRCircularString * toCircularString() const
Down-cast to OGRCircularString*.
Definition: ogr_geometry.h:711
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:3172
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:2213
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:215
OGRTriangulatedSurface * toTriangulatedSurface()
Down-cast to OGRTriangulatedSurface*.
Definition: ogr_geometry.h:958
const OGRTriangle * toTriangle() const
Down-cast to OGRTriangle*.
Definition: ogr_geometry.h:789
const OGRPolygon * toPolygon() const
Down-cast to OGRPolygon*.
Definition: ogr_geometry.h:771
virtual OGRGeometry * getLinearGeometry(double dfMaxAngleStepSizeDegrees=0, const char *const *papszOptions=nullptr) const
Return, possibly approximate, non-curve version of this geometry.
Definition: ogrgeometry.cpp:3306
Abstract base class for all geometry classes.
Definition: ogr_geometry.h:334
A collection of OGRPoint.
Definition: ogr_geometry.h:3518
virtual OGRBoolean IsValid() const
Test if the geometry is valid.
Definition: ogrgeometry.cpp:2177
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:130
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:2625
Definition: ogr_geometry.h:1397
const OGRSimpleCurve * toSimpleCurve() const
Down-cast to OGRSimpleCurve*.
Definition: ogr_geometry.h:1344
virtual OGRCurvePolygon * clone() const override
Make a copy of this object.
Definition: ogrcurvepolygon.cpp:101
ChildType ** begin()
Return begin of iterator.
Definition: ogr_geometry.h:3255
A collection of non-overlapping OGRSurface.
Definition: ogr_geometry.h:2927
OGRErr importFromWkb(const GByte *, size_t=static_cast< size_t >(-1), OGRwkbVariant=wkbVariantOldOgc)
Assign geometry from well known binary data.
Definition: ogrgeometry.cpp:1463
Point class.
Definition: ogr_geometry.h:1083
static OGRErr createFromWkt(char **ppszInput, const OGRSpatialReference *poSRS, OGRGeometry **ppoGeom)
Deprecated.
Definition: ogr_geometry.h:3974
bool round
Whether GDAL-special rounding should be applied.
Definition: ogr_geometry.h:77
virtual OGRErr exportToWkb(OGRwkbByteOrder, unsigned char *, OGRwkbVariant=wkbVariantOldOgc) const override
Convert a geometry into well known binary format.
Definition: ogrpolygon.cpp:430
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:3762
virtual OGRErr addGeometry(const OGRGeometry *) override
Add a new geometry to a collection.
Definition: ogrtriangulatedsurface.cpp:188
double getY(int i) const
Get Y at vertex.
Definition: ogr_geometry.h:1587
OGRErr exportToWkt(char **ppszDstText, OGRwkbVariant=wkbVariantOldOgc) const
Convert a geometry into well known text format.
Definition: ogrgeometry.cpp:1863
const OGRGeometryCollection * toUpperClass() const
Return pointer of this in upper class.
Definition: ogr_geometry.h:3757
virtual void empty() override
Clear geometry information. This restores the geometry to its initial state after construction,...
Definition: ogrcurvepolygon.cpp:111
virtual std::string exportToWkt(const OGRWktOptions &opts=OGRWktOptions(), OGRErr *err=nullptr) const override
Export a curve polygon to WKT.
Definition: ogrcurvepolygon.cpp:561
OGRGeometry & operator=(const OGRGeometry &other)
Assignment operator.
Definition: ogrgeometry.cpp:150
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:3176
virtual OGRErr importFromWkt(const char **ppszInput)=0
Assign geometry from well known text data.
virtual std::string exportToWkt(const OGRWktOptions &opts=OGRWktOptions(), OGRErr *err=nullptr) const override
Export a multicurve to WKT.
Definition: ogrmulticurve.cpp:183
OGRwkbVariant variant
Type of WKT output to produce.
Definition: ogr_geometry.h:73
OGRPolygon & operator=(const OGRPolygon &other)
Assignment operator.
Definition: ogrpolygon.cpp:90
@ Default
Format as F when abs(value) < 1, otherwise as G.
int OGRBoolean
Type for a OGR boolean.
Definition: ogr_core.h:395
const ChildType *const * end() const
Return end of iterator.
Definition: ogr_geometry.h:3556
double x
x
Definition: ogr_geometry.h:118
ChildType ** end()
Return end of iterator.
Definition: ogr_geometry.h:3692
void setX(double xIn)
Set x.
Definition: ogr_geometry.h:1163
virtual const char * getGeometryName() const override
Fetch WKT name for geometry type.
Definition: ogrlinestring.cpp:2779
int precision
Precision of output. Interpretation depends on format.
Definition: ogr_geometry.h:75
const OGRLinearRing * toLinearRing() const
Down-cast to OGRLinearRing*.
Definition: ogr_geometry.h:691
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:2873
virtual OGRErr PointOnSurface(OGRPoint *poPoint) const
This method relates to the SFCOM ISurface::get_PointOnSurface() method.
Definition: ogr_geometry.h:2273
virtual std::string exportToWkt(const OGRWktOptions &opts=OGRWktOptions(), OGRErr *err=nullptr) const override
Export a polygon to WKT.
Definition: ogrpolygon.cpp:686
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:1830
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:3103
virtual OGRMultiSurface * clone() const override
Make a copy of this object.
Definition: ogrmultisurface.cpp:97
Simple container for a position.
Definition: ogr_geometry.h:104
A collection of OGRLineString.
Definition: ogr_geometry.h:3812
OGRCurve ChildType
Type of child elements.
Definition: ogr_geometry.h:2343
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:145
OGRMultiCurve * toMultiCurve()
Down-cast to OGRMultiCurve*.
Definition: ogr_geometry.h:899
OGRPoint ChildType
Type of child elements.
Definition: ogr_geometry.h:3534
virtual OGRErr addGeometry(const OGRGeometry *)
Add a new geometry to a collection.
Definition: ogrpolyhedralsurface.cpp:726
OGRLineString * getGeometryRef(int i)
See OGRGeometryCollection::getGeometryRef()
Definition: ogr_geometry.h:3855
Abstract base class for 2 dimensional objects like polygons or curve polygons.
Definition: ogr_geometry.h:2263
OGRSimpleCurve & operator=(const OGRSimpleCurve &other)
Assignment operator.
Definition: ogrlinestring.cpp:112
virtual OGRBoolean hasCurveGeometry(int bLookForNonLinear=FALSE) const override
Returns if this geometry is or has curve geometry.
Definition: ogrmultisurface.cpp:293
virtual int getNumPoints() const =0
Return the number of points of a curve geometry.
virtual size_t WkbSize() const override
Returns size of related binary representation.
Definition: ogrpolygon.cpp:329
OGRwkbByteOrder
Enumeration to describe byte order.
Definition: ogr_core.h:610
OGRPolyhedralSurface * toUpperClass()
Return pointer of this in upper class.
Definition: ogr_geometry.h:3458
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:1944
OGRTriangle & operator=(const OGRTriangle &other)
Assignment operator.
Definition: ogrtriangle.cpp:135
OGRTriangle ChildType
Type of child elements.
Definition: ogr_geometry.h:3407
Concrete representation of a circular string, that is to say a curve made of one or several arc circl...
Definition: ogr_geometry.h:1859
OGRCurvePolygon()
Create an empty curve polygon.
virtual OGRSurface * clone() const override=0
Make a copy of this object.
virtual OGRwkbGeometryType getGeometryType() const override
Fetch geometry type.
Definition: ogrmulticurve.cpp:106
virtual OGRBoolean Intersects(const OGRGeometry *) const
Do these features intersect?
Definition: ogrgeometry.cpp:538
virtual OGRPolygon * CurvePolyToPoly(double dfMaxAngleStepSizeDegrees=0, const char *const *papszOptions=nullptr) const override
Return a polygon from a curve polygon.
Definition: ogrpolygon.cpp:802
const OGRLineString * toLineString() const
Down-cast to OGRLineString*.
Definition: ogr_geometry.h:673
OGRTriangle * toTriangle()
Down-cast to OGRTriangle*.
Definition: ogr_geometry.h:780
char ** CSLConstList
Type of a constant null-terminated list of nul terminated strings.
Definition: cpl_port.h:1178
The CPLJSONArray class holds JSON object from CPLJSONDocument.
Definition: cpl_json.h:54
OGRGeometryCollection & operator=(const OGRGeometryCollection &other)
Assignment operator.
Definition: ogrgeometrycollection.cpp:109
virtual std::string exportToWkt(const OGRWktOptions &opts=OGRWktOptions(), OGRErr *err=nullptr) const override
Export a simple curve to WKT.
Definition: ogrlinestring.cpp:1857
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:3468
OGRPoint * toPoint()
Down-cast to OGRPoint*.
Definition: ogr_geometry.h:604
virtual OGRLineString * clone() const override
Make a copy of this object.
Definition: ogrlinestring.cpp:2904
virtual void set3D(OGRBoolean bIs3D) override
Add or remove the Z coordinate dimension.
Definition: ogrcurvepolygon.cpp:715
OGRSurface * toSurface()
Down-cast to OGRSurface*.
Definition: ogr_geometry.h:741
ChildType ** begin()
Return begin of iterator.
Definition: ogr_geometry.h:3687
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:3023
const ChildType *const * begin() const
Return begin of curve iterator.
Definition: ogr_geometry.h:2126
OGRGeometry ChildType
Type of child elements.
Definition: ogr_geometry.h:2773
virtual void assignSpatialReference(const OGRSpatialReference *poSR) override
Assign spatial reference to this object.
Definition: ogrcurvepolygon.cpp:729
OGRCurve * getGeometryRef(int i)
See OGRGeometryCollection::getGeometryRef()
Definition: ogr_geometry.h:3712
const OGRGeometryCollection * toUpperClass() const
Return pointer of this in upper class.
Definition: ogr_geometry.h:3018
virtual OGRMultiCurve * clone() const override
Make a copy of this object.
Definition: ogrmulticurve.cpp:96
OGRPolyhedralSurface * toPolyhedralSurface()
Down-cast to OGRPolyhedralSurface*.
Definition: ogr_geometry.h:939
virtual OGRErr importFromWkb(const unsigned char *, size_t, OGRwkbVariant, size_t &nBytesConsumedOut) override
Assign geometry from well known binary data.
Definition: ogrcurvepolygon.cpp:489
void sfcgal_geometry_t
SFCGAL geometry type.
Definition: ogr_geometry.h:128
virtual OGRErr transform(OGRCoordinateTransformation *poCT) override
Apply arbitrary coordinate transformation to geometry.
Definition: ogrcurvepolygon.cpp:679
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:2719
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:3899
OGRErr importFromWkt(const char **) override
deprecated
Definition: ogrgeometrycollection.cpp:806
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:1735
virtual int ContainsPoint(const OGRPoint *p) const
Returns if a point is contained in a (closed) curve.
Definition: ogrcurve.cpp:396
virtual void setCoordinateDimension(int nDimension) override
Set the coordinate dimension.
Definition: ogrcurvepolygon.cpp:709
ChildType ** end()
Return end of curve iterator.
Definition: ogr_geometry.h:2353
OGRGeometryCollection * toUpperClass()
Return pointer of this in upper class.
Definition: ogr_geometry.h:3013
OGRPoint ChildType
Type of child elements.
Definition: ogr_geometry.h:1513
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:1213
const OGRPoint * toPoint() const
Down-cast to OGRPoint*.
Definition: ogr_geometry.h:613
OGRRawPoint(double xIn, double yIn)
Constructor.
Definition: ogr_geometry.h:113
OGRErr removeGeometry(int iIndex, int bDelete=TRUE)
Remove a geometry from the container.
Definition: ogrpolyhedralsurface.cpp:980
virtual OGRwkbGeometryType getGeometryType() const override
Fetch geometry type.
Definition: ogrcurvepolygon.cpp:121
OGRGeometryCollection * toUpperClass()
Return pointer of this in upper class.
Definition: ogr_geometry.h:3752
OGRSimpleCurve * toSimpleCurve()
Down-cast to OGRSimpleCurve*.
Definition: ogr_geometry.h:1336
static OGRPolygon * CastToPolygon(OGRCurvePolygon *poCP)
Convert to polygon.
Definition: ogrcurvepolygon.cpp:850
const OGRPolyhedralSurface * toUpperClass() const
Return pointer of this in upper class.
Definition: ogr_geometry.h:3463
virtual OGRwkbGeometryType getGeometryType() const override
Fetch geometry type.
Definition: ogrpolygon.cpp:113
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:2877
const ChildType *const * begin() const
Return begin of iterator.
Definition: ogr_geometry.h:3551
OGRLineString * toLineString()
Down-cast to OGRLineString*.
Definition: ogr_geometry.h:663
virtual void EndPoint(OGRPoint *) const =0
Return the curve end point.
OGRSimpleCurve * toSimpleCurve()
Down-cast to OGRSimpleCurve*.
Definition: ogr_geometry.h:643
const ChildType *const * end() const
Return end of curve iterator.
Definition: ogr_geometry.h:2365
virtual void empty()=0
Clear geometry information. This restores the geometry to its initial state after construction,...
OGRPolygon * toUpperClass()
Return pointer of this in upper class.
Definition: ogr_geometry.h:2705
const OGRCurvePolygon * toCurvePolygon() const
Down-cast to OGRCurvePolygon*.
Definition: ogr_geometry.h:809
const OGRTriangulatedSurface * toTriangulatedSurface() const
Down-cast to OGRTriangulatedSurface*.
Definition: ogr_geometry.h:967
OGRCurve ChildType
Type of child elements.
Definition: ogr_geometry.h:3682
const OGRSimpleCurve * toSimpleCurve() const
Down-cast to OGRSimpleCurve*.
Definition: ogr_geometry.h:653
const ChildType *const * begin() const
Return begin of iterator.
Definition: ogr_geometry.h:2957
Abstract curve base class for OGRLineString and OGRCircularString.
Definition: ogr_geometry.h:1441
OGRwkbGeometryType OGRFromOGCGeomType(const char *pszGeomType)
Map OGCgeometry format type to corresponding OGR constants.
Definition: ogrgeometry.cpp:2427
void * OGRGeometryH
Opaque type for a geometry.
Definition: ogr_api.h:66
virtual const char * getGeometryName() const override
Fetch WKT name for geometry type.
Definition: ogrmulticurve.cpp:133
const OGRLineString * getGeometryRef(int i) const
See OGRGeometryCollection::getGeometryRef()
Definition: ogr_geometry.h:3860
ChildType ** end()
Return end of iterator.
Definition: ogr_geometry.h:3108
const ChildType *const * begin() const
Return begin of iterator.
Definition: ogr_geometry.h:3699
OGRTriangle * getGeometryRef(int i)
See OGRPolyhedralSurface::getGeometryRef()
Definition: ogr_geometry.h:3440
virtual OGRwkbGeometryType getGeometryType() const override
Fetch geometry type.
Definition: ogrmultisurface.cpp:107
const OGRPolygon * getGeometryRef(int i) const
See OGRGeometryCollection::getGeometryRef()
Definition: ogr_geometry.h:3133
virtual OGRErr addRingDirectly(OGRCurve *poNewRing) override
Add a ring to a polygon.
Definition: ogrtriangle.cpp:246
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:2452
struct GEOSGeom_t * GEOSGeom
GEOS geometry type.
Definition: ogr_geometry.h:124
virtual OGRBoolean IsEmpty() const override
Returns TRUE (non-zero) if the object has no points.
Definition: ogr_geometry.h:1131
virtual OGRErr importFromWkb(const unsigned char *, size_t, OGRwkbVariant, size_t &nBytesConsumedOut) override
Assign geometry from well known binary data.
Definition: ogrlinestring.cpp:1522
const char * OGRToOGCGeomType(OGRwkbGeometryType eGeomType, bool bCamelCase=false, bool bAddZM=false, bool bSpaceBeforeZM=false)
Map OGR geometry format constants to corresponding OGC geometry type.
Definition: ogrgeometry.cpp:2506
OGRLayer::FeatureIterator end(OGRLayer *poLayer)
Return end of feature iterator.
Definition: ogrsf_frmts.h:419
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:3614
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:2448
OGRGeometry visitor interface.
Definition: ogr_geometry.h:163
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:3472
ChildType ** end()
Return end of curve iterator.
Definition: ogr_geometry.h:2119
const OGRSimpleCurve * toUpperClass() const
Return pointer of this in upper class.
Definition: ogr_geometry.h:1935
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:1209
OGRSimpleCurve * toUpperClass()
Return pointer of this in upper class.
Definition: ogr_geometry.h:1930
virtual int getDimension() const =0
Get the dimension of this object.
virtual OGRCurve * clone() const override=0
Make a copy of this object.
OGRLinearRing * toLinearRing()
Down-cast to OGRLinearRing*.
Definition: ogr_geometry.h:682
int OGRErr
Type for a OGR error.
Definition: ogr_core.h:378
virtual void segmentize(double dfMaxLength) override
Modify the geometry such it has no segment longer then the given distance.
Definition: ogrlinestring.cpp:2486
virtual OGRErr importFromWkb(const unsigned char *, size_t, OGRwkbVariant, size_t &nBytesConsumedOut) override
Assign geometry from well known binary data.
Definition: ogrpolygon.cpp:349
OGRCurvePolygon * toCurvePolygon()
Down-cast to OGRCurvePolygon*.
Definition: ogr_geometry.h:799
virtual void segmentize(double dfMaxLength)
Modify the geometry such it has no segment longer then the given distance.
Definition: ogrgeometry.cpp:846
const OGRGeometryCollection * toUpperClass() const
Return pointer of this in upper class.
Definition: ogr_geometry.h:3894
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:2217
OGRPoint * getGeometryRef(int i)
See OGRGeometryCollection::getGeometryRef()
Definition: ogr_geometry.h:3564
OGRMultiSurface & operator=(const OGRMultiSurface &other)
Assignment operator.
Definition: ogrmultisurface.cpp:84
OGRPolygon * toPolygon()
Down-cast to OGRPolygon*.
Definition: ogr_geometry.h:761
OGRWktFormat
WKT Output formatting options.
Definition: ogr_geometry.h:61
virtual std::string exportToWkt(const OGRWktOptions &opts=OGRWktOptions(), OGRErr *err=nullptr) const override
Export a geometry collection to WKT.
Definition: ogrmultisurface.cpp:281
OGRGeometryCollection * toGeometryCollection()
Down-cast to OGRGeometryCollection*.
Definition: ogr_geometry.h:819
OGRCurve * getExteriorRingCurve()
Fetch reference to external polygon ring.
Definition: ogrcurvepolygon.cpp:184
const OGRMultiCurve * toMultiCurve() const
Down-cast to OGRMultiCurve*.
Definition: ogr_geometry.h:909
int getNumInteriorRings() const
Fetch the number of internal rings.
Definition: ogrcurvepolygon.cpp:221
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:3610
const ChildType *const * end() const
Return end of iterator.
Definition: ogr_geometry.h:3272
OGRwkbGeometryType
List of well known binary geometry types.
Definition: ogr_core.h:406
ChildType ** end()
Return end of iterator.
Definition: ogr_geometry.h:2950
virtual OGRBoolean Equals(const OGRGeometry *) const override
Returns TRUE if two geometries are equivalent.
Definition: ogrcurvepolygon.cpp:660
OGRMultiCurve & operator=(const OGRMultiCurve &other)
Assignment operator.
Definition: ogrmulticurve.cpp:83
ChildType ** begin()
Return begin of iterator.
Definition: ogr_geometry.h:3412
const ChildType *const * begin() const
Return begin of iterator.
Definition: ogr_geometry.h:3115
const ChildType *const * begin() const
Return begin of iterator.
Definition: ogr_geometry.h:2549
#define CPL_WARN_UNUSED_RESULT
Qualifier to warn when the return value of a function is not used.
Definition: cpl_port.h:976
Triangle class.
Definition: ogr_geometry.h:2670
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:3903
virtual OGRPolyhedralSurface * clone() const override
Make a copy of this object.
Definition: ogrpolyhedralsurface.cpp:96
virtual OGRPolygon * clone() const override
Make a copy of this object.
Definition: ogrpolygon.cpp:103
const OGRMultiPoint * toMultiPoint() const
Down-cast to OGRMultiPoint*.
Definition: ogr_geometry.h:849
const ChildType *const * begin() const
Return begin of iterator.
Definition: ogr_geometry.h:3267
virtual const char * getGeometryName() const override
Fetch WKT name for geometry type.
Definition: ogrcurvepolygon.cpp:158
void setY(double yIn)
Set y.
Definition: ogr_geometry.h:1174
const ChildType *const * end() const
Return end of iterator.
Definition: ogr_geometry.h:3429
ChildType ** begin()
Return begin of iterator.
Definition: ogr_geometry.h:2537
OGRGeometry visitor default implementation.
Definition: ogr_geometry.h:285
OGRErr removeRing(int iIndex, bool bDelete=true)
Remove a geometry from the container.
Definition: ogrcurvepolygon.cpp:322
virtual double get_AreaOfCurveSegments() const override
Return area of curve segments.
Definition: ogrcompoundcurve.cpp:931
ChildType ** end()
Return end of sub-geometry iterator.
Definition: ogr_geometry.h:2783
virtual size_t WkbSize() const override
Returns size of related binary representation.
Definition: ogrcurvepolygon.cpp:465
const OGRMultiSurface * toMultiSurface() const
Down-cast to OGRMultiSurface*.
Definition: ogr_geometry.h:929
ChildType ** begin()
Return begin of sub-geometry iterator.
Definition: ogr_geometry.h:2778
double getZ() const
Return z.
Definition: ogr_geometry.h:1148
void setZ(double zIn)
Set z.
Definition: ogr_geometry.h:1185
const OGRSurface * toSurface() const
Down-cast to OGRSurface*.
Definition: ogr_geometry.h:751
virtual OGRErr addRing(OGRCurve *)
Add a ring to a polygon.
Definition: ogrcurvepolygon.cpp:345
virtual OGRBoolean hasCurveGeometry(int bLookForNonLinear=FALSE) const override
Returns if this geometry is or has curve geometry.
Definition: ogrpolygon.cpp:812
Simple container for a bounding region in 3D.
Definition: ogr_core.h:212
virtual size_t WkbSize() const =0
Returns size of related binary representation.
const ChildType *const * end() const
Return end of curve iterator.
Definition: ogr_geometry.h:2131
OGRBoolean IsMeasured() const
Definition: ogr_geometry.h:415
OGRCurvePolygon & operator=(const OGRCurvePolygon &other)
Assignment operator.
Definition: ogrcurvepolygon.cpp:86
std::unique_ptr< OGRPreparedGeometry, OGRPreparedGeometryUniquePtrDeleter > OGRPreparedGeometryUniquePtr
Unique pointer type for OGRPreparedGeometry.
Definition: ogr_geometry.h:4070
virtual OGRBoolean hasCurveGeometry(int bLookForNonLinear=FALSE) const override
Returns if this geometry is or has curve geometry.
Definition: ogrmulticurve.cpp:195
virtual OGRGeometry * getCurveGeometry(const char *const *papszOptions=nullptr) const
Return curve version of this geometry.
Definition: ogrgeometry.cpp:3341
Abstract curve base class for OGRLineString, OGRCircularString and OGRCompoundCurve.
Definition: ogr_geometry.h:1254
virtual OGRErr transform(OGRCoordinateTransformation *poCT) override
Apply arbitrary coordinate transformation to geometry.
Definition: ogrlinestring.cpp:2365
virtual double get_Length() const override
Returns the length of the curve.
Definition: ogrlinestring.cpp:1913
double getY() const
Return y.
Definition: ogr_geometry.h:1143
void visit(OGRPoint *) override
Visit OGRPoint.
Definition: ogr_geometry.h:215
const OGRGeometryCollection * toUpperClass() const
Return pointer of this in upper class.
Definition: ogr_geometry.h:3605
virtual void segmentize(double dfMaxLength) override
Modify the geometry such it has no segment longer then the given distance.
Definition: ogrcurvepolygon.cpp:747
struct GEOSContextHandle_HS * GEOSContextHandle_t
GEOS context handle type.
Definition: ogr_geometry.h:126
ChildType ** end()
Return end of iterator.
Definition: ogr_geometry.h:2542
virtual int getDimension() const override
Get the dimension of this object.
Definition: ogrgeometrycollection.cpp:176
virtual OGRErr transform(OGRCoordinateTransformation *poCT)=0
Apply arbitrary coordinate transformation to geometry.
OGRPolyhedralSurface & operator=(const OGRPolyhedralSurface &other)
Assignment operator.
Definition: ogrpolyhedralsurface.cpp:82
OGRPolyhedralSurface()
Create an empty PolyhedralSurface.
OGRGeometryCollection * toUpperClass()
Return pointer of this in upper class.
Definition: ogr_geometry.h:3162
Concrete representation of a closed ring.
Definition: ogr_geometry.h:1768
std::unique_ptr< OGRGeometry, OGRGeometryUniquePtrDeleter > OGRGeometryUniquePtr
Unique pointer type for OGRGeometry.
Definition: ogr_geometry.h:984
Simple container for a bounding region (rectangle)
Definition: ogr_core.h:57
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:2715
const OGRGeometryCollection * toGeometryCollection() const
Down-cast to OGRGeometryCollection*.
Definition: ogr_geometry.h:829
virtual void Value(double, OGRPoint *) const override
Fetch point at given distance along curve.
Definition: ogrlinestring.cpp:1955
ChildType ** begin()
Return begin of curve iterator.
Definition: ogr_geometry.h:2348
const OGRMultiPolygon * toMultiPolygon() const
Down-cast to OGRMultiPolygon*.
Definition: ogr_geometry.h:889
const OGRCurve * getGeometryRef(int i) const
See OGRGeometryCollection::getGeometryRef()
Definition: ogr_geometry.h:3717
virtual void visit(const OGRPoint *)=0
Visit OGRPoint.
static OGRLinearRing * CastToLinearRing(OGRCurve *poCurve)
Cast to linear ring.
Definition: ogrcurve.cpp:375
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:3766
OGRPolygon ChildType
Type of child elements.
Definition: ogr_geometry.h:3250
ChildType ** begin()
Return begin of iterator.
Definition: ogr_geometry.h:3539
OGRMultiPoint * toMultiPoint()
Down-cast to OGRMultiPoint*.
Definition: ogr_geometry.h:839
double y
y
Definition: ogr_geometry.h:120
const OGRCurve * toCurve() const
Down-cast to OGRCurve*.
Definition: ogr_geometry.h:633
Options for formatting WKT output.
Definition: ogr_geometry.h:69
OGRErr importFromWkt(const char **) override
deprecated
Definition: ogrcurvepolygon.cpp:546
const OGRMultiLineString * toMultiLineString() const
Down-cast to OGRMultiLineString*.
Definition: ogr_geometry.h:869
const OGRTriangle * getGeometryRef(int i) const
See OGRPolyhedralSurface::getGeometryRef()
Definition: ogr_geometry.h:3445
const ChildType *const * end() const
Return end of iterator.
Definition: ogr_geometry.h:2962
const OGRSimpleCurve * toUpperClass() const
Return pointer of this in upper class.
Definition: ogr_geometry.h:1726
virtual void setMeasured(OGRBoolean bIsMeasured) override
Add or remove the M coordinate dimension.
Definition: ogrcurvepolygon.cpp:720
virtual int IntersectsPoint(const OGRPoint *p) const
Returns if a point intersects a (closed) curve.
Definition: ogrcurve.cpp:416
const OGRCurvePolygon * toUpperClass() const
Return pointer of this in upper class.
Definition: ogr_geometry.h:2616
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:1731
Concrete class representing polygons.
Definition: ogr_geometry.h:2502
TriangulatedSurface class.
Definition: ogr_geometry.h:3388
Concrete class representing curve polygons.
Definition: ogr_geometry.h:2307
double getM() const
Return m.
Definition: ogr_geometry.h:1153
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:3336
OGRCurve * getInteriorRingCurve(int)
Fetch reference to indicated internal ring.
Definition: ogrcurvepolygon.cpp:249
virtual OGRBoolean Equals(const OGRGeometry *) const =0
Returns TRUE if two geometries are equivalent.
const ChildType *const * begin() const
Return begin of curve iterator.
Definition: ogr_geometry.h:2360
virtual double get_Length() const =0
Returns the length of the curve.
const OGRPoint * getGeometryRef(int i) const
See OGRGeometryCollection::getGeometryRef()
Definition: ogr_geometry.h:3569
virtual OGRErr importFromWkb(const unsigned char *, size_t, OGRwkbVariant, size_t &nBytesConsumedOut) override
Assign geometry from well known binary data.
Definition: ogrgeometrycollection.cpp:598
virtual const char * getGeometryName() const override
Fetch WKT name for geometry type.
Definition: ogrmultisurface.cpp:134
const OGRPolyhedralSurface * toPolyhedralSurface() const
Down-cast to OGRPolyhedralSurface*.
Definition: ogr_geometry.h:949
const ChildType *const * begin() const
Return begin of sub-geometry iterator.
Definition: ogr_geometry.h:2790
OGRMultiLineString * toMultiLineString()
Down-cast to OGRMultiLineString*.
Definition: ogr_geometry.h:859
OGRLineString & operator=(const OGRLineString &other)
Assignment operator.
Definition: ogrlinestring.cpp:2749
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:630
virtual OGRBoolean Within(const OGRGeometry *) const
Test for containment.
Definition: ogrgeometry.cpp:5372
virtual OGRwkbGeometryType getGeometryType() const override
Fetch geometry type.
Definition: ogrgeometrycollection.cpp:159
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:1940
virtual void setMeasured(OGRBoolean bIsMeasured)
Add or remove the M coordinate dimension.
Definition: ogrgeometry.cpp:1110
OGRCurvePolygon * toUpperClass()
Return pointer of this in upper class.
Definition: ogr_geometry.h:2611
virtual OGRErr exportToWkb(OGRwkbByteOrder, unsigned char *, OGRwkbVariant=wkbVariantOldOgc) const override
Convert a geometry into well known binary format.
Definition: ogrcurvepolygon.cpp:518
#define CPL_DISALLOW_COPY_ASSIGN(ClassName)
Helper to remove the copy and assignment constructors so that the compiler will not generate the defa...
Definition: cpl_port.h:1042
bool operator!=(const OGRGeometry &other) const
Returns if two geometries are different.
Definition: ogr_geometry.h:395
void visit(const OGRPoint *) override
Visit OGRPoint.
Definition: ogr_geometry.h:290
OGRwkbVariant
Output variants of WKB we support.
Definition: ogr_core.h:540
virtual std::string exportToWkt(const OGRWktOptions &opts=OGRWktOptions(), OGRErr *err=nullptr) const override
Export a geometry collection to WKT.
Definition: ogrgeometrycollection.cpp:819
OGRCurve * stealExteriorRingCurve()
"Steal" reference to external ring.
Definition: ogrcurvepolygon.cpp:290
OGRPoint ChildType
Type of child elements.
Definition: ogr_geometry.h:1298
OGRCurve ChildType
Type of child elements.
Definition: ogr_geometry.h:2109
OGRLineString * toUpperClass()
Return pointer of this in upper class.
Definition: ogr_geometry.h:1820
virtual OGRGeometryCollection * clone() const override
Make a copy of this object.
Definition: ogrgeometrycollection.cpp:149
OGRCompoundCurve * toCompoundCurve()
Down-cast to OGRCompoundCurve*.
Definition: ogr_geometry.h:721
virtual void swapXY() override
Swap x and y coordinates.
Definition: ogrcurvepolygon.cpp:762
double getX() const
Return x.
Definition: ogr_geometry.h:1138
virtual double get_Area() const =0
Get the area of the (closed) curve.
static OGRGeometryH ToHandle(OGRGeometry *poGeom)
Convert a OGRGeometry* to a OGRGeometryH.
Definition: ogr_geometry.h:587
ChildType ** end()
Return end of iterator.
Definition: ogr_geometry.h:3835
const ChildType *const * end() const
Return end of iterator.
Definition: ogr_geometry.h:3120
OGRGeometry visitor default implementation.
Definition: ogr_geometry.h:210
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:1834