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);
1457 OGRErr importFromWKTListOnly(
const char **ppszInput,
int bHasZ,
int bHasM,
1462 virtual double get_LinearArea()
const;
1468 class CPL_DLL Iterator
1471 std::unique_ptr<Private> m_poPrivate;
1476 Iterator(Iterator &&oOther) noexcept;
1480 Iterator &operator++();
1481 bool operator!=(
const Iterator &it)
const;
1487 class CPL_DLL ConstIterator
1490 std::unique_ptr<Private> m_poPrivate;
1495 ConstIterator &&oOther) noexcept;
1499 ConstIterator &operator++();
1500 bool operator!=(
const ConstIterator &it)
const;
1533 ConstIterator
begin()
const;
1535 ConstIterator
end()
const;
1538 virtual size_t WkbSize()
const override;
1540 size_t &nBytesConsumedOut)
override;
1548 OGRErr importFromWkt(
const char **)
override;
1559 OGRErr *err =
nullptr)
const override;
1562 virtual void empty()
override;
1563 virtual void getEnvelope(
OGREnvelope *psEnvelope)
const override;
1564 virtual void getEnvelope(
OGREnvelope3D *psEnvelope)
const override;
1569 virtual double get_Length()
const override;
1570 virtual void StartPoint(
OGRPoint *)
const override;
1571 virtual void EndPoint(
OGRPoint *)
const override;
1572 virtual void Value(
double,
OGRPoint *)
const override;
1573 virtual double Project(
const OGRPoint *)
const;
1574 virtual OGRLineString *getSubLine(
double,
double,
int)
const;
1581 void getPoint(
int,
OGRPoint *)
const;
1584 return paoPoints[i].
x;
1588 return paoPoints[i].
y;
1590 double getZ(
int i)
const;
1591 double getM(
int i)
const;
1597 virtual void setCoordinateDimension(
int nDimension)
override;
1598 virtual void set3D(
OGRBoolean bIs3D)
override;
1599 virtual void setMeasured(
OGRBoolean bIsMeasured)
override;
1600 void setNumPoints(
int nNewPointCount,
int bZeroizeNewContent = TRUE);
1602 void setPoint(
int,
double,
double);
1603 void setZ(
int,
double);
1604 void setM(
int,
double);
1605 void setPoint(
int,
double,
double,
double);
1606 void setPointM(
int,
double,
double,
double);
1607 void setPoint(
int,
double,
double,
double,
double);
1608 void setPoints(
int,
const OGRRawPoint *,
const double * =
nullptr);
1609 void setPointsM(
int,
const OGRRawPoint *,
const double *);
1610 void setPoints(
int,
const OGRRawPoint *,
const double *,
const double *);
1611 void setPoints(
int,
const double *padfX,
const double *padfY,
1612 const double *padfZIn =
nullptr);
1613 void setPointsM(
int,
const double *padfX,
const double *padfY,
1614 const double *padfMIn =
nullptr);
1615 void setPoints(
int,
const double *padfX,
const double *padfY,
1616 const double *padfZIn,
const double *padfMIn);
1618 void addPoint(
double,
double);
1619 void addPoint(
double,
double,
double);
1620 void addPointM(
double,
double,
double);
1621 void addPoint(
double,
double,
double,
double);
1623 bool removePoint(
int);
1625 void getPoints(
OGRRawPoint *,
double * =
nullptr)
const;
1626 void getPoints(
void *pabyX,
int nXStride,
void *pabyY,
int nYStride,
1627 void *pabyZ =
nullptr,
int nZStride = 0,
1628 void *pabyM =
nullptr,
int nMStride = 0)
const;
1630 void addSubLineString(
const OGRLineString *,
int nStartVertex = 0,
1631 int nEndVertex = -1);
1632 void reversePoints(
void);
1637 virtual void flattenTo2D()
override;
1638 virtual void segmentize(
double dfMaxLength)
override;
1640 virtual void swapXY()
override;
1642 OGR_ALLOW_UPCAST_TO(Curve)
1643 OGR_ALLOW_CAST_TO_THIS(SimpleCurve)
1650 return poCurve->begin();
1655 return poCurve->end();
1661 return poCurve->begin();
1666 return poCurve->end();
1691 virtual OGRCurveCasterToLineString GetCasterToLineString()
const override;
1692 virtual OGRCurveCasterToLinearRing GetCasterToLinearRing()
const override;
1709 const char *
const *papszOptions =
nullptr)
const override;
1711 getCurveGeometry(
const char *
const *papszOptions =
nullptr)
const override;
1712 virtual double get_Area()
const override;
1732 visitor->
visit(
this);
1736 visitor->
visit(
this);
1739 OGR_ALLOW_UPCAST_TO(SimpleCurve)
1740 OGR_ALLOW_CAST_TO_THIS(LineString)
1774 virtual size_t WkbSize()
const override;
1776 size_t &nBytesConsumedOut)
override;
1786 virtual size_t _WkbSize(
int _flags)
const;
1788 const unsigned char *,
size_t,
1789 size_t &nBytesConsumedOut);
1791 unsigned char *)
const;
1793 virtual OGRCurveCasterToLineString GetCasterToLineString()
const override;
1794 virtual OGRCurveCasterToLinearRing GetCasterToLinearRing()
const override;
1810 virtual void reverseWindingOrder();
1813 int bTestEnvelope = TRUE)
const;
1815 int bTestEnvelope = TRUE)
const;
1831 visitor->
visit(
this);
1835 visitor->
visit(
this);
1838 OGR_ALLOW_UPCAST_TO(LineString)
1839 OGR_ALLOW_CAST_TO_THIS(LinearRing)
1861 void ExtendEnvelopeWithCircular(
OGREnvelope *psEnvelope)
const;
1863 int IsFullCircle(
double &cx,
double &cy,
double &square_R)
const;
1867 virtual OGRCurveCasterToLineString GetCasterToLineString()
const override;
1868 virtual OGRCurveCasterToLinearRing GetCasterToLinearRing()
const override;
1883 size_t &nBytesConsumedOut)
override;
1902 OGRErr *err =
nullptr)
const override;
1914 const char *
const *papszOptions =
nullptr)
const override;
1916 virtual double get_Area()
const override;
1921 virtual void segmentize(
double dfMaxLength)
override;
1926 const char *
const *papszOptions =
nullptr)
const override;
1941 visitor->
visit(
this);
1945 visitor->
visit(
this);
1948 OGR_ALLOW_UPCAST_TO(SimpleCurve)
1949 OGR_ALLOW_CAST_TO_THIS(CircularString)
1966 class CPL_DLL OGRCurveCollection
1975 int nCurveCount = 0;
1979 OGRCurveCollection();
1980 OGRCurveCollection(
const OGRCurveCollection &other);
1981 ~OGRCurveCollection();
1983 OGRCurveCollection &
operator=(
const OGRCurveCollection &other);
1998 return papoCurves + nCurveCount;
2010 return papoCurves + nCurveCount;
2022 const unsigned char *pabyData,
size_t &nSize,
2023 size_t &nDataOffset,
2025 size_t nMinSubGeomSize,
2028 importBodyFromWkb(
OGRGeometry *poGeom,
const unsigned char *pabyData,
2029 size_t nSize,
bool bAcceptCompoundCurve,
2043 int getNumCurves()
const;
2045 const OGRCurve *getCurve(
int)
const;
2048 OGRErr removeCurve(
int iIndex,
bool bDelete =
true);
2075 OGRCurveCollection oCC{};
2077 OGRErr addCurveDirectlyInternal(
OGRCurve *poCurve,
double dfToleranceEps,
2083 OGRLineString *CurveToLineInternal(
double dfMaxAngleStepSizeDegrees,
2084 const char *
const *papszOptions,
2085 int bIsLinearRing)
const;
2096 virtual OGRCurveCasterToLineString GetCasterToLineString()
const override;
2097 virtual OGRCurveCasterToLinearRing GetCasterToLinearRing()
const override;
2136 virtual size_t WkbSize()
const override;
2138 size_t &nBytesConsumedOut)
override;
2157 OGRErr *err =
nullptr)
const override;
2161 virtual void empty()
override;
2173 const char *
const *papszOptions =
nullptr)
const override;
2177 virtual double get_Area()
const override;
2183 int getNumCurves()
const;
2185 const OGRCurve *getCurve(
int)
const;
2195 OGRErr addCurve(
const OGRCurve *,
double dfToleranceEps = 1e-14);
2196 OGRErr addCurveDirectly(
OGRCurve *,
double dfToleranceEps = 1e-14);
2205 virtual void segmentize(
double dfMaxLength)
override;
2210 const char *
const *papszOptions =
nullptr)
const override;
2213 visitor->
visit(
this);
2217 visitor->
visit(
this);
2220 virtual void swapXY()
override;
2222 OGR_ALLOW_UPCAST_TO(Curve)
2223 OGR_ALLOW_CAST_TO_THIS(CompoundCurve)
2231 return poCurve->
begin();
2237 return poCurve->
end();
2243 return poCurve->
begin();
2248 return poCurve->
end();
2265 virtual OGRSurfaceCasterToPolygon GetCasterToPolygon()
const = 0;
2266 virtual OGRSurfaceCasterToCurvePolygon GetCasterToCurvePolygon()
const = 0;
2270 virtual double get_Area()
const = 0;
2273 return PointOnSurfaceInternal(poPoint);
2282 OGR_FORBID_DOWNCAST_TO_POINT
2283 OGR_FORBID_DOWNCAST_TO_ALL_CURVES
2284 OGR_ALLOW_CAST_TO_THIS(Surface)
2285 OGR_FORBID_DOWNCAST_TO_ALL_MULTI
2312 virtual int checkRing(
OGRCurve *poNewRing)
const;
2313 OGRErr addRingDirectlyInternal(
OGRCurve *poCurve,
int bNeedRealloc);
2323 OGRCurveCollection oCC{};
2325 virtual OGRSurfaceCasterToPolygon GetCasterToPolygon()
const override;
2326 virtual OGRSurfaceCasterToCurvePolygon
2327 GetCasterToCurvePolygon()
const override;
2372 virtual void empty()
override;
2376 virtual void segmentize(
double dfMaxLength)
override;
2381 const char *
const *papszOptions =
nullptr)
const override;
2384 virtual double get_Area()
const override;
2387 virtual size_t WkbSize()
const override;
2389 size_t &nBytesConsumedOut)
override;
2408 OGRErr *err =
nullptr)
const override;
2418 const char *
const *papszOptions =
nullptr)
const;
2447 visitor->
visit(
this);
2451 visitor->
visit(
this);
2454 virtual void swapXY()
override;
2456 OGR_ALLOW_UPCAST_TO(Surface)
2457 OGR_ALLOW_CAST_TO_THIS(CurvePolygon)
2465 return poGeom->
begin();
2471 return poGeom->
end();
2477 return poGeom->
begin();
2482 return poGeom->
end();
2509 virtual int checkRing(
OGRCurve *poNewRing)
const override;
2510 virtual OGRErr importFromWKTListOnly(
const char **ppszInput,
int bHasZ,
2512 int &nMaxPoints,
double *&padfZ);
2516 virtual OGRSurfaceCasterToPolygon GetCasterToPolygon()
const override;
2517 virtual OGRSurfaceCasterToCurvePolygon
2518 GetCasterToCurvePolygon()
const override;
2536 return reinterpret_cast<ChildType **
>(oCC.begin());
2541 return reinterpret_cast<ChildType **
>(oCC.end());
2548 return reinterpret_cast<const ChildType *
const *
>(oCC.begin());
2553 return reinterpret_cast<const ChildType *
const *
>(oCC.end());
2563 getCurveGeometry(
const char *
const *papszOptions =
nullptr)
const override;
2566 const char *
const *papszOptions =
nullptr)
const override;
2569 virtual size_t WkbSize()
const override;
2571 size_t &nBytesConsumedOut)
override;
2590 OGRErr *err =
nullptr)
const override;
2595 const char *
const *papszOptions =
nullptr)
const override;
2620 visitor->
visit(
this);
2624 visitor->
visit(
this);
2629 OGR_ALLOW_UPCAST_TO(CurvePolygon)
2630 OGR_ALLOW_CAST_TO_THIS(Polygon)
2637 return poGeom->
begin();
2642 return poGeom->
end();
2648 return poGeom->
begin();
2653 return poGeom->
end();
2672 bool quickValidityCheck()
const;
2676 virtual OGRSurfaceCasterToPolygon GetCasterToPolygon()
const override;
2677 virtual OGRErr importFromWKTListOnly(
const char **ppszInput,
int bHasZ,
2680 double *&padfZ)
override;
2696 size_t &nBytesConsumedOut)
override;
2714 visitor->
visit(
this);
2718 visitor->
visit(
this);
2725 OGR_ALLOW_UPCAST_TO(Polygon)
2726 OGR_ALLOW_CAST_TO_THIS(Triangle)
2742 OGRErr importFromWkbInternal(
const unsigned char *pabyData,
size_t nSize,
2744 size_t &nBytesConsumedOut);
2745 OGRErr importFromWktInternal(
const char **ppszInput,
int nRecLevel);
2754 const std::string &exclude = std::string())
const;
2781 return papoGeoms + nGeomCount;
2793 return papoGeoms + nGeomCount;
2800 virtual void empty()
override;
2804 virtual void segmentize(
double dfMaxLength)
override;
2808 getCurveGeometry(
const char *
const *papszOptions =
nullptr)
const override;
2811 const char *
const *papszOptions =
nullptr)
const override;
2814 virtual size_t WkbSize()
const override;
2816 size_t &nBytesConsumedOut)
override;
2835 OGRErr *err =
nullptr)
const override;
2837 virtual double get_Length()
const;
2838 virtual double get_Area()
const;
2846 int getNumGeometries()
const;
2859 virtual OGRErr removeGeometry(
int iIndex,
int bDelete = TRUE);
2866 virtual void swapXY()
override;
2870 visitor->
visit(
this);
2874 visitor->
visit(
this);
2880 OGR_FORBID_DOWNCAST_TO_POINT
2881 OGR_FORBID_DOWNCAST_TO_ALL_CURVES
2882 OGR_FORBID_DOWNCAST_TO_ALL_SURFACES
2883 OGR_ALLOW_CAST_TO_THIS(GeometryCollection)
2891 return poGeom->
begin();
2897 return poGeom->
end();
2903 return poGeom->
begin();
2908 return poGeom->
end();
2942 return reinterpret_cast<ChildType **
>(papoGeoms);
2947 return reinterpret_cast<ChildType **
>(papoGeoms + nGeomCount);
2954 return reinterpret_cast<const ChildType *
const *
>(papoGeoms);
2959 return reinterpret_cast<const ChildType *
const *
>(papoGeoms +
2983 OGRErr *err =
nullptr)
const override;
3020 visitor->
visit(
this);
3024 visitor->
visit(
this);
3029 OGR_ALLOW_CAST_TO_THIS(MultiSurface)
3030 OGR_ALLOW_UPCAST_TO(GeometryCollection)
3031 OGR_FORBID_DOWNCAST_TO_MULTIPOINT
3032 OGR_FORBID_DOWNCAST_TO_MULTILINESTRING
3033 OGR_FORBID_DOWNCAST_TO_MULTICURVE
3041 return poGeom->
begin();
3047 return poGeom->
end();
3053 return poGeom->
begin();
3058 return poGeom->
end();
3079 OGRErr _addGeometryWithExpectedSubGeometryType(
3081 OGRErr _addGeometryDirectlyWithExpectedSubGeometryType(
3100 return reinterpret_cast<ChildType **
>(papoGeoms);
3105 return reinterpret_cast<ChildType **
>(papoGeoms + nGeomCount);
3112 return reinterpret_cast<const ChildType *
const *
>(papoGeoms);
3117 return reinterpret_cast<const ChildType *
const *
>(papoGeoms +
3147 OGRErr *err =
nullptr)
const override;
3166 visitor->
visit(
this);
3170 visitor->
visit(
this);
3175 OGR_ALLOW_CAST_TO_THIS(MultiPolygon)
3176 OGR_ALLOW_UPCAST_TO(MultiSurface)
3184 return poGeom->
begin();
3190 return poGeom->
end();
3196 return poGeom->
begin();
3201 return poGeom->
end();
3221 virtual OGRSurfaceCasterToPolygon GetCasterToPolygon()
const override;
3222 virtual OGRSurfaceCasterToCurvePolygon
3223 GetCasterToCurvePolygon()
const override;
3225 virtual const char *getSubGeometryName()
const;
3230 virtual OGRPolyhedralSurfaceCastToMultiPolygon
3231 GetCasterToMultiPolygon()
const;
3270 virtual size_t WkbSize()
const override;
3274 size_t &nBytesConsumedOut)
override;
3293 OGRErr *err =
nullptr)
const override;
3298 virtual void empty()
override;
3307 virtual double get_Area()
const override;
3323 virtual void swapXY()
override;
3328 visitor->
visit(
this);
3332 visitor->
visit(
this);
3338 OGR_ALLOW_CAST_TO_THIS(PolyhedralSurface)
3339 OGR_ALLOW_UPCAST_TO(Surface)
3347 return poGeom->
begin();
3353 return poGeom->
end();
3359 return poGeom->
begin();
3364 return poGeom->
end();
3383 virtual const char *getSubGeometryName()
const override;
3386 virtual OGRPolyhedralSurfaceCastToMultiPolygon
3387 GetCasterToMultiPolygon()
const override;
3404 return reinterpret_cast<ChildType **
>(oMP.begin());
3409 return reinterpret_cast<ChildType **
>(oMP.end());
3416 return reinterpret_cast<const ChildType *
const *
>(oMP.begin());
3421 return reinterpret_cast<const ChildType *
const *
>(oMP.end());
3456 visitor->
visit(
this);
3460 visitor->
visit(
this);
3466 OGR_ALLOW_CAST_TO_THIS(TriangulatedSurface)
3467 OGR_ALLOW_UPCAST_TO(PolyhedralSurface)
3475 return poGeom->
begin();
3481 return poGeom->
end();
3487 return poGeom->
begin();
3492 return poGeom->
end();
3507 OGRErr importFromWkt_Bracketed(
const char **,
int bHasM,
int bHasZ);
3527 return reinterpret_cast<ChildType **
>(papoGeoms);
3532 return reinterpret_cast<ChildType **
>(papoGeoms + nGeomCount);
3539 return reinterpret_cast<const ChildType *
const *
>(papoGeoms);
3544 return reinterpret_cast<const ChildType *
const *
>(papoGeoms +
3580 OGRErr *err =
nullptr)
const override;
3598 visitor->
visit(
this);
3602 visitor->
visit(
this);
3609 OGR_ALLOW_CAST_TO_THIS(MultiPoint)
3610 OGR_ALLOW_UPCAST_TO(GeometryCollection)
3611 OGR_FORBID_DOWNCAST_TO_MULTILINESTRING
3612 OGR_FORBID_DOWNCAST_TO_MULTICURVE
3613 OGR_FORBID_DOWNCAST_TO_MULTISURFACE
3614 OGR_FORBID_DOWNCAST_TO_MULTIPOLYGON
3621 return poGeom->
begin();
3626 return poGeom->
end();
3632 return poGeom->
begin();
3637 return poGeom->
end();
3675 return reinterpret_cast<ChildType **
>(papoGeoms);
3680 return reinterpret_cast<ChildType **
>(papoGeoms + nGeomCount);
3687 return reinterpret_cast<const ChildType *
const *
>(papoGeoms);
3692 return reinterpret_cast<const ChildType *
const *
>(papoGeoms +
3728 OGRErr *err =
nullptr)
const override;
3750 visitor->
visit(
this);
3754 visitor->
visit(
this);
3759 OGR_ALLOW_CAST_TO_THIS(MultiCurve)
3760 OGR_ALLOW_UPCAST_TO(GeometryCollection)
3761 OGR_FORBID_DOWNCAST_TO_MULTIPOINT
3762 OGR_FORBID_DOWNCAST_TO_MULTISURFACE
3763 OGR_FORBID_DOWNCAST_TO_MULTIPOLYGON
3770 return poGeom->
begin();
3775 return poGeom->
end();
3781 return poGeom->
begin();
3786 return poGeom->
end();
3818 return reinterpret_cast<ChildType **
>(papoGeoms);
3823 return reinterpret_cast<ChildType **
>(papoGeoms + nGeomCount);
3830 return reinterpret_cast<const ChildType *
const *
>(papoGeoms);
3835 return reinterpret_cast<const ChildType *
const *
>(papoGeoms +
3865 OGRErr *err =
nullptr)
const override;
3884 visitor->
visit(
this);
3888 visitor->
visit(
this);
3893 OGR_ALLOW_CAST_TO_THIS(MultiLineString)
3894 OGR_ALLOW_UPCAST_TO(MultiCurve)
3895 OGR_FORBID_DOWNCAST_TO_MULTIPOINT
3896 OGR_FORBID_DOWNCAST_TO_MULTISURFACE
3897 OGR_FORBID_DOWNCAST_TO_MULTIPOLYGON
3905 return poGeom->
begin();
3911 return poGeom->
end();
3917 return poGeom->
begin();
3922 return poGeom->
end();
3936 static OGRErr createFromFgfInternal(
const unsigned char *pabyData,
3939 int *pnBytesConsumed,
int nRecLevel);
3944 size_t =
static_cast<size_t>(-1),
3946 static OGRErr createFromWkb(
const void *pabyData,
3949 size_t &nBytesConsumedOut);
3960 CPL_WARN_DEPRECATED(
"Use createFromWkt(const char**, ...) instead")
3962 return createFromWkt(
const_cast<const char **
>(ppszInput), poSRS,
3970 static OGRGeometry *createFromGeoJson(
const char *,
int = -1);
3978 bool bOnlyInOrder =
true);
3985 const char *
const *papszOptions =
nullptr);
3991 int *pbResultValidGeometry,
3992 const char **papszOptions =
nullptr);
3993 static bool haveGEOS();
4000 std::unique_ptr<Private> d;
4009 char **papszOptions,
4013 approximateArcAngles(
double dfX,
double dfY,
double dfZ,
4014 double dfPrimaryRadius,
double dfSecondaryAxis,
4015 double dfRotation,
double dfStartAngle,
4016 double dfEndAngle,
double dfMaxAngleStepSizeDegrees,
4017 const bool bUseMaxGap =
false);
4019 static int GetCurveParameters(
double x0,
double y0,
double x1,
double y1,
4020 double x2,
double y2,
double &R,
double &cx,
4021 double &cy,
double &alpha0,
double &alpha1,
4024 curveToLineString(
double x0,
double y0,
double z0,
double x1,
double y1,
4025 double z1,
double x2,
double y2,
double z2,
int bHasZ,
4026 double dfMaxAngleStepSizeDegrees,
4027 const char *
const *papszOptions =
nullptr);
4030 const char *
const *papszOptions =
nullptr);
4035 bool bCamelCase =
false,
4036 bool bAddZM =
false,
4037 bool bSpaceBeforeZM =
false);
4040 typedef struct _OGRPreparedGeometry OGRPreparedGeometry;
4042 struct CPL_DLL OGRPreparedGeometryUniquePtrDeleter
4044 void operator()(OGRPreparedGeometry *)
const;
4051 typedef std::unique_ptr<OGRPreparedGeometry,
4052 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:2257
virtual void getEnvelope(OGREnvelope *psEnvelope) const override
Computes and returns the bounding envelope for this geometry in the passed psEnvelope structure.
Definition: ogrcurvepolygon.cpp:616
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:3093
OGRLineString ChildType
Type of child elements.
Definition: ogr_geometry.h:3811
OGRPolygon * getGeometryRef(int i)
See OGRGeometryCollection::getGeometryRef()
Definition: ogr_geometry.h:3123
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:3872
ChildType ** begin()
Return begin of iterator.
Definition: ogr_geometry.h:3816
A collection of OGRCurve.
Definition: ogr_geometry.h:3651
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:1175
double getX(int i) const
Get X at vertex.
Definition: ogr_geometry.h:1582
ChildType ** end()
Return end of iterator.
Definition: ogr_geometry.h:3252
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:3414
Concrete representation of a multi-vertex line.
Definition: ogr_geometry.h:1681
const ChildType *const * begin() const
Return begin of iterator.
Definition: ogr_geometry.h:3828
int getNumGeometries() const
Fetch number of geometries in PolyhedralSurface.
Definition: ogrpolyhedralsurface.cpp:794
OGRPolygon * getGeometryRef(int i)
Fetch geometry from container.
Definition: ogrpolyhedralsurface.cpp:816
virtual OGRBoolean Contains(const OGRGeometry *) const
Test for containment.
Definition: ogrgeometry.cpp:5431
A collection of non-overlapping OGRPolygon.
Definition: ogr_geometry.h:3070
unsigned char GByte
Unsigned byte type.
Definition: cpl_port.h:205
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:762
OGRGeometryCollection * toUpperClass()
Return pointer of this in upper class.
Definition: ogr_geometry.h:3586
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:2935
ChildType ** begin()
Return begin of iterator.
Definition: ogr_geometry.h:2940
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:5565
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:3022
Utility class to store a collection of curves.
Definition: ogr_geometry.h:2072
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:2618
virtual OGRGeometry * clone() const =0
Make a copy of this object.
virtual int getNumPoints() const override
Fetch vertex count.
Definition: ogr_geometry.h:1577
virtual OGRwkbGeometryType getGeometryType() const =0
Fetch geometry type.
virtual void swapXY()
Swap x and y coordinates.
Definition: ogrgeometry.cpp:6247
OGRErr importFromWkt(const char **) override
deprecated
Definition: ogrlinestring.cpp:1732
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:1720
virtual OGRBoolean hasCurveGeometry(int bLookForNonLinear=FALSE) const override
Returns if this geometry is or has curve geometry.
Definition: ogrgeometrycollection.cpp:1186
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:364
const ChildType *const * end() const
Return end of iterator.
Definition: ogr_geometry.h:3833
virtual OGRBoolean IsEmpty() const override
Returns TRUE (non-zero) if the object has no points.
Definition: ogrcurvepolygon.cpp:714
const ChildType *const * end() const
Return end of iterator.
Definition: ogr_geometry.h:2551
OGRSurface * getGeometryRef(int i)
See OGRGeometryCollection::getGeometryRef()
Definition: ogr_geometry.h:2993
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:1630
void setM(double mIn)
Set m.
Definition: ogr_geometry.h:1193
ChildType ** end()
Return end of iterator.
Definition: ogr_geometry.h:3407
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:1824
virtual OGRPolygon * CurvePolyToPoly(double dfMaxAngleStepSizeDegrees=0, const char *const *papszOptions=nullptr) const
Return a polygon from a curve polygon.
Definition: ogrcurvepolygon.cpp:566
ChildType ** begin()
Return begin of curve iterator.
Definition: ogr_geometry.h:2113
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:3934
const ChildType *const * end() const
Return end of sub-geometry iterator.
Definition: ogr_geometry.h:2791
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:3159
const ChildType *const * end() const
Return end of iterator.
Definition: ogr_geometry.h:3690
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:3330
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:2707
ChildType ** end()
Return end of iterator.
Definition: ogr_geometry.h:3530
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:2998
OGRLinearRing ChildType
Type of child elements.
Definition: ogr_geometry.h:2529
virtual OGRBoolean hasCurveGeometry(int bLookForNonLinear=FALSE) const override
Returns if this geometry is or has curve geometry.
Definition: ogrcurvepolygon.cpp:591
A collection of 1 or more geometry objects.
Definition: ogr_geometry.h:2740
virtual OGRBoolean hasCurveGeometry(int bLookForNonLinear=FALSE) const
Returns if this geometry is or has curve geometry.
Definition: ogrgeometry.cpp:3259
@ 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:3215
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:3164
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:2211
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:3292
Abstract base class for all geometry classes.
Definition: ogr_geometry.h:334
A collection of OGRPoint.
Definition: ogr_geometry.h:3504
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:2622
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:3247
A collection of non-overlapping OGRSurface.
Definition: ogr_geometry.h:2922
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:3957
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:400
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:3748
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:1586
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:3743
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:537
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:3168
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:3542
double x
x
Definition: ogr_geometry.h:118
ChildType ** end()
Return end of iterator.
Definition: ogr_geometry.h:3678
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:2773
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:2868
virtual OGRErr PointOnSurface(OGRPoint *poPoint) const
This method relates to the SFCOM ISurface::get_PointOnSurface() method.
Definition: ogr_geometry.h:2271
virtual std::string exportToWkt(const OGRWktOptions &opts=OGRWktOptions(), OGRErr *err=nullptr) const override
Export a polygon to WKT.
Definition: ogrpolygon.cpp:656
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:1829
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:3098
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:3798
OGRCurve ChildType
Type of child elements.
Definition: ogr_geometry.h:2341
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:3520
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:3841
Abstract base class for 2 dimensional objects like polygons or curve polygons.
Definition: ogr_geometry.h:2261
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:3444
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:1943
OGRTriangle & operator=(const OGRTriangle &other)
Assignment operator.
Definition: ogrtriangle.cpp:135
OGRTriangle ChildType
Type of child elements.
Definition: ogr_geometry.h:3397
Concrete representation of a circular string, that is to say a curve made of one or several arc circl...
Definition: ogr_geometry.h:1858
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:772
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:1195
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:1852
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:3454
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:2896
virtual void set3D(OGRBoolean bIs3D) override
Add or remove the Z coordinate dimension.
Definition: ogrcurvepolygon.cpp:691
OGRSurface * toSurface()
Down-cast to OGRSurface*.
Definition: ogr_geometry.h:741
ChildType ** begin()
Return begin of iterator.
Definition: ogr_geometry.h:3673
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:3018
const ChildType *const * begin() const
Return begin of curve iterator.
Definition: ogr_geometry.h:2125
OGRGeometry ChildType
Type of child elements.
Definition: ogr_geometry.h:2769
virtual void assignSpatialReference(const OGRSpatialReference *poSR) override
Assign spatial reference to this object.
Definition: ogrcurvepolygon.cpp:705
OGRCurve * getGeometryRef(int i)
See OGRGeometryCollection::getGeometryRef()
Definition: ogr_geometry.h:3698
const OGRGeometryCollection * toUpperClass() const
Return pointer of this in upper class.
Definition: ogr_geometry.h:3013
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:465
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:655
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:2716
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:3882
OGRErr importFromWkt(const char **) override
deprecated
Definition: ogrgeometrycollection.cpp:772
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:1734
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:685
ChildType ** end()
Return end of curve iterator.
Definition: ogr_geometry.h:2351
OGRGeometryCollection * toUpperClass()
Return pointer of this in upper class.
Definition: ogr_geometry.h:3008
OGRPoint ChildType
Type of child elements.
Definition: ogr_geometry.h:1512
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:952
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:3738
OGRSimpleCurve * toSimpleCurve()
Down-cast to OGRSimpleCurve*.
Definition: ogr_geometry.h:1336
static OGRPolygon * CastToPolygon(OGRCurvePolygon *poCP)
Convert to polygon.
Definition: ogrcurvepolygon.cpp:826
const OGRPolyhedralSurface * toUpperClass() const
Return pointer of this in upper class.
Definition: ogr_geometry.h:3449
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:2872
const ChildType *const * begin() const
Return begin of iterator.
Definition: ogr_geometry.h:3537
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:2363
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:2702
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:3668
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:2952
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:3846
ChildType ** end()
Return end of iterator.
Definition: ogr_geometry.h:3103
const ChildType *const * begin() const
Return begin of iterator.
Definition: ogr_geometry.h:3685
OGRTriangle * getGeometryRef(int i)
See OGRPolyhedralSurface::getGeometryRef()
Definition: ogr_geometry.h:3430
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:3128
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:2449
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:1517
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:372
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:3600
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:2445
OGRGeometry visitor interface.
Definition: ogr_geometry.h:163
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:3458
ChildType ** end()
Return end of curve iterator.
Definition: ogr_geometry.h:2118
const OGRSimpleCurve * toUpperClass() const
Return pointer of this in upper class.
Definition: ogr_geometry.h:1934
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:1929
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:2481
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:3877
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:2215
OGRPoint * getGeometryRef(int i)
See OGRGeometryCollection::getGeometryRef()
Definition: ogr_geometry.h:3550
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:3596
const ChildType *const * end() const
Return end of iterator.
Definition: ogr_geometry.h:3264
OGRwkbGeometryType
List of well known binary geometry types.
Definition: ogr_core.h:406
ChildType ** end()
Return end of iterator.
Definition: ogr_geometry.h:2945
virtual OGRBoolean Equals(const OGRGeometry *) const override
Returns TRUE if two geometries are equivalent.
Definition: ogrcurvepolygon.cpp:636
OGRMultiCurve & operator=(const OGRMultiCurve &other)
Assignment operator.
Definition: ogrmulticurve.cpp:83
ChildType ** begin()
Return begin of iterator.
Definition: ogr_geometry.h:3402
const ChildType *const * begin() const
Return begin of iterator.
Definition: ogr_geometry.h:3110
const ChildType *const * begin() const
Return begin of iterator.
Definition: ogr_geometry.h:2546
#define CPL_WARN_UNUSED_RESULT
Qualifier to warn when the return value of a function is not used.
Definition: cpl_port.h:985
Triangle class.
Definition: ogr_geometry.h:2667
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:3886
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:3259
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:3419
ChildType ** begin()
Return begin of iterator.
Definition: ogr_geometry.h:2534
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:901
ChildType ** end()
Return end of sub-geometry iterator.
Definition: ogr_geometry.h:2779
virtual size_t WkbSize() const override
Returns size of related binary representation.
Definition: ogrcurvepolygon.cpp:441
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:2774
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:782
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:2130
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:4053
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:3327
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:2360
virtual double get_Length() const override
Returns the length of the curve.
Definition: ogrlinestring.cpp:1908
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:3591
virtual void segmentize(double dfMaxLength) override
Modify the geometry such it has no segment longer then the given distance.
Definition: ogrcurvepolygon.cpp:723
struct GEOSContextHandle_HS * GEOSContextHandle_t
GEOS context handle type.
Definition: ogr_geometry.h:126
ChildType ** end()
Return end of iterator.
Definition: ogr_geometry.h:2539
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:3154
Concrete representation of a closed ring.
Definition: ogr_geometry.h:1767
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:2712
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:1950
ChildType ** begin()
Return begin of curve iterator.
Definition: ogr_geometry.h:2346
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:3703
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:3752
OGRPolygon ChildType
Type of child elements.
Definition: ogr_geometry.h:3242
ChildType ** begin()
Return begin of iterator.
Definition: ogr_geometry.h:3525
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:522
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:3435
const ChildType *const * end() const
Return end of iterator.
Definition: ogr_geometry.h:2957
const OGRSimpleCurve * toUpperClass() const
Return pointer of this in upper class.
Definition: ogr_geometry.h:1725
virtual void setMeasured(OGRBoolean bIsMeasured) override
Add or remove the M coordinate dimension.
Definition: ogrcurvepolygon.cpp:696
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:2613
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition: ogr_geometry.h:1730
Concrete class representing polygons.
Definition: ogr_geometry.h:2499
TriangulatedSurface class.
Definition: ogr_geometry.h:3378
Concrete class representing curve polygons.
Definition: ogr_geometry.h:2305
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:3326
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:2358
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:3555
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:2786
OGRMultiLineString * toMultiLineString()
Down-cast to OGRMultiLineString*.
Definition: ogr_geometry.h:859
OGRLineString & operator=(const OGRLineString &other)
Assignment operator.
Definition: ogrlinestring.cpp:2743
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:606
virtual OGRBoolean Within(const OGRGeometry *) const
Test for containment.
Definition: ogrgeometry.cpp:5358
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:1939
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:2608
virtual OGRErr exportToWkb(OGRwkbByteOrder, unsigned char *, OGRwkbVariant=wkbVariantOldOgc) const override
Convert a geometry into well known binary format.
Definition: ogrcurvepolygon.cpp:494
#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:1051
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:785
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:2108
OGRLineString * toUpperClass()
Return pointer of this in upper class.
Definition: ogr_geometry.h:1819
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:738
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:3821
const ChildType *const * end() const
Return end of iterator.
Definition: ogr_geometry.h:3115
OGRGeometry visitor default implementation.
Definition: ogr_geometry.h:210
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition: ogr_geometry.h:1833