21 #ifndef GEOS_GEOM_POLYGON_H 22 #define GEOS_GEOM_POLYGON_H 40 class CoordinateArraySequence;
41 class CoordinateSequenceFilter;
81 std::unique_ptr<Geometry>
84 return std::unique_ptr<Geometry>(
new Polygon(*
this));
87 std::unique_ptr<CoordinateSequence> getCoordinates()
const override;
89 size_t getNumPoints()
const override;
95 uint8_t getCoordinateDimension()
const override;
98 int getBoundaryDimension()
const override;
106 std::unique_ptr<Geometry> getBoundary()
const override;
108 bool isEmpty()
const override;
114 size_t getNumInteriorRing()
const;
117 const LinearRing* getInteriorRingN(std::size_t n)
const;
119 std::string getGeometryType()
const override;
121 bool equalsExact(
const Geometry* other,
double tolerance = 0)
const override;
131 std::unique_ptr<Geometry> convexHull()
const override;
133 void normalize()
override;
135 std::unique_ptr<Geometry> reverse()
const override;
137 int compareToSameClass(
const Geometry* p)
const override;
139 const Coordinate* getCoordinate()
const override;
141 double getArea()
const override;
144 double getLength()
const override;
146 bool isRectangle()
const override;
174 Polygon(std::unique_ptr<LinearRing> && newShell,
177 Polygon(std::unique_ptr<LinearRing> && newShell,
178 std::vector<std::unique_ptr<LinearRing>> && newHoles,
183 std::vector<std::unique_ptr<LinearRing>>
holes;
196 void normalize(
LinearRing* ring,
bool clockwise);
202 #endif // ndef GEOS_GEOM_POLYGON_H Geometry classes support the concept of applying a Geometry filter to the Geometry.
std::unique_ptr< Geometry > clone() const override
std::vector< const Polygon * > ConstVect
A vector of const Polygon pointers.
Coordinate is the lightweight class used to store coordinates.
Interface for classes which provide operations that can be applied to the coordinates in a Coordinate...
GeometryTypeId
Geometry types.
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Geometry classes support the concept of applying a coordinate filter to every coordinate in the Geome...
Represents a linear polygon, which may include holes.
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Basic namespace for all GEOS functionalities.
std::unique_ptr< LinearRing > shell
Models an OGC SFS LinearRing. A LinearRing is a LineString which is both closed and simple...
std::unique_ptr< Envelope > Ptr
int getSortIndex() const override
std::vector< std::unique_ptr< LinearRing > > holes