21 #ifndef GEOS_GEOM_POLYGON_H 22 #define GEOS_GEOM_POLYGON_H 24 #include <geos/export.h> 27 #include <geos/geom/Geometry.h> 28 #include <geos/geom/Envelope.h> 29 #include <geos/geom/LinearRing.h> 30 #include <geos/geom/Dimension.h> 32 #include <geos/inline.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 int 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,
181 std::unique_ptr<LinearRing> shell;
183 std::vector<std::unique_ptr<LinearRing>> holes;
185 Envelope::Ptr computeEnvelopeInternal()
const override;
188 getSortIndex()
const override 190 return SORTINDEX_POLYGON;
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.
Definition: GeometryFilter.h:47
std::unique_ptr< Geometry > clone() const override
Definition: Polygon.h:82
std::vector< const Polygon * > ConstVect
A vector of const Polygon pointers.
Definition: Polygon.h:71
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:60
Interface for classes which provide operations that can be applied to the coordinates in a Coordinate...
Definition: CoordinateSequenceFilter.h:57
GeometryTypeId
Geometry types.
Definition: Geometry.h:75
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:188
Geometry classes support the concept of applying a coordinate filter to every coordinate in the Geome...
Definition: CoordinateFilter.h:43
Represents a linear polygon, which may include holes.
Definition: Polygon.h:64
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:68
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:25
Models an OGC SFS LinearRing. A LinearRing is a LineString which is both closed and simple.
Definition: LinearRing.h:54
DimensionType
Definition: Dimension.h:31
Definition: GeometryComponentFilter.h:43