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>
61class GEOS_DLL
Polygon:
public SurfaceImpl<LinearRing> {
65 friend class GeometryFactory;
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);
Interface for classes which provide operations that can be applied to the coordinates in a Coordinate...
Definition CoordinateSequenceFilter.h:55
Coordinate is the lightweight class used to store coordinates.
Definition Coordinate.h:217
Definition LineString.h:66
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::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
double getArea() const override
Returns the area of this Geometry.
std::unique_ptr< CoordinateSequence > getCoordinates() const override
Returns this Geometry vertices. Caller takes ownership of the returned object.
std::unique_ptr< Geometry > getBoundary() const override
Computes the boundary of this geometry.
std::unique_ptr< Polygon > clone() const
Definition Polygon.h:81
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 ...
Polygon * reverseImpl() const override
Make a geometry with coordinates in reverse order.
Polygon * cloneImpl() const override
Make a deep-copy of this Geometry.
Definition Polygon.h:119
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 geos.h:39