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());
97 std::unique_ptr<Surface> getCurved(
const algorithm::LineToCurveParams& params)
const {
98 return std::unique_ptr<Surface>(getCurvedImpl(params));
101 std::unique_ptr<Polygon> getLinearized(
const algorithm::CurveToLineParams&)
const;
105 std::unique_ptr<Polygon> reverse()
const {
return std::unique_ptr<Polygon>(
reverseImpl()); }
123 using SurfaceImpl::SurfaceImpl;
125 Surface* getCurvedImpl(
const algorithm::LineToCurveParams&)
const override;
127 Polygon* getLinearizedImpl(
const algorithm::CurveToLineParams&)
const override {
return cloneImpl(); };
134 getSortIndex()
const override
136 return SORTINDEX_POLYGON;
142 static 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:56
Coordinate is the lightweight class used to store coordinates.
Definition Coordinate.h:220
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:129
GeometryTypeId getGeometryTypeId() const override
Return an integer representation of this Geometry type.
GeometryTypeId
Geometry types.
Definition Geometry.h:78
Basic namespace for all GEOS functionalities.
Definition geos.h:38