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>
30 #include <geos/geom/SurfaceImpl.h>
38 class CoordinateSequenceFilter;
61 class GEOS_DLL
Polygon:
public SurfaceImpl<LinearRing> {
72 std::unique_ptr<CoordinateSequence>
81 std::unique_ptr<Polygon>
clone()
const
83 return std::unique_ptr<Polygon>(cloneImpl());
99 std::unique_ptr<Polygon> reverse()
const {
return std::unique_ptr<Polygon>(reverseImpl()); }
117 using SurfaceImpl::SurfaceImpl;
124 getSortIndex()
const override
126 return SORTINDEX_POLYGON;
132 void normalize(
LinearRing* ring,
bool clockwise);
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:70
Models an OGC SFS LinearRing. A LinearRing is a LineString which is both closed and simple.
Definition: LinearRing.h:54
Represents a linear polygon, which may include holes.
Definition: Polygon.h:61
void normalize() override
std::unique_ptr< Polygon > clone() const
Definition: Polygon.h:81
std::string getGeometryType() const override
Return a string representation of this Geometry type.
std::vector< const Polygon * > ConstVect
A vector of const Polygon pointers.
Definition: Polygon.h:68
Polygon * cloneImpl() const override
Make a deep-copy of this Geometry.
Definition: Polygon.h:119
double getArea() const override
Returns the area of this Geometry.
Polygon * reverseImpl() const override
Make a geometry with coordinates in reverse order.
std::unique_ptr< CoordinateSequence > getCoordinates() const override
Returns this Geometry vertices. Caller takes ownership of the returned object.
bool isRectangle() const override
Polygon overrides to check for actual rectangle.
void orientRings(bool exteriorCW)
Apply a ring ordering convention to this polygon, with interior rings having an opposite orientation ...
std::unique_ptr< Geometry > getBoundary() const override
Computes the boundary of this geometry.
GeometryTypeId getGeometryTypeId() const override
Return an integer representation of this Geometry type.
GeometryTypeId
Geometry types.
Definition: Geometry.h:74
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25