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();
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));
402 virtual int getCoordinateDimension()
const;
403 int CoordinateDimension()
const;
412 return (flags & OGR_G_3D) != 0;
417 return (flags & OGR_G_MEASURED) != 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;
462 virtual void dumpReadable(FILE *,
const char * =
nullptr,
463 char **papszOptions =
nullptr)
const;
465 virtual char *exportToGML(
const char *
const *papszOptions =
nullptr)
const;
466 virtual char *exportToKML()
const;
467 virtual char *exportToJson()
const;
479 virtual OGRBoolean hasCurveGeometry(
int bLookForNonLinear = FALSE)
const;
483 double dfMaxAngleStepSizeDegrees = 0,
491 virtual
void closeRings();
493 virtual
void setCoordinateDimension(
int nDimension);
495 virtual
void setMeasured(
OGRBoolean bIsMeasured);
506 virtual void segmentize(
double dfMaxLength);
523 virtual
double Distance(const
OGRGeometry *) const;
544 DelaunayTriangulation(
double dfTolerance,
549 virtual
double Distance3D(const
OGRGeometry *poOtherGeom) const;
554 CPL_WARN_DEPRECATED("Non standard method. "
555 "Use Intersects() instead");
557 CPL_WARN_DEPRECATED("Non standard method. "
558 "Use Equals() instead");
560 CPL_WARN_DEPRECATED("Non standard method. "
561 "Use SymDifference() instead");
563 CPL_WARN_DEPRECATED("Non standard method. "
564 "Use Boundary() instead");
569 static
int bGenerate_DB2_V72_BYTE_ORDER;
572 virtual
void swapXY();
603 return cpl::down_cast<OGRPoint *>(
this);
612 return cpl::down_cast<const OGRPoint *>(
this);
622 return cpl::down_cast<OGRCurve *>(
this);
632 return cpl::down_cast<const OGRCurve *>(
this);
642 return cpl::down_cast<OGRSimpleCurve *>(
this);
652 return cpl::down_cast<const OGRSimpleCurve *>(
this);
662 return cpl::down_cast<OGRLineString *>(
this);
672 return cpl::down_cast<const OGRLineString *>(
this);
681 return cpl::down_cast<OGRLinearRing *>(
this);
690 return cpl::down_cast<const OGRLinearRing *>(
this);
700 return cpl::down_cast<OGRCircularString *>(
this);
710 return cpl::down_cast<const OGRCircularString *>(
this);
720 return cpl::down_cast<OGRCompoundCurve *>(
this);
730 return cpl::down_cast<const OGRCompoundCurve *>(
this);
740 return cpl::down_cast<OGRSurface *>(
this);
750 return cpl::down_cast<const OGRSurface *>(
this);
760 return cpl::down_cast<OGRPolygon *>(
this);
770 return cpl::down_cast<const OGRPolygon *>(
this);
779 return cpl::down_cast<OGRTriangle *>(
this);
788 return cpl::down_cast<const OGRTriangle *>(
this);
798 return cpl::down_cast<OGRCurvePolygon *>(
this);
808 return cpl::down_cast<const OGRCurvePolygon *>(
this);
818 return cpl::down_cast<OGRGeometryCollection *>(
this);
828 return cpl::down_cast<const OGRGeometryCollection *>(
this);
838 return cpl::down_cast<OGRMultiPoint *>(
this);
848 return cpl::down_cast<const OGRMultiPoint *>(
this);
858 return cpl::down_cast<OGRMultiLineString *>(
this);
868 return cpl::down_cast<const OGRMultiLineString *>(
this);
878 return cpl::down_cast<OGRMultiPolygon *>(
this);
888 return cpl::down_cast<const OGRMultiPolygon *>(
this);
898 return cpl::down_cast<OGRMultiCurve *>(
this);
908 return cpl::down_cast<const OGRMultiCurve *>(
this);
918 return cpl::down_cast<OGRMultiSurface *>(
this);
928 return cpl::down_cast<const OGRMultiSurface *>(
this);
938 return cpl::down_cast<OGRPolyhedralSurface *>(
this);
948 return cpl::down_cast<const OGRPolyhedralSurface *>(
this);
957 return cpl::down_cast<OGRTriangulatedSurface *>(
this);
966 return cpl::down_cast<const OGRTriangulatedSurface *>(
this);
971struct CPL_DLL OGRGeometryUniquePtrDeleter
980typedef std::unique_ptr<OGRGeometry, OGRGeometryUniquePtrDeleter>
984#define OGR_FORBID_DOWNCAST_TO(name) \
985 inline OGR##name *to##name() = delete; \
986 inline const OGR##name *to##name() const = delete;
988#define OGR_FORBID_DOWNCAST_TO_POINT OGR_FORBID_DOWNCAST_TO(Point)
989#define OGR_FORBID_DOWNCAST_TO_CURVE OGR_FORBID_DOWNCAST_TO(Curve)
990#define OGR_FORBID_DOWNCAST_TO_SIMPLE_CURVE OGR_FORBID_DOWNCAST_TO(SimpleCurve)
991#define OGR_FORBID_DOWNCAST_TO_LINESTRING OGR_FORBID_DOWNCAST_TO(LineString)
992#define OGR_FORBID_DOWNCAST_TO_LINEARRING OGR_FORBID_DOWNCAST_TO(LinearRing)
993#define OGR_FORBID_DOWNCAST_TO_CIRCULARSTRING \
994 OGR_FORBID_DOWNCAST_TO(CircularString)
995#define OGR_FORBID_DOWNCAST_TO_COMPOUNDCURVE \
996 OGR_FORBID_DOWNCAST_TO(CompoundCurve)
997#define OGR_FORBID_DOWNCAST_TO_SURFACE OGR_FORBID_DOWNCAST_TO(Surface)
998#define OGR_FORBID_DOWNCAST_TO_CURVEPOLYGON OGR_FORBID_DOWNCAST_TO(CurvePolygon)
999#define OGR_FORBID_DOWNCAST_TO_POLYGON OGR_FORBID_DOWNCAST_TO(Polygon)
1000#define OGR_FORBID_DOWNCAST_TO_TRIANGLE OGR_FORBID_DOWNCAST_TO(Triangle)
1001#define OGR_FORBID_DOWNCAST_TO_MULTIPOINT OGR_FORBID_DOWNCAST_TO(MultiPoint)
1002#define OGR_FORBID_DOWNCAST_TO_MULTICURVE OGR_FORBID_DOWNCAST_TO(MultiCurve)
1003#define OGR_FORBID_DOWNCAST_TO_MULTILINESTRING \
1004 OGR_FORBID_DOWNCAST_TO(MultiLineString)
1005#define OGR_FORBID_DOWNCAST_TO_MULTISURFACE OGR_FORBID_DOWNCAST_TO(MultiSurface)
1006#define OGR_FORBID_DOWNCAST_TO_MULTIPOLYGON OGR_FORBID_DOWNCAST_TO(MultiPolygon)
1007#define OGR_FORBID_DOWNCAST_TO_GEOMETRYCOLLECTION \
1008 OGR_FORBID_DOWNCAST_TO(GeometryCollection)
1009#define OGR_FORBID_DOWNCAST_TO_POLYHEDRALSURFACE \
1010 OGR_FORBID_DOWNCAST_TO(PolyhedralSurface)
1011#define OGR_FORBID_DOWNCAST_TO_TIN OGR_FORBID_DOWNCAST_TO(TriangulatedSurface)
1013#define OGR_ALLOW_UPCAST_TO(name) \
1014 inline OGR##name *to##name() \
1018 inline const OGR##name *to##name() const \
1023#ifndef SUPPRESS_OGR_ALLOW_CAST_TO_THIS_WARNING
1024#define CAST_TO_THIS_WARNING CPL_WARN_DEPRECATED("Casting to this is useless")
1026#define CAST_TO_THIS_WARNING
1029#define OGR_ALLOW_CAST_TO_THIS(name) \
1030 inline OGR##name *to##name() CAST_TO_THIS_WARNING \
1034 inline const OGR##name *to##name() const CAST_TO_THIS_WARNING \
1039#define OGR_FORBID_DOWNCAST_TO_ALL_CURVES \
1040 OGR_FORBID_DOWNCAST_TO_CURVE \
1041 OGR_FORBID_DOWNCAST_TO_SIMPLE_CURVE \
1042 OGR_FORBID_DOWNCAST_TO_LINESTRING \
1043 OGR_FORBID_DOWNCAST_TO_LINEARRING \
1044 OGR_FORBID_DOWNCAST_TO_CIRCULARSTRING \
1045 OGR_FORBID_DOWNCAST_TO_COMPOUNDCURVE
1047#define OGR_FORBID_DOWNCAST_TO_ALL_SURFACES \
1048 OGR_FORBID_DOWNCAST_TO_SURFACE \
1049 OGR_FORBID_DOWNCAST_TO_CURVEPOLYGON \
1050 OGR_FORBID_DOWNCAST_TO_POLYGON \
1051 OGR_FORBID_DOWNCAST_TO_TRIANGLE \
1052 OGR_FORBID_DOWNCAST_TO_POLYHEDRALSURFACE \
1053 OGR_FORBID_DOWNCAST_TO_TIN
1055#define OGR_FORBID_DOWNCAST_TO_ALL_SINGLES \
1056 OGR_FORBID_DOWNCAST_TO_POINT \
1057 OGR_FORBID_DOWNCAST_TO_ALL_CURVES \
1058 OGR_FORBID_DOWNCAST_TO_ALL_SURFACES
1060#define OGR_FORBID_DOWNCAST_TO_ALL_MULTI \
1061 OGR_FORBID_DOWNCAST_TO_GEOMETRYCOLLECTION \
1062 OGR_FORBID_DOWNCAST_TO_MULTIPOINT \
1063 OGR_FORBID_DOWNCAST_TO_MULTICURVE \
1064 OGR_FORBID_DOWNCAST_TO_MULTILINESTRING \
1065 OGR_FORBID_DOWNCAST_TO_MULTISURFACE \
1066 OGR_FORBID_DOWNCAST_TO_MULTIPOLYGON
1090 OGRPoint(
double x,
double y,
double z);
1091 OGRPoint(
double x,
double y,
double z,
double m);
1093 static OGRPoint *createXYM(
double x,
double y,
double m);
1099 size_t WkbSize()
const override;
1101 size_t &nBytesConsumedOut)
override;
1109 OGRErr importFromWkt(
const char **)
override;
1120 OGRErr *err =
nullptr)
const override;
1123 virtual int getDimension()
const override;
1124 virtual OGRPoint *clone()
const override;
1125 virtual void empty()
override;
1126 virtual void getEnvelope(
OGREnvelope *psEnvelope)
const override;
1127 virtual void getEnvelope(
OGREnvelope3D *psEnvelope)
const override;
1130 return !(flags & OGR_G_NOT_EMPTY_POINT);
1156 virtual void setCoordinateDimension(
int nDimension)
override;
1163 if (std::isnan(x) || std::isnan(y))
1164 flags &= ~OGR_G_NOT_EMPTY_POINT;
1166 flags |= OGR_G_NOT_EMPTY_POINT;
1174 if (std::isnan(x) || std::isnan(y))
1175 flags &= ~OGR_G_NOT_EMPTY_POINT;
1177 flags |= OGR_G_NOT_EMPTY_POINT;
1193 flags |= OGR_G_MEASURED;
1202 virtual const char *getGeometryName()
const override;
1205 virtual void flattenTo2D()
override;
1208 visitor->
visit(
this);
1212 visitor->
visit(
this);
1215 virtual void swapXY()
override;
1217 OGR_ALLOW_CAST_TO_THIS(Point)
1218 OGR_FORBID_DOWNCAST_TO_ALL_CURVES
1219 OGR_FORBID_DOWNCAST_TO_ALL_SURFACES
1220 OGR_FORBID_DOWNCAST_TO_ALL_MULTI
1258 virtual OGRCurveCasterToLineString GetCasterToLineString()
const = 0;
1259 virtual OGRCurveCasterToLinearRing GetCasterToLinearRing()
const = 0;
1264 virtual int ContainsPoint(
const OGRPoint *p)
const;
1265 virtual int IntersectsPoint(
const OGRPoint *p)
const;
1269 class CPL_DLL ConstIterator
1272 std::unique_ptr<Private> m_poPrivate;
1275 ConstIterator(
const OGRCurve *poSelf,
bool bStart);
1276 ConstIterator(ConstIterator &&oOther)
noexcept;
1277 ConstIterator &operator=(ConstIterator &&oOther);
1280 ConstIterator &operator++();
1281 bool operator!=(
const ConstIterator &it)
const;
1285 friend inline ConstIterator
end(
const OGRCurve *);
1305 ConstIterator
begin()
const;
1307 ConstIterator
end()
const;
1316 virtual int get_IsClosed()
const;
1320 const char *
const *papszOptions =
nullptr)
const = 0;
1321 virtual int getDimension()
const override;
1328 virtual int isClockwise()
const;
1335 return cpl::down_cast<OGRSimpleCurve *>(
this);
1343 return cpl::down_cast<const OGRSimpleCurve *>(
this);
1350 OGR_FORBID_DOWNCAST_TO_POINT
1351 OGR_ALLOW_CAST_TO_THIS(Curve)
1352 OGR_FORBID_DOWNCAST_TO_ALL_SURFACES
1353 OGR_FORBID_DOWNCAST_TO_ALL_MULTI
1358inline OGRCurve::ConstIterator
begin(
const OGRCurve *poCurve)
1360 return poCurve->begin();
1363inline OGRCurve::ConstIterator
end(
const OGRCurve *poCurve)
1365 return poCurve->end();
1410 void setX(
double xIn);
1414 void setY(
double yIn);
1418 void setZ(
double zIn);
1422 void setM(
double mIn);
1454 OGRErr importFromWKTListOnly(
const char **ppszInput,
int bHasZ,
int bHasM,
1459 virtual double get_LinearArea()
const;
1465 class CPL_DLL Iterator
1468 std::unique_ptr<Private> m_poPrivate;
1473 Iterator(Iterator &&oOther)
noexcept;
1477 Iterator &operator++();
1478 bool operator!=(
const Iterator &it)
const;
1484 class CPL_DLL ConstIterator
1487 std::unique_ptr<Private> m_poPrivate;
1492 ConstIterator &&oOther)
noexcept;
1496 ConstIterator &operator++();
1497 bool operator!=(
const ConstIterator &it)
const;
1530 ConstIterator
begin()
const;
1532 ConstIterator
end()
const;
1535 virtual size_t WkbSize()
const override;
1537 size_t &nBytesConsumedOut)
override;
1545 OGRErr importFromWkt(
const char **)
override;
1556 OGRErr *err =
nullptr)
const override;
1559 virtual void empty()
override;
1560 virtual void getEnvelope(
OGREnvelope *psEnvelope)
const override;
1561 virtual void getEnvelope(
OGREnvelope3D *psEnvelope)
const override;
1566 virtual double get_Length()
const override;
1567 virtual void StartPoint(
OGRPoint *)
const override;
1568 virtual void EndPoint(
OGRPoint *)
const override;
1569 virtual void Value(
double,
OGRPoint *)
const override;
1570 virtual double Project(
const OGRPoint *)
const;
1571 virtual OGRLineString *getSubLine(
double,
double,
int)
const;
1578 void getPoint(
int,
OGRPoint *)
const;
1581 return paoPoints[i].
x;
1585 return paoPoints[i].
y;
1587 double getZ(
int i)
const;
1588 double getM(
int i)
const;
1594 virtual void setCoordinateDimension(
int nDimension)
override;
1595 virtual void set3D(
OGRBoolean bIs3D)
override;
1596 virtual void setMeasured(
OGRBoolean bIsMeasured)
override;
1597 void setNumPoints(
int nNewPointCount,
int bZeroizeNewContent = TRUE);
1599 void setPoint(
int,
double,
double);
1600 void setZ(
int,
double);
1601 void setM(
int,
double);
1602 void setPoint(
int,
double,
double,
double);
1603 void setPointM(
int,
double,
double,
double);
1604 void setPoint(
int,
double,
double,
double,
double);
1605 void setPoints(
int,
const OGRRawPoint *,
const double * =
nullptr);
1606 void setPointsM(
int,
const OGRRawPoint *,
const double *);
1607 void setPoints(
int,
const OGRRawPoint *,
const double *,
const double *);
1608 void setPoints(
int,
const double *padfX,
const double *padfY,
1609 const double *padfZIn =
nullptr);
1610 void setPointsM(
int,
const double *padfX,
const double *padfY,
1611 const double *padfMIn =
nullptr);
1612 void setPoints(
int,
const double *padfX,
const double *padfY,
1613 const double *padfZIn,
const double *padfMIn);
1615 void addPoint(
double,
double);
1616 void addPoint(
double,
double,
double);
1617 void addPointM(
double,
double,
double);
1618 void addPoint(
double,
double,
double,
double);
1620 bool removePoint(
int);
1622 void getPoints(
OGRRawPoint *,
double * =
nullptr)
const;
1623 void getPoints(
void *pabyX,
int nXStride,
void *pabyY,
int nYStride,
1624 void *pabyZ =
nullptr,
int nZStride = 0,
1625 void *pabyM =
nullptr,
int nMStride = 0)
const;
1627 void addSubLineString(
const OGRLineString *,
int nStartVertex = 0,
1628 int nEndVertex = -1);
1629 void reversePoints(
void);
1634 virtual void flattenTo2D()
override;
1635 virtual void segmentize(
double dfMaxLength)
override;
1637 virtual void swapXY()
override;
1639 OGR_ALLOW_UPCAST_TO(Curve)
1640 OGR_ALLOW_CAST_TO_THIS(SimpleCurve)
1647 return poCurve->begin();
1652 return poCurve->end();
1658 return poCurve->begin();
1663 return poCurve->end();
1688 virtual OGRCurveCasterToLineString GetCasterToLineString()
const override;
1689 virtual OGRCurveCasterToLinearRing GetCasterToLinearRing()
const override;
1691 virtual double get_AreaOfCurveSegments()
const override;
1705 CurveToLine(
double dfMaxAngleStepSizeDegrees = 0,
1706 const char *
const *papszOptions =
nullptr)
const override;
1708 getCurveGeometry(
const char *
const *papszOptions =
nullptr)
const override;
1713 virtual const char *getGeometryName()
const override;
1729 visitor->
visit(
this);
1733 visitor->
visit(
this);
1736 OGR_ALLOW_UPCAST_TO(SimpleCurve)
1737 OGR_ALLOW_CAST_TO_THIS(LineString)
1771 virtual size_t WkbSize()
const override;
1773 size_t &nBytesConsumedOut)
override;
1783 virtual size_t _WkbSize(
int _flags)
const;
1785 const unsigned char *,
size_t,
1786 size_t &nBytesConsumedOut);
1788 unsigned char *)
const;
1790 virtual OGRCurveCasterToLineString GetCasterToLineString()
const override;
1791 virtual OGRCurveCasterToLinearRing GetCasterToLinearRing()
const override;
1805 virtual const char *getGeometryName()
const override;
1807 virtual void reverseWindingOrder();
1808 virtual void closeRings()
override;
1810 int bTestEnvelope = TRUE)
const;
1812 int bTestEnvelope = TRUE)
const;
1828 visitor->
visit(
this);
1832 visitor->
visit(
this);
1835 OGR_ALLOW_UPCAST_TO(LineString)
1836 OGR_ALLOW_CAST_TO_THIS(LinearRing)
1858 void ExtendEnvelopeWithCircular(
OGREnvelope *psEnvelope)
const;
1860 int IsFullCircle(
double &cx,
double &cy,
double &square_R)
const;
1864 virtual OGRCurveCasterToLineString GetCasterToLineString()
const override;
1865 virtual OGRCurveCasterToLinearRing GetCasterToLinearRing()
const override;
1866 virtual int IntersectsPoint(
const OGRPoint *p)
const override;
1867 virtual int ContainsPoint(
const OGRPoint *p)
const override;
1868 virtual double get_AreaOfCurveSegments()
const override;
1880 size_t &nBytesConsumedOut)
override;
1888 OGRErr importFromWkt(
const char **)
override;
1899 OGRErr *err =
nullptr)
const override;
1903 virtual void getEnvelope(
OGREnvelope *psEnvelope)
const override;
1904 virtual void getEnvelope(
OGREnvelope3D *psEnvelope)
const override;
1908 virtual double get_Length()
const override;
1910 CurveToLine(
double dfMaxAngleStepSizeDegrees = 0,
1911 const char *
const *papszOptions =
nullptr)
const override;
1912 virtual void Value(
double,
OGRPoint *)
const override;
1913 virtual double get_Area()
const override;
1917 virtual const char *getGeometryName()
const override;
1918 virtual void segmentize(
double dfMaxLength)
override;
1920 hasCurveGeometry(
int bLookForNonLinear = FALSE)
const override;
1922 getLinearGeometry(
double dfMaxAngleStepSizeDegrees = 0,
1923 const char *
const *papszOptions =
nullptr)
const override;
1938 visitor->
visit(
this);
1942 visitor->
visit(
this);
1945 OGR_ALLOW_UPCAST_TO(SimpleCurve)
1946 OGR_ALLOW_CAST_TO_THIS(CircularString)
1964class CPL_DLL OGRCurveCollection
1972 int nCurveCount = 0;
1976 OGRCurveCollection();
1977 OGRCurveCollection(
const OGRCurveCollection &other);
1978 ~OGRCurveCollection();
1980 OGRCurveCollection &operator=(
const OGRCurveCollection &other);
1995 return papoCurves + nCurveCount;
2007 return papoCurves + nCurveCount;
2017 size_t WkbSize()
const;
2019 const unsigned char *pabyData,
size_t &nSize,
2020 size_t &nDataOffset,
2022 size_t nMinSubGeomSize,
2025 importBodyFromWkb(
OGRGeometry *poGeom,
const unsigned char *pabyData,
2026 size_t nSize,
bool bAcceptCompoundCurve,
2034 OGRBoolean Equals(
const OGRCurveCollection *poOCC)
const;
2035 void setCoordinateDimension(
OGRGeometry *poGeom,
int nNewDimension);
2039 int getNumCurves()
const;
2041 const OGRCurve *getCurve(
int)
const;
2044 OGRErr removeCurve(
int iIndex,
bool bDelete =
true);
2048 void segmentize(
double dfMaxLength);
2050 OGRBoolean hasCurveGeometry(
int bLookForNonLinear)
const;
2071 OGRCurveCollection oCC{};
2073 OGRErr addCurveDirectlyInternal(
OGRCurve *poCurve,
double dfToleranceEps,
2079 OGRLineString *CurveToLineInternal(
double dfMaxAngleStepSizeDegrees,
2080 const char *
const *papszOptions,
2081 int bIsLinearRing)
const;
2092 virtual OGRCurveCasterToLineString GetCasterToLineString()
const override;
2093 virtual OGRCurveCasterToLinearRing GetCasterToLinearRing()
const override;
2132 virtual size_t WkbSize()
const override;
2134 size_t &nBytesConsumedOut)
override;
2142 OGRErr importFromWkt(
const char **)
override;
2153 OGRErr *err =
nullptr)
const override;
2157 virtual void empty()
override;
2158 virtual void getEnvelope(
OGREnvelope *psEnvelope)
const override;
2159 virtual void getEnvelope(
OGREnvelope3D *psEnvelope)
const override;
2163 virtual double get_Length()
const override;
2164 virtual void StartPoint(
OGRPoint *)
const override;
2165 virtual void EndPoint(
OGRPoint *)
const override;
2166 virtual void Value(
double,
OGRPoint *)
const override;
2168 CurveToLine(
double dfMaxAngleStepSizeDegrees = 0,
2169 const char *
const *papszOptions =
nullptr)
const override;
2171 virtual int getNumPoints()
const override;
2172 virtual double get_AreaOfCurveSegments()
const override;
2173 virtual double get_Area()
const override;
2179 int getNumCurves()
const;
2181 const OGRCurve *getCurve(
int)
const;
2184 virtual void setCoordinateDimension(
int nDimension)
override;
2185 virtual void set3D(
OGRBoolean bIs3D)
override;
2186 virtual void setMeasured(
OGRBoolean bIsMeasured)
override;
2190 OGRErr addCurve(
const OGRCurve *,
double dfToleranceEps = 1e-14);
2191 OGRErr addCurveDirectly(
OGRCurve *,
double dfToleranceEps = 1e-14);
2197 virtual const char *getGeometryName()
const override;
2199 virtual void flattenTo2D()
override;
2200 virtual void segmentize(
double dfMaxLength)
override;
2202 hasCurveGeometry(
int bLookForNonLinear = FALSE)
const override;
2204 getLinearGeometry(
double dfMaxAngleStepSizeDegrees = 0,
2205 const char *
const *papszOptions =
nullptr)
const override;
2208 visitor->
visit(
this);
2212 visitor->
visit(
this);
2215 virtual void swapXY()
override;
2217 OGR_ALLOW_UPCAST_TO(Curve)
2218 OGR_ALLOW_CAST_TO_THIS(CompoundCurve)
2226 return poCurve->
begin();
2232 return poCurve->
end();
2238 return poCurve->
begin();
2243 return poCurve->
end();
2260 virtual OGRSurfaceCasterToPolygon GetCasterToPolygon()
const = 0;
2261 virtual OGRSurfaceCasterToCurvePolygon GetCasterToCurvePolygon()
const = 0;
2268 return PointOnSurfaceInternal(poPoint);
2277 OGR_FORBID_DOWNCAST_TO_POINT
2278 OGR_FORBID_DOWNCAST_TO_ALL_CURVES
2279 OGR_ALLOW_CAST_TO_THIS(Surface)
2280 OGR_FORBID_DOWNCAST_TO_ALL_MULTI
2307 virtual int checkRing(
OGRCurve *poNewRing)
const;
2308 OGRErr addRingDirectlyInternal(
OGRCurve *poCurve,
int bNeedRealloc);
2318 OGRCurveCollection oCC{};
2320 virtual OGRSurfaceCasterToPolygon GetCasterToPolygon()
const override;
2321 virtual OGRSurfaceCasterToCurvePolygon
2322 GetCasterToCurvePolygon()
const override;
2364 virtual const char *getGeometryName()
const override;
2367 virtual void empty()
override;
2369 virtual void flattenTo2D()
override;
2371 virtual void segmentize(
double dfMaxLength)
override;
2373 hasCurveGeometry(
int bLookForNonLinear = FALSE)
const override;
2375 getLinearGeometry(
double dfMaxAngleStepSizeDegrees = 0,
2376 const char *
const *papszOptions =
nullptr)
const override;
2379 virtual double get_Area()
const override;
2382 virtual size_t WkbSize()
const override;
2384 size_t &nBytesConsumedOut)
override;
2392 OGRErr importFromWkt(
const char **)
override;
2403 OGRErr *err =
nullptr)
const override;
2406 virtual int getDimension()
const override;
2407 virtual void getEnvelope(
OGREnvelope *psEnvelope)
const override;
2408 virtual void getEnvelope(
OGREnvelope3D *psEnvelope)
const override;
2412 CurvePolyToPoly(
double dfMaxAngleStepSizeDegrees = 0,
2413 const char *
const *papszOptions =
nullptr)
const;
2421 virtual void setCoordinateDimension(
int nDimension)
override;
2422 virtual void set3D(
OGRBoolean bIs3D)
override;
2423 virtual void setMeasured(
OGRBoolean bIsMeasured)
override;
2431 const OGRCurve *getExteriorRingCurve()
const;
2432 int getNumInteriorRings()
const;
2433 OGRCurve *getInteriorRingCurve(
int);
2434 const OGRCurve *getInteriorRingCurve(
int)
const;
2436 OGRCurve *stealExteriorRingCurve();
2438 OGRErr removeRing(
int iIndex,
bool bDelete =
true);
2441 visitor->
visit(
this);
2445 visitor->
visit(
this);
2448 virtual void swapXY()
override;
2450 OGR_ALLOW_UPCAST_TO(Surface)
2451 OGR_ALLOW_CAST_TO_THIS(CurvePolygon)
2459 return poGeom->
begin();
2465 return poGeom->
end();
2471 return poGeom->
begin();
2476 return poGeom->
end();
2503 virtual int checkRing(
OGRCurve *poNewRing)
const override;
2504 virtual OGRErr importFromWKTListOnly(
const char **ppszInput,
int bHasZ,
2506 int &nMaxPoints,
double *&padfZ);
2510 virtual OGRSurfaceCasterToPolygon GetCasterToPolygon()
const override;
2511 virtual OGRSurfaceCasterToCurvePolygon
2512 GetCasterToCurvePolygon()
const override;
2530 return reinterpret_cast<ChildType **
>(oCC.begin());
2535 return reinterpret_cast<ChildType **
>(oCC.end());
2542 return reinterpret_cast<const ChildType *
const *
>(oCC.begin());
2547 return reinterpret_cast<const ChildType *
const *
>(oCC.end());
2551 virtual const char *getGeometryName()
const override;
2555 hasCurveGeometry(
int bLookForNonLinear = FALSE)
const override;
2557 getCurveGeometry(
const char *
const *papszOptions =
nullptr)
const override;
2559 getLinearGeometry(
double dfMaxAngleStepSizeDegrees = 0,
2560 const char *
const *papszOptions =
nullptr)
const override;
2563 virtual size_t WkbSize()
const override;
2565 size_t &nBytesConsumedOut)
override;
2573 OGRErr importFromWkt(
const char **)
override;
2584 OGRErr *err =
nullptr)
const override;
2588 CurvePolyToPoly(
double dfMaxAngleStepSizeDegrees = 0,
2589 const char *
const *papszOptions =
nullptr)
const override;
2614 visitor->
visit(
this);
2618 visitor->
visit(
this);
2621 virtual void closeRings()
override;
2623 OGR_ALLOW_UPCAST_TO(CurvePolygon)
2624 OGR_ALLOW_CAST_TO_THIS(Polygon)
2631 return poGeom->
begin();
2636 return poGeom->
end();
2642 return poGeom->
begin();
2647 return poGeom->
end();
2666 bool quickValidityCheck()
const;
2670 virtual OGRSurfaceCasterToPolygon GetCasterToPolygon()
const override;
2671 virtual OGRErr importFromWKTListOnly(
const char **ppszInput,
int bHasZ,
2674 double *&padfZ)
override;
2684 virtual const char *getGeometryName()
const override;
2690 size_t &nBytesConsumedOut)
override;
2708 visitor->
visit(
this);
2712 visitor->
visit(
this);
2719 OGR_ALLOW_UPCAST_TO(Polygon)
2720 OGR_ALLOW_CAST_TO_THIS(Triangle)
2736 OGRErr importFromWkbInternal(
const unsigned char *pabyData,
size_t nSize,
2738 size_t &nBytesConsumedOut);
2739 OGRErr importFromWktInternal(
const char **ppszInput,
int nRecLevel);
2748 const std::string &exclude = std::string())
const;
2775 return papoGeoms + nGeomCount;
2787 return papoGeoms + nGeomCount;
2791 virtual const char *getGeometryName()
const override;
2794 virtual void empty()
override;
2796 virtual void flattenTo2D()
override;
2798 virtual void segmentize(
double dfMaxLength)
override;
2800 hasCurveGeometry(
int bLookForNonLinear = FALSE)
const override;
2802 getCurveGeometry(
const char *
const *papszOptions =
nullptr)
const override;
2804 getLinearGeometry(
double dfMaxAngleStepSizeDegrees = 0,
2805 const char *
const *papszOptions =
nullptr)
const override;
2808 virtual size_t WkbSize()
const override;
2810 size_t &nBytesConsumedOut)
override;
2818 OGRErr importFromWkt(
const char **)
override;
2829 OGRErr *err =
nullptr)
const override;
2831 virtual double get_Length()
const;
2832 virtual double get_Area()
const;
2835 virtual int getDimension()
const override;
2836 virtual void getEnvelope(
OGREnvelope *psEnvelope)
const override;
2837 virtual void getEnvelope(
OGREnvelope3D *psEnvelope)
const override;
2840 int getNumGeometries()
const;
2848 virtual void setCoordinateDimension(
int nDimension)
override;
2849 virtual void set3D(
OGRBoolean bIs3D)
override;
2850 virtual void setMeasured(
OGRBoolean bIsMeasured)
override;
2853 virtual OGRErr removeGeometry(
int iIndex,
int bDelete = TRUE);
2857 void closeRings()
override;
2859 virtual void swapXY()
override;
2863 visitor->
visit(
this);
2867 visitor->
visit(
this);
2873 OGR_FORBID_DOWNCAST_TO_POINT
2874 OGR_FORBID_DOWNCAST_TO_ALL_CURVES
2875 OGR_FORBID_DOWNCAST_TO_ALL_SURFACES
2876 OGR_ALLOW_CAST_TO_THIS(GeometryCollection)
2884 return poGeom->
begin();
2890 return poGeom->
end();
2896 return poGeom->
begin();
2901 return poGeom->
end();
2935 return reinterpret_cast<ChildType **
>(papoGeoms);
2940 return reinterpret_cast<ChildType **
>(papoGeoms + nGeomCount);
2947 return reinterpret_cast<const ChildType *
const *
>(papoGeoms);
2952 return reinterpret_cast<const ChildType *
const *
>(papoGeoms +
2957 virtual const char *getGeometryName()
const override;
2965 OGRErr importFromWkt(
const char **)
override;
2976 OGRErr *err =
nullptr)
const override;
2982 virtual int getDimension()
const override;
2998 hasCurveGeometry(
int bLookForNonLinear = FALSE)
const override;
3013 visitor->
visit(
this);
3017 visitor->
visit(
this);
3022 OGR_ALLOW_CAST_TO_THIS(MultiSurface)
3023 OGR_ALLOW_UPCAST_TO(GeometryCollection)
3024 OGR_FORBID_DOWNCAST_TO_MULTIPOINT
3025 OGR_FORBID_DOWNCAST_TO_MULTILINESTRING
3026 OGR_FORBID_DOWNCAST_TO_MULTICURVE
3034 return poGeom->
begin();
3040 return poGeom->
end();
3046 return poGeom->
begin();
3051 return poGeom->
end();
3072 OGRErr _addGeometryWithExpectedSubGeometryType(
3074 OGRErr _addGeometryDirectlyWithExpectedSubGeometryType(
3093 return reinterpret_cast<ChildType **
>(papoGeoms);
3098 return reinterpret_cast<ChildType **
>(papoGeoms + nGeomCount);
3105 return reinterpret_cast<const ChildType *
const *
>(papoGeoms);
3110 return reinterpret_cast<const ChildType *
const *
>(papoGeoms +
3127 virtual const char *getGeometryName()
const override;
3140 OGRErr *err =
nullptr)
const override;
3144 hasCurveGeometry(
int bLookForNonLinear = FALSE)
const override;
3159 visitor->
visit(
this);
3163 visitor->
visit(
this);
3168 OGR_ALLOW_CAST_TO_THIS(MultiPolygon)
3169 OGR_ALLOW_UPCAST_TO(MultiSurface)
3177 return poGeom->
begin();
3183 return poGeom->
end();
3189 return poGeom->
begin();
3194 return poGeom->
end();
3214 virtual OGRSurfaceCasterToPolygon GetCasterToPolygon()
const override;
3215 virtual OGRSurfaceCasterToCurvePolygon
3216 GetCasterToCurvePolygon()
const override;
3218 virtual const char *getSubGeometryName()
const;
3223 virtual OGRPolyhedralSurfaceCastToMultiPolygon
3224 GetCasterToMultiPolygon()
const;
3263 virtual size_t WkbSize()
const override;
3264 virtual const char *getGeometryName()
const override;
3267 size_t &nBytesConsumedOut)
override;
3275 OGRErr importFromWkt(
const char **)
override;
3286 OGRErr *err =
nullptr)
const override;
3289 virtual int getDimension()
const override;
3291 virtual void empty()
override;
3294 virtual void getEnvelope(
OGREnvelope *psEnvelope)
const override;
3295 virtual void getEnvelope(
OGREnvelope3D *psEnvelope)
const override;
3297 virtual void flattenTo2D()
override;
3300 virtual double get_Area()
const override;
3305 hasCurveGeometry(
int bLookForNonLinear = FALSE)
const override;
3308 int getNumGeometries()
const;
3310 const OGRPolygon *getGeometryRef(
int i)
const;
3313 virtual void setCoordinateDimension(
int nDimension)
override;
3314 virtual void set3D(
OGRBoolean bIs3D)
override;
3315 virtual void setMeasured(
OGRBoolean bIsMeasured)
override;
3316 virtual void swapXY()
override;
3317 OGRErr removeGeometry(
int iIndex,
int bDelete = TRUE);
3321 visitor->
visit(
this);
3325 visitor->
visit(
this);
3330 OGR_ALLOW_CAST_TO_THIS(PolyhedralSurface)
3331 OGR_ALLOW_UPCAST_TO(Surface)
3339 return poGeom->
begin();
3345 return poGeom->
end();
3351 return poGeom->
begin();
3356 return poGeom->
end();
3375 virtual const char *getSubGeometryName()
const override;
3378 virtual OGRPolyhedralSurfaceCastToMultiPolygon
3379 GetCasterToMultiPolygon()
const override;
3396 return reinterpret_cast<ChildType **
>(oMP.begin());
3401 return reinterpret_cast<ChildType **
>(oMP.end());
3408 return reinterpret_cast<const ChildType *
const *
>(oMP.begin());
3413 return reinterpret_cast<const ChildType *
const *
>(oMP.end());
3417 virtual const char *getGeometryName()
const override;
3448 visitor->
visit(
this);
3452 visitor->
visit(
this);
3458 OGR_ALLOW_CAST_TO_THIS(TriangulatedSurface)
3459 OGR_ALLOW_UPCAST_TO(PolyhedralSurface)
3467 return poGeom->
begin();
3473 return poGeom->
end();
3479 return poGeom->
begin();
3484 return poGeom->
end();
3499 OGRErr importFromWkt_Bracketed(
const char **,
int bHasM,
int bHasZ);
3519 return reinterpret_cast<ChildType **
>(papoGeoms);
3524 return reinterpret_cast<ChildType **
>(papoGeoms + nGeomCount);
3531 return reinterpret_cast<const ChildType *
const *
>(papoGeoms);
3536 return reinterpret_cast<const ChildType *
const *
>(papoGeoms +
3553 virtual const char *getGeometryName()
const override;
3561 OGRErr importFromWkt(
const char **)
override;
3572 OGRErr *err =
nullptr)
const override;
3575 virtual int getDimension()
const override;
3590 visitor->
visit(
this);
3594 visitor->
visit(
this);
3599 hasCurveGeometry(
int bLookForNonLinear = FALSE)
const override;
3601 OGR_ALLOW_CAST_TO_THIS(MultiPoint)
3602 OGR_ALLOW_UPCAST_TO(GeometryCollection)
3603 OGR_FORBID_DOWNCAST_TO_MULTILINESTRING
3604 OGR_FORBID_DOWNCAST_TO_MULTICURVE
3605 OGR_FORBID_DOWNCAST_TO_MULTISURFACE
3606 OGR_FORBID_DOWNCAST_TO_MULTIPOLYGON
3613 return poGeom->
begin();
3618 return poGeom->
end();
3624 return poGeom->
begin();
3629 return poGeom->
end();
3667 return reinterpret_cast<ChildType **
>(papoGeoms);
3672 return reinterpret_cast<ChildType **
>(papoGeoms + nGeomCount);
3679 return reinterpret_cast<const ChildType *
const *
>(papoGeoms);
3684 return reinterpret_cast<const ChildType *
const *
>(papoGeoms +
3701 virtual const char *getGeometryName()
const override;
3709 OGRErr importFromWkt(
const char **)
override;
3720 OGRErr *err =
nullptr)
const override;
3723 virtual int getDimension()
const override;
3727 hasCurveGeometry(
int bLookForNonLinear = FALSE)
const override;
3742 visitor->
visit(
this);
3746 visitor->
visit(
this);
3751 OGR_ALLOW_CAST_TO_THIS(MultiCurve)
3752 OGR_ALLOW_UPCAST_TO(GeometryCollection)
3753 OGR_FORBID_DOWNCAST_TO_MULTIPOINT
3754 OGR_FORBID_DOWNCAST_TO_MULTISURFACE
3755 OGR_FORBID_DOWNCAST_TO_MULTIPOLYGON
3762 return poGeom->
begin();
3767 return poGeom->
end();
3773 return poGeom->
begin();
3778 return poGeom->
end();
3810 return reinterpret_cast<ChildType **
>(papoGeoms);
3815 return reinterpret_cast<ChildType **
>(papoGeoms + nGeomCount);
3822 return reinterpret_cast<const ChildType *
const *
>(papoGeoms);
3827 return reinterpret_cast<const ChildType *
const *
>(papoGeoms +
3844 virtual const char *getGeometryName()
const override;
3857 OGRErr *err =
nullptr)
const override;
3861 hasCurveGeometry(
int bLookForNonLinear = FALSE)
const override;
3876 visitor->
visit(
this);
3880 visitor->
visit(
this);
3885 OGR_ALLOW_CAST_TO_THIS(MultiLineString)
3886 OGR_ALLOW_UPCAST_TO(MultiCurve)
3887 OGR_FORBID_DOWNCAST_TO_MULTIPOINT
3888 OGR_FORBID_DOWNCAST_TO_MULTISURFACE
3889 OGR_FORBID_DOWNCAST_TO_MULTIPOLYGON
3897 return poGeom->
begin();
3903 return poGeom->
end();
3909 return poGeom->
begin();
3914 return poGeom->
end();
3928 static OGRErr createFromFgfInternal(
const unsigned char *pabyData,
3931 int *pnBytesConsumed,
int nRecLevel);
3936 size_t =
static_cast<size_t>(-1),
3941 size_t &nBytesConsumedOut);
3951 CPL_WARN_DEPRECATED(
"Use createFromWkt(const char**, ...) instead")
3953 return createFromWkt(
const_cast<const char **
>(ppszInput), poSRS,
3961 static OGRGeometry *createFromGeoJson(
const char *,
int = -1);
3969 bool bOnlyInOrder =
true);
3976 const char *
const *papszOptions =
nullptr);
3982 int *pbResultValidGeometry,
3983 const char **papszOptions =
nullptr);
3984 static bool haveGEOS();
3991 std::unique_ptr<Private> d;
4000 char **papszOptions,
4004 approximateArcAngles(
double dfX,
double dfY,
double dfZ,
4005 double dfPrimaryRadius,
double dfSecondaryAxis,
4006 double dfRotation,
double dfStartAngle,
4007 double dfEndAngle,
double dfMaxAngleStepSizeDegrees,
4008 const bool bUseMaxGap =
false);
4010 static int GetCurveParameters(
double x0,
double y0,
double x1,
double y1,
4011 double x2,
double y2,
double &R,
double &cx,
4012 double &cy,
double &alpha0,
double &alpha1,
4015 curveToLineString(
double x0,
double y0,
double z0,
double x1,
double y1,
4016 double z1,
double x2,
double y2,
double z2,
int bHasZ,
4017 double dfMaxAngleStepSizeDegrees,
4018 const char *
const *papszOptions =
nullptr);
4021 const char *
const *papszOptions =
nullptr);
4028typedef struct _OGRPreparedGeometry OGRPreparedGeometry;
4030struct CPL_DLL OGRPreparedGeometryUniquePtrDeleter
4032 void operator()(OGRPreparedGeometry *)
const;
4039typedef std::unique_ptr<OGRPreparedGeometry,
4040 OGRPreparedGeometryUniquePtrDeleter>
The CPLJSONArray class holds JSON object from CPLJSONDocument.
Definition cpl_json.h:54
OGRGeometry visitor interface.
Definition ogr_geometry.h:239
virtual void visit(const OGRCurvePolygon *)=0
Visit OGRCurvePolygon.
virtual void visit(const OGRPolyhedralSurface *)=0
Visit OGRPolyhedralSurface.
virtual void visit(const OGRCompoundCurve *)=0
Visit OGRCompoundCurve.
virtual void visit(const OGRMultiLineString *)=0
Visit OGRMultiLineString.
virtual void visit(const OGRTriangulatedSurface *)=0
Visit OGRTriangulatedSurface.
virtual void visit(const OGRPolygon *)=0
Visit OGRPolygon.
virtual void visit(const OGRMultiPolygon *)=0
Visit OGRMultiPolygon.
virtual void visit(const OGRTriangle *)=0
Visit OGRTriangle.
virtual void visit(const OGRLineString *)=0
Visit OGRLineString.
virtual void visit(const OGRMultiPoint *)=0
Visit OGRMultiPoint.
virtual void visit(const OGRMultiCurve *)=0
Visit OGRMultiCurve.
virtual void visit(const OGRGeometryCollection *)=0
Visit OGRGeometryCollection.
virtual void visit(const OGRPoint *)=0
Visit OGRPoint.
virtual ~IOGRConstGeometryVisitor()=default
Destructor/.
virtual void visit(const OGRMultiSurface *)=0
Visit OGRMultiSurface.
virtual void visit(const OGRLinearRing *)=0
Visit OGRLinearRing.
virtual void visit(const OGRCircularString *)=0
Visit OGRCircularString.
OGRGeometry visitor interface.
Definition ogr_geometry.h:164
virtual void visit(OGRMultiSurface *)=0
Visit OGRMultiSurface.
virtual void visit(OGRLinearRing *)=0
Visit OGRLinearRing.
virtual void visit(OGRTriangle *)=0
Visit OGRTriangle.
virtual void visit(OGRCircularString *)=0
Visit OGRCircularString.
virtual void visit(OGRPolygon *)=0
Visit OGRPolygon.
virtual void visit(OGRLineString *)=0
Visit OGRLineString.
virtual void visit(OGRCompoundCurve *)=0
Visit OGRCompoundCurve.
virtual void visit(OGRTriangulatedSurface *)=0
Visit OGRTriangulatedSurface.
virtual void visit(OGRPoint *)=0
Visit OGRPoint.
virtual void visit(OGRCurvePolygon *)=0
Visit OGRCurvePolygon.
virtual void visit(OGRGeometryCollection *)=0
Visit OGRGeometryCollection.
virtual void visit(OGRPolyhedralSurface *)=0
Visit OGRPolyhedralSurface.
virtual void visit(OGRMultiPolygon *)=0
Visit OGRMultiPolygon.
virtual ~IOGRGeometryVisitor()=default
Destructor/.
virtual void visit(OGRMultiLineString *)=0
Visit OGRMultiLineString.
virtual void visit(OGRMultiPoint *)=0
Visit OGRMultiPoint.
virtual void visit(OGRMultiCurve *)=0
Visit OGRMultiCurve.
Concrete representation of a circular string, that is to say a curve made of one or several arc circl...
Definition ogr_geometry.h:1856
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition ogr_geometry.h:1936
OGRCircularString()
Create an empty circular string.
const OGRSimpleCurve * toUpperClass() const
Return pointer of this in upper class.
Definition ogr_geometry.h:1931
OGRCircularString(const OGRCircularString &other)
Copy constructor.
OGRSimpleCurve * toUpperClass()
Return pointer of this in upper class.
Definition ogr_geometry.h:1926
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition ogr_geometry.h:1940
Utility class to store a collection of curves.
Definition ogr_geometry.h:2069
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition ogr_geometry.h:2210
const ChildType *const * end() const
Return end of curve iterator.
Definition ogr_geometry.h:2126
const ChildType *const * begin() const
Return begin of curve iterator.
Definition ogr_geometry.h:2121
OGRCompoundCurve(const OGRCompoundCurve &other)
Copy constructor.
OGRCurve ChildType
Type of child elements.
Definition ogr_geometry.h:2104
ChildType ** end()
Return end of curve iterator.
Definition ogr_geometry.h:2114
ChildType ** begin()
Return begin of curve iterator.
Definition ogr_geometry.h:2109
OGRCompoundCurve()
Create an empty compound curve.
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition ogr_geometry.h:2206
Concrete class representing curve polygons.
Definition ogr_geometry.h:2301
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition ogr_geometry.h:2439
OGRCurve ChildType
Type of child elements.
Definition ogr_geometry.h:2336
OGRCurvePolygon()
Create an empty curve polygon.
const ChildType *const * end() const
Return end of curve iterator.
Definition ogr_geometry.h:2358
const ChildType *const * begin() const
Return begin of curve iterator.
Definition ogr_geometry.h:2353
ChildType ** begin()
Return begin of curve iterator.
Definition ogr_geometry.h:2341
ChildType ** end()
Return end of curve iterator.
Definition ogr_geometry.h:2346
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition ogr_geometry.h:2443
OGRCurvePolygon(const OGRCurvePolygon &)
Copy constructor.
Abstract curve base class for OGRLineString, OGRCircularString and OGRCompoundCurve.
Definition ogr_geometry.h:1252
virtual OGRLineString * CurveToLine(double dfMaxAngleStepSizeDegrees=0, const char *const *papszOptions=nullptr) const =0
Return a linestring from a curve geometry.
virtual double get_Length() const =0
Returns the length of the curve.
const OGRSimpleCurve * toSimpleCurve() const
Down-cast to OGRSimpleCurve*.
Definition ogr_geometry.h:1341
virtual void StartPoint(OGRPoint *) const =0
Return the curve start point.
virtual void EndPoint(OGRPoint *) const =0
Return the curve end point.
virtual int getNumPoints() const =0
Return the number of points of a curve geometry.
OGRPoint ChildType
Type of child elements.
Definition ogr_geometry.h:1295
OGRSimpleCurve * toSimpleCurve()
Down-cast to OGRSimpleCurve*.
Definition ogr_geometry.h:1333
virtual void Value(double, OGRPoint *) const =0
Fetch point at given distance along curve.
virtual OGRPointIterator * getPointIterator() const =0
Returns a point iterator over the curve.
virtual double get_AreaOfCurveSegments() const =0
Get the area of the purely curve portions of a (closed) curve.
virtual double get_Area() const =0
Get the area of the (closed) curve.
virtual OGRCurve * clone() const override=0
Make a copy of this object.
OGRGeometry visitor default implementation.
Definition ogr_geometry.h:286
void visit(const OGRPoint *) override
Visit OGRPoint.
Definition ogr_geometry.h:290
OGRGeometry visitor default implementation.
Definition ogr_geometry.h:211
void visit(OGRPoint *) override
Visit OGRPoint.
Definition ogr_geometry.h:215
Simple container for a bounding region in 3D.
Definition ogr_core.h:213
Simple container for a bounding region (rectangle)
Definition ogr_core.h:58
A collection of 1 or more geometry objects.
Definition ogr_geometry.h:2735
ChildType ** end()
Return end of sub-geometry iterator.
Definition ogr_geometry.h:2773
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition ogr_geometry.h:2861
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition ogr_geometry.h:2865
const ChildType *const * begin() const
Return begin of sub-geometry iterator.
Definition ogr_geometry.h:2780
const ChildType *const * end() const
Return end of sub-geometry iterator.
Definition ogr_geometry.h:2785
ChildType ** begin()
Return begin of sub-geometry iterator.
Definition ogr_geometry.h:2768
OGRGeometry * getGeometryRef(int)
Fetch geometry from container.
Definition ogrgeometrycollection.cpp:259
OGRGeometryCollection()
Create an empty geometry collection.
OGRGeometry ChildType
Type of child elements.
Definition ogr_geometry.h:2763
Create geometry objects from well known text/binary.
Definition ogr_geometry.h:3927
static OGRErr createFromWkt(char **ppszInput, OGRSpatialReference *poSRS, OGRGeometry **ppoGeom)
Deprecated.
Definition ogr_geometry.h:3949
Abstract base class for all geometry classes.
Definition ogr_geometry.h:335
const OGRSurface * toSurface() const
Down-cast to OGRSurface*.
Definition ogr_geometry.h:748
const OGRCurvePolygon * toCurvePolygon() const
Down-cast to OGRCurvePolygon*.
Definition ogr_geometry.h:806
const OGRMultiCurve * toMultiCurve() const
Down-cast to OGRMultiCurve*.
Definition ogr_geometry.h:906
const OGRPolyhedralSurface * toPolyhedralSurface() const
Down-cast to OGRPolyhedralSurface*.
Definition ogr_geometry.h:946
const OGRMultiPoint * toMultiPoint() const
Down-cast to OGRMultiPoint*.
Definition ogr_geometry.h:846
virtual void empty()=0
Clear geometry information.
const OGRMultiPolygon * toMultiPolygon() const
Down-cast to OGRMultiPolygon*.
Definition ogr_geometry.h:886
virtual OGRBoolean Equals(const OGRGeometry *) const =0
Returns TRUE if two geometries are equivalent.
OGRPolyhedralSurface * toPolyhedralSurface()
Down-cast to OGRPolyhedralSurface*.
Definition ogr_geometry.h:936
const OGRMultiSurface * toMultiSurface() const
Down-cast to OGRMultiSurface*.
Definition ogr_geometry.h:926
OGRPoint * toPoint()
Down-cast to OGRPoint*.
Definition ogr_geometry.h:601
bool operator!=(const OGRGeometry &other) const
Returns if two geometries are different.
Definition ogr_geometry.h:395
OGRTriangle * toTriangle()
Down-cast to OGRTriangle*.
Definition ogr_geometry.h:777
OGRLineString * toLineString()
Down-cast to OGRLineString*.
Definition ogr_geometry.h:660
const OGRLinearRing * toLinearRing() const
Down-cast to OGRLinearRing*.
Definition ogr_geometry.h:688
const OGRPoint * toPoint() const
Down-cast to OGRPoint*.
Definition ogr_geometry.h:610
OGRMultiLineString * toMultiLineString()
Down-cast to OGRMultiLineString*.
Definition ogr_geometry.h:856
OGRMultiSurface * toMultiSurface()
Down-cast to OGRMultiSurface*.
Definition ogr_geometry.h:916
static OGRGeometry * FromHandle(OGRGeometryH hGeom)
Convert a OGRGeometryH to a OGRGeometry*.
Definition ogr_geometry.h:592
virtual OGRwkbGeometryType getGeometryType() const =0
Fetch geometry type.
virtual void accept(IOGRConstGeometryVisitor *visitor) const =0
Accept a visitor.
const OGRGeometryCollection * toGeometryCollection() const
Down-cast to OGRGeometryCollection*.
Definition ogr_geometry.h:826
const OGRMultiLineString * toMultiLineString() const
Down-cast to OGRMultiLineString*.
Definition ogr_geometry.h:866
const OGRCircularString * toCircularString() const
Down-cast to OGRCircularString*.
Definition ogr_geometry.h:708
OGRPolygon * toPolygon()
Down-cast to OGRPolygon*.
Definition ogr_geometry.h:758
bool operator==(const OGRGeometry &other) const
Returns if two geometries are equal.
Definition ogr_geometry.h:389
OGRLinearRing * toLinearRing()
Down-cast to OGRLinearRing*.
Definition ogr_geometry.h:679
OGRBoolean IsMeasured() const
Definition ogr_geometry.h:415
virtual void accept(IOGRGeometryVisitor *visitor)=0
Accept a visitor.
OGRMultiCurve * toMultiCurve()
Down-cast to OGRMultiCurve*.
Definition ogr_geometry.h:896
const OGRCompoundCurve * toCompoundCurve() const
Down-cast to OGRCompoundCurve*.
Definition ogr_geometry.h:728
virtual OGRErr transform(OGRCoordinateTransformation *poCT)=0
Apply arbitrary coordinate transformation to geometry.
virtual void flattenTo2D()=0
Convert geometry to strictly 2D.
virtual int getDimension() const =0
Get the dimension of this object.
OGRGeometryCollection * toGeometryCollection()
Down-cast to OGRGeometryCollection*.
Definition ogr_geometry.h:816
virtual const char * getGeometryName() const =0
Fetch WKT name for geometry type.
OGRMultiPolygon * toMultiPolygon()
Down-cast to OGRMultiPolygon*.
Definition ogr_geometry.h:876
const OGRPolygon * toPolygon() const
Down-cast to OGRPolygon*.
Definition ogr_geometry.h:768
OGRCompoundCurve * toCompoundCurve()
Down-cast to OGRCompoundCurve*.
Definition ogr_geometry.h:718
OGRErr importFromWkt(char **ppszInput)
Deprecated.
Definition ogr_geometry.h:439
virtual OGRBoolean IsEmpty() const =0
Returns TRUE (non-zero) if the object has no points.
const OGRLineString * toLineString() const
Down-cast to OGRLineString*.
Definition ogr_geometry.h:670
OGRErr exportToWkt(char **ppszDstText, OGRwkbVariant=wkbVariantOldOgc) const
Convert a geometry into well known text format.
Definition ogrgeometry.cpp:1816
OGRCircularString * toCircularString()
Down-cast to OGRCircularString*.
Definition ogr_geometry.h:698
const OGRCurve * toCurve() const
Down-cast to OGRCurve*.
Definition ogr_geometry.h:630
OGRCurvePolygon * toCurvePolygon()
Down-cast to OGRCurvePolygon*.
Definition ogr_geometry.h:796
const OGRSimpleCurve * toSimpleCurve() const
Down-cast to OGRSimpleCurve*.
Definition ogr_geometry.h:650
static OGRGeometryH ToHandle(OGRGeometry *poGeom)
Convert a OGRGeometry* to a OGRGeometryH.
Definition ogr_geometry.h:584
OGRBoolean Is3D() const
Definition ogr_geometry.h:410
OGRMultiPoint * toMultiPoint()
Down-cast to OGRMultiPoint*.
Definition ogr_geometry.h:836
const OGRTriangulatedSurface * toTriangulatedSurface() const
Down-cast to OGRTriangulatedSurface*.
Definition ogr_geometry.h:964
const OGRTriangle * toTriangle() const
Down-cast to OGRTriangle*.
Definition ogr_geometry.h:786
virtual OGRErr importFromWkt(const char **ppszInput)=0
Assign geometry from well known text data.
virtual OGRGeometry * clone() const =0
Make a copy of this object.
OGRSurface * toSurface()
Down-cast to OGRSurface*.
Definition ogr_geometry.h:738
OGRSimpleCurve * toSimpleCurve()
Down-cast to OGRSimpleCurve*.
Definition ogr_geometry.h:640
OGRTriangulatedSurface * toTriangulatedSurface()
Down-cast to OGRTriangulatedSurface*.
Definition ogr_geometry.h:955
virtual std::string exportToWkt(const OGRWktOptions &opts=OGRWktOptions(), OGRErr *err=nullptr) const =0
Export a WKT geometry.
OGRCurve * toCurve()
Down-cast to OGRCurve*.
Definition ogr_geometry.h:620
Definition ogr_geometry.h:1395
Concrete representation of a multi-vertex line.
Definition ogr_geometry.h:1679
OGRSimpleCurve * toUpperClass()
Return pointer of this in upper class.
Definition ogr_geometry.h:1717
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition ogr_geometry.h:1731
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition ogr_geometry.h:1727
OGRLineString(const OGRLineString &other)
Copy constructor.
virtual int isClockwise() const override
Returns TRUE if the ring has clockwise winding (or less than 2 points)
OGRLineString()
Create an empty line string.
virtual double get_Area() const override
Get the area of the (closed) curve.
const OGRSimpleCurve * toUpperClass() const
Return pointer of this in upper class.
Definition ogr_geometry.h:1722
Concrete representation of a closed ring.
Definition ogr_geometry.h:1765
OGRLineString * toUpperClass()
Return pointer of this in upper class.
Definition ogr_geometry.h:1816
const OGRLineString * toUpperClass() const
Return pointer of this in upper class.
Definition ogr_geometry.h:1821
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition ogr_geometry.h:1830
OGRLinearRing(const OGRLinearRing &other)
Copy constructor.
OGRLinearRing()
Constructor.
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition ogr_geometry.h:1826
A collection of OGRCurve.
Definition ogr_geometry.h:3644
const ChildType *const * begin() const
Return begin of iterator.
Definition ogr_geometry.h:3677
const ChildType *const * end() const
Return end of iterator.
Definition ogr_geometry.h:3682
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition ogr_geometry.h:3744
ChildType ** end()
Return end of iterator.
Definition ogr_geometry.h:3670
const OGRGeometryCollection * toUpperClass() const
Return pointer of this in upper class.
Definition ogr_geometry.h:3735
const OGRCurve * getGeometryRef(int i) const
See OGRGeometryCollection::getGeometryRef()
Definition ogr_geometry.h:3695
OGRCurve * getGeometryRef(int i)
See OGRGeometryCollection::getGeometryRef()
Definition ogr_geometry.h:3690
OGRMultiCurve()
Create an empty multi curve collection.
OGRMultiCurve(const OGRMultiCurve &other)
Copy constructor.
OGRCurve ChildType
Type of child elements.
Definition ogr_geometry.h:3660
ChildType ** begin()
Return begin of iterator.
Definition ogr_geometry.h:3665
OGRGeometryCollection * toUpperClass()
Return pointer of this in upper class.
Definition ogr_geometry.h:3730
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition ogr_geometry.h:3740
A collection of OGRLineString.
Definition ogr_geometry.h:3791
OGRLineString ChildType
Type of child elements.
Definition ogr_geometry.h:3803
OGRLineString * getGeometryRef(int i)
See OGRGeometryCollection::getGeometryRef()
Definition ogr_geometry.h:3833
OGRGeometryCollection * toUpperClass()
Return pointer of this in upper class.
Definition ogr_geometry.h:3864
ChildType ** end()
Return end of iterator.
Definition ogr_geometry.h:3813
const ChildType *const * end() const
Return end of iterator.
Definition ogr_geometry.h:3825
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition ogr_geometry.h:3878
const ChildType *const * begin() const
Return begin of iterator.
Definition ogr_geometry.h:3820
OGRMultiLineString()
Create an empty multi line string collection.
const OGRLineString * getGeometryRef(int i) const
See OGRGeometryCollection::getGeometryRef()
Definition ogr_geometry.h:3838
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition ogr_geometry.h:3874
ChildType ** begin()
Return begin of iterator.
Definition ogr_geometry.h:3808
const OGRGeometryCollection * toUpperClass() const
Return pointer of this in upper class.
Definition ogr_geometry.h:3869
OGRMultiLineString(const OGRMultiLineString &other)
Copy constructor.
A collection of OGRPoint.
Definition ogr_geometry.h:3497
OGRGeometryCollection * toUpperClass()
Return pointer of this in upper class.
Definition ogr_geometry.h:3578
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition ogr_geometry.h:3588
const ChildType *const * end() const
Return end of iterator.
Definition ogr_geometry.h:3534
ChildType ** begin()
Return begin of iterator.
Definition ogr_geometry.h:3517
OGRMultiPoint()
Create an empty multi point collection.
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition ogr_geometry.h:3592
OGRMultiPoint(const OGRMultiPoint &other)
Copy constructor.
const ChildType *const * begin() const
Return begin of iterator.
Definition ogr_geometry.h:3529
const OGRGeometryCollection * toUpperClass() const
Return pointer of this in upper class.
Definition ogr_geometry.h:3583
OGRPoint ChildType
Type of child elements.
Definition ogr_geometry.h:3512
const OGRPoint * getGeometryRef(int i) const
See OGRGeometryCollection::getGeometryRef()
Definition ogr_geometry.h:3547
OGRPoint * getGeometryRef(int i)
See OGRGeometryCollection::getGeometryRef()
Definition ogr_geometry.h:3542
ChildType ** end()
Return end of iterator.
Definition ogr_geometry.h:3522
A collection of non-overlapping OGRPolygon.
Definition ogr_geometry.h:3064
OGRPolygon ChildType
Type of child elements.
Definition ogr_geometry.h:3086
OGRMultiPolygon(const OGRMultiPolygon &other)
Copy constructor.
OGRPolygon * getGeometryRef(int i)
See OGRGeometryCollection::getGeometryRef()
Definition ogr_geometry.h:3116
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition ogr_geometry.h:3161
const OGRPolygon * getGeometryRef(int i) const
See OGRGeometryCollection::getGeometryRef()
Definition ogr_geometry.h:3121
const ChildType *const * end() const
Return end of iterator.
Definition ogr_geometry.h:3108
ChildType ** end()
Return end of iterator.
Definition ogr_geometry.h:3096
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition ogr_geometry.h:3157
OGRMultiPolygon()
Create an empty multi polygon collection.
ChildType ** begin()
Return begin of iterator.
Definition ogr_geometry.h:3091
OGRGeometryCollection * toUpperClass()
Return pointer of this in upper class.
Definition ogr_geometry.h:3147
const ChildType *const * begin() const
Return begin of iterator.
Definition ogr_geometry.h:3103
const OGRGeometryCollection * toUpperClass() const
Return pointer of this in upper class.
Definition ogr_geometry.h:3152
A collection of non-overlapping OGRSurface.
Definition ogr_geometry.h:2916
OGRMultiSurface()
Create an empty multi surface collection.
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition ogr_geometry.h:3011
const OGRSurface * getGeometryRef(int i) const
See OGRGeometryCollection::getGeometryRef()
Definition ogr_geometry.h:2991
ChildType ** begin()
Return begin of iterator.
Definition ogr_geometry.h:2933
OGRSurface ChildType
Type of child elements.
Definition ogr_geometry.h:2928
const OGRGeometryCollection * toUpperClass() const
Return pointer of this in upper class.
Definition ogr_geometry.h:3006
const ChildType *const * begin() const
Return begin of iterator.
Definition ogr_geometry.h:2945
const ChildType *const * end() const
Return end of iterator.
Definition ogr_geometry.h:2950
OGRMultiSurface(const OGRMultiSurface &other)
Copy constructor.
ChildType ** end()
Return end of iterator.
Definition ogr_geometry.h:2938
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition ogr_geometry.h:3015
OGRGeometryCollection * toUpperClass()
Return pointer of this in upper class.
Definition ogr_geometry.h:3001
OGRSurface * getGeometryRef(int i)
See OGRGeometryCollection::getGeometryRef()
Definition ogr_geometry.h:2986
Interface for a point iterator.
Definition ogr_geometry.h:1234
virtual OGRBoolean getNextPoint(OGRPoint *p)=0
Returns the next point followed by the iterator.
Point class.
Definition ogr_geometry.h:1081
double getM() const
Return m.
Definition ogr_geometry.h:1150
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition ogr_geometry.h:1206
void setX(double xIn)
Set x.
Definition ogr_geometry.h:1160
OGRPoint(const OGRPoint &other)
Copy constructor.
void setZ(double zIn)
Set z.
Definition ogr_geometry.h:1182
void setM(double mIn)
Set m.
Definition ogr_geometry.h:1190
double getX() const
Return x.
Definition ogr_geometry.h:1135
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition ogr_geometry.h:1210
void setY(double yIn)
Set y.
Definition ogr_geometry.h:1171
virtual OGRBoolean IsEmpty() const override
Returns TRUE (non-zero) if the object has no points.
Definition ogr_geometry.h:1128
double getZ() const
Return z.
Definition ogr_geometry.h:1145
double getY() const
Return y.
Definition ogr_geometry.h:1140
Concrete class representing polygons.
Definition ogr_geometry.h:2494
OGRLinearRing ChildType
Type of child elements.
Definition ogr_geometry.h:2523
ChildType ** begin()
Return begin of iterator.
Definition ogr_geometry.h:2528
const OGRCurvePolygon * toUpperClass() const
Return pointer of this in upper class.
Definition ogr_geometry.h:2607
OGRPolygon()
Create an empty polygon.
ChildType ** end()
Return end of iterator.
Definition ogr_geometry.h:2533
OGRPolygon(const OGRPolygon &other)
Copy constructor.
const ChildType *const * begin() const
Return begin of iterator.
Definition ogr_geometry.h:2540
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition ogr_geometry.h:2616
const ChildType *const * end() const
Return end of iterator.
Definition ogr_geometry.h:2545
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition ogr_geometry.h:2612
OGRCurvePolygon * toUpperClass()
Return pointer of this in upper class.
Definition ogr_geometry.h:2602
PolyhedralSurface class.
Definition ogr_geometry.h:3209
ChildType ** end()
Return end of iterator.
Definition ogr_geometry.h:3245
const ChildType *const * end() const
Return end of iterator.
Definition ogr_geometry.h:3257
OGRPolygon * getGeometryRef(int i)
Fetch geometry from container.
Definition ogrpolyhedralsurface.cpp:816
OGRPolyhedralSurface(const OGRPolyhedralSurface &poGeom)
Copy constructor.
const ChildType *const * begin() const
Return begin of iterator.
Definition ogr_geometry.h:3252
~OGRPolyhedralSurface() override
Destructor.
ChildType ** begin()
Return begin of iterator.
Definition ogr_geometry.h:3240
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition ogr_geometry.h:3319
OGRPolygon ChildType
Type of child elements.
Definition ogr_geometry.h:3235
OGRPolyhedralSurface()
Create an empty PolyhedralSurface.
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition ogr_geometry.h:3323
Simple container for a position.
Definition ogr_geometry.h:105
OGRRawPoint(double xIn, double yIn)
Constructor.
Definition ogr_geometry.h:113
double x
x
Definition ogr_geometry.h:118
double y
y
Definition ogr_geometry.h:120
OGRRawPoint()
Constructor.
Definition ogr_geometry.h:108
Abstract curve base class for OGRLineString and OGRCircularString.
Definition ogr_geometry.h:1439
double getY(int i) const
Get Y at vertex.
Definition ogr_geometry.h:1583
double getX(int i) const
Get X at vertex.
Definition ogr_geometry.h:1579
OGRPoint ChildType
Type of child elements.
Definition ogr_geometry.h:1509
virtual OGRSimpleCurve * clone() const override=0
Make a copy of this object.
virtual int getNumPoints() const override
Fetch vertex count.
Definition ogr_geometry.h:1574
This class represents an OpenGIS Spatial Reference System, and contains methods for converting betwee...
Definition ogr_spatialref.h:167
Abstract base class for 2 dimensional objects like polygons or curve polygons.
Definition ogr_geometry.h:2257
virtual double get_Area() const =0
Get the area of the surface object.
virtual OGRSurface * clone() const override=0
Make a copy of this object.
virtual OGRErr PointOnSurface(OGRPoint *poPoint) const
This method relates to the SFCOM ISurface::get_PointOnSurface() method.
Definition ogr_geometry.h:2266
Triangle class.
Definition ogr_geometry.h:2662
const OGRPolygon * toUpperClass() const
Return pointer of this in upper class.
Definition ogr_geometry.h:2701
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition ogr_geometry.h:2706
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition ogr_geometry.h:2710
OGRTriangle()
Constructor.
~OGRTriangle() override
Destructor.
OGRPolygon * toUpperClass()
Return pointer of this in upper class.
Definition ogr_geometry.h:2696
OGRTriangle(const OGRTriangle &other)
Copy constructor.
TriangulatedSurface class.
Definition ogr_geometry.h:3371
const OGRTriangle * getGeometryRef(int i) const
See OGRPolyhedralSurface::getGeometryRef()
Definition ogr_geometry.h:3427
~OGRTriangulatedSurface()
Destructor.
OGRTriangle * getGeometryRef(int i)
See OGRPolyhedralSurface::getGeometryRef()
Definition ogr_geometry.h:3422
const ChildType *const * end() const
Return end of iterator.
Definition ogr_geometry.h:3411
const ChildType *const * begin() const
Return begin of iterator.
Definition ogr_geometry.h:3406
OGRPolyhedralSurface * toUpperClass()
Return pointer of this in upper class.
Definition ogr_geometry.h:3436
virtual void accept(IOGRGeometryVisitor *visitor) override
Accept a visitor.
Definition ogr_geometry.h:3446
const OGRPolyhedralSurface * toUpperClass() const
Return pointer of this in upper class.
Definition ogr_geometry.h:3441
OGRTriangle ChildType
Type of child elements.
Definition ogr_geometry.h:3389
virtual void accept(IOGRConstGeometryVisitor *visitor) const override
Accept a visitor.
Definition ogr_geometry.h:3450
ChildType ** begin()
Return begin of iterator.
Definition ogr_geometry.h:3394
ChildType ** end()
Return end of iterator.
Definition ogr_geometry.h:3399
OGRTriangulatedSurface()
Constructor.
Various convenience functions for CPL.
Interface for read and write JSON documents.
#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:1049
char ** CSLConstList
Type of a constant null-terminated list of nul terminated strings.
Definition cpl_port.h:1190
#define CPL_WARN_UNUSED_RESULT
Qualifier to warn when the return value of a function is not used.
Definition cpl_port.h:983
unsigned char GByte
Unsigned byte type.
Definition cpl_port.h:205
void * OGRGeometryH
Opaque type for a geometry.
Definition ogr_api.h:66
Core portability services for cross-platform OGR code.
int OGRBoolean
Type for a OGR boolean.
Definition ogr_core.h:395
OGRwkbByteOrder
Enumeration to describe byte order.
Definition ogr_core.h:611
OGRwkbVariant
Output variants of WKB we support.
Definition ogr_core.h:541
@ wkbVariantOldOgc
Old-style 99-402 extended dimension (Z) WKB types.
Definition ogr_core.h:542
OGRwkbGeometryType
List of well known binary geometry types.
Definition ogr_core.h:407
int OGRErr
Type for a OGR error.
Definition ogr_core.h:378
OGRWktFormat
WKT Output formatting options.
Definition ogr_geometry.h:62
@ Default
Format as F when abs(value) < 1, otherwise as G.
std::unique_ptr< OGRPreparedGeometry, OGRPreparedGeometryUniquePtrDeleter > OGRPreparedGeometryUniquePtr
Unique pointer type for OGRPreparedGeometry.
Definition ogr_geometry.h:4041
struct GEOSContextHandle_HS * GEOSContextHandle_t
GEOS context handle type.
Definition ogr_geometry.h:126
OGRwkbGeometryType OGRFromOGCGeomType(const char *pszGeomType)
Map OGCgeometry format type to corresponding OGR constants.
Definition ogrgeometry.cpp:2379
const char * OGRToOGCGeomType(OGRwkbGeometryType eGeomType)
Map OGR geometry format constants to corresponding OGC geometry type.
Definition ogrgeometry.cpp:2452
std::unique_ptr< OGRGeometry, OGRGeometryUniquePtrDeleter > OGRGeometryUniquePtr
Unique pointer type for OGRGeometry.
Definition ogr_geometry.h:981
struct GEOSGeom_t * GEOSGeom
GEOS geometry type.
Definition ogr_geometry.h:124
void sfcgal_geometry_t
SFCGAL geometry type.
Definition ogr_geometry.h:128
Coordinate systems services.
OGRLayer::FeatureIterator begin(OGRLayer *poLayer)
Return begin of feature iterator.
Definition ogrsf_frmts.h:345
OGRLayer::FeatureIterator end(OGRLayer *poLayer)
Return end of feature iterator.
Definition ogrsf_frmts.h:353
Options for formatting WKT output.
Definition ogr_geometry.h:70
OGRwkbVariant variant
Type of WKT output to produce.
Definition ogr_geometry.h:73
OGRWktOptions()
Constructor.
Definition ogr_geometry.h:82
OGRWktOptions(const OGRWktOptions &)=default
Copy constructor.
bool round
Whether GDAL-special rounding should be applied.
Definition ogr_geometry.h:77
int precision
Precision of output. Interpretation depends on format.
Definition ogr_geometry.h:75
OGRWktFormat format
Formatting type.
Definition ogr_geometry.h:79