23 #include <geos/export.h> 26 #include <geos/geom/Geometry.h> 27 #include <geos/geom/Envelope.h> 28 #include <geos/geom/LinearRing.h> 29 #include <geos/geom/Dimension.h> 37 class CoordinateSequenceFilter;
77 std::unique_ptr<Polygon>
clone()
const 79 return std::unique_ptr<Polygon>(cloneImpl());
82 std::unique_ptr<CoordinateSequence> getCoordinates()
const override;
84 std::size_t getNumPoints()
const override;
90 uint8_t getCoordinateDimension()
const override;
92 bool hasM()
const override;
94 bool hasZ()
const override;
97 int getBoundaryDimension()
const override;
105 std::unique_ptr<Geometry> getBoundary()
const override;
107 bool isEmpty()
const override;
120 std::unique_ptr<LinearRing> releaseExteriorRing();
123 std::size_t getNumInteriorRing()
const;
126 const LinearRing* getInteriorRingN(std::size_t n)
const;
136 std::vector<std::unique_ptr<LinearRing>> releaseInteriorRings();
138 std::string getGeometryType()
const override;
140 bool equalsExact(
const Geometry* other,
double tolerance = 0)
const override;
141 bool equalsIdentical(
const Geometry* other)
const override;
151 std::unique_ptr<Geometry> convexHull()
const override;
153 void normalize()
override;
163 void orientRings(
bool exteriorCW);
165 std::unique_ptr<Polygon> reverse()
const {
return std::unique_ptr<Polygon>(reverseImpl()); }
167 const CoordinateXY* getCoordinate()
const override;
169 double getArea()
const override;
172 double getLength()
const override;
174 bool isRectangle()
const override;
177 return shell->getEnvelopeInternal();
185 int compareToSameClass(
const Geometry* p)
const override;
205 Polygon(std::unique_ptr<LinearRing> && newShell,
206 std::vector<std::unique_ptr<LinearRing>> && newHoles,
209 Polygon(std::unique_ptr<LinearRing> && newShell,
214 Polygon* reverseImpl()
const override;
216 std::unique_ptr<LinearRing> shell;
218 std::vector<std::unique_ptr<LinearRing>> holes;
223 getSortIndex()
const override 225 return SORTINDEX_POLYGON;
231 void normalize(LinearRing* ring,
bool clockwise);
Geometry classes support the concept of applying a Geometry filter to the Geometry.
Definition: GeometryFilter.h:45
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition: Envelope.h:58
std::vector< const Polygon * > ConstVect
A vector of const Polygon pointers.
Definition: Polygon.h:67
std::unique_ptr< Polygon > clone() const
Definition: Polygon.h:77
Interface for classes which provide operations that can be applied to the coordinates in a Coordinate...
Definition: CoordinateSequenceFilter.h:55
GeometryTypeId
Geometry types.
Definition: Geometry.h:73
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:186
void geometryChangedAction() override
Notifies this Geometry that its Coordinates have been changed by an external party.
Definition: Polygon.h:220
Geometry classes support the concept of applying a coordinate filter to every coordinate in the Geome...
Definition: CoordinateFilter.h:43
Represents a linear polygon, which may include holes.
Definition: Polygon.h:60
Polygon * cloneImpl() const override
Make a deep-copy of this Geometry.
Definition: Polygon.h:212
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:65
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
Models an OGC SFS LinearRing. A LinearRing is a LineString which is both closed and simple...
Definition: LinearRing.h:54
const Envelope * getEnvelopeInternal() const override
Returns the minimum and maximum x and y values in this Geometry, or a null Envelope if this Geometry ...
Definition: Polygon.h:176
DimensionType
Definition: Dimension.h:29
Definition: GeometryComponentFilter.h:41