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 CoordinateArraySequence;
38 class CoordinateSequenceFilter;
78 std::unique_ptr<Polygon>
clone()
const 80 return std::unique_ptr<Polygon>(cloneImpl());
83 std::unique_ptr<CoordinateSequence> getCoordinates()
const override;
85 std::size_t getNumPoints()
const override;
91 uint8_t getCoordinateDimension()
const override;
94 int getBoundaryDimension()
const override;
102 std::unique_ptr<Geometry> getBoundary()
const override;
104 bool isEmpty()
const override;
117 std::unique_ptr<LinearRing> releaseExteriorRing();
120 std::size_t getNumInteriorRing()
const;
123 const LinearRing* getInteriorRingN(std::size_t n)
const;
133 std::vector<std::unique_ptr<LinearRing>> releaseInteriorRings();
135 std::string getGeometryType()
const override;
137 bool equalsExact(
const Geometry* other,
double tolerance = 0)
const override;
147 std::unique_ptr<Geometry> convexHull()
const override;
149 void normalize()
override;
151 std::unique_ptr<Polygon> reverse()
const {
return std::unique_ptr<Polygon>(reverseImpl()); }
153 const Coordinate* getCoordinate()
const override;
155 double getArea()
const override;
158 double getLength()
const override;
160 bool isRectangle()
const override;
165 Polygon(
const Polygon& p);
167 int compareToSameClass(
const Geometry* p)
const override;
187 Polygon(LinearRing* newShell, std::vector<LinearRing*>* newHoles,
188 const GeometryFactory* newFactory);
190 Polygon(std::unique_ptr<LinearRing> && newShell,
191 const GeometryFactory& newFactory);
193 Polygon(std::unique_ptr<LinearRing> && newShell,
194 std::vector<std::unique_ptr<LinearRing>> && newHoles,
195 const GeometryFactory& newFactory);
199 Polygon* reverseImpl()
const override;
201 std::unique_ptr<LinearRing> shell;
203 std::vector<std::unique_ptr<LinearRing>> holes;
205 Envelope::Ptr computeEnvelopeInternal()
const override;
208 getSortIndex()
const override 210 return SORTINDEX_POLYGON;
216 void normalize(LinearRing* ring,
bool clockwise);
Geometry classes support the concept of applying a Geometry filter to the Geometry.
Definition: GeometryFilter.h:45
std::vector< const Polygon * > ConstVect
A vector of const Polygon pointers.
Definition: Polygon.h:68
std::unique_ptr< Polygon > clone() const
Definition: Polygon.h:78
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
Geometry classes support the concept of applying a coordinate filter to every coordinate in the Geome...
Definition: CoordinateFilter.h:41
Represents a linear polygon, which may include holes.
Definition: Polygon.h:61
Polygon * cloneImpl() const override
Make a deep-copy of this Geometry.
Definition: Polygon.h:197
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:66
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:55
DimensionType
Definition: Dimension.h:29
Definition: GeometryComponentFilter.h:41