21 #ifndef GEOS_GEOM_POLYGON_H
22 #define GEOS_GEOM_POLYGON_H
24 #include <geos/export.h>
27 #include <geos/platform.h>
28 #include <geos/geom/Geometry.h>
29 #include <geos/geom/Polygonal.h>
30 #include <geos/geom/Envelope.h>
31 #include <geos/geom/Dimension.h>
33 #include <geos/inline.h>
41 class CoordinateArraySequence;
42 class CoordinateSequenceFilter;
142 int compareToSameClass(
const Geometry *p)
const override;
185 std::vector<Geometry *> *holes;
187 Envelope::Ptr computeEnvelopeInternal()
const override;
191 void normalize(
LinearRing *ring,
bool clockwise);
197 #endif // ndef GEOS_GEOM_POLYGON_H
void normalize() override
Converts this Geometry to normal form (or canonical form).
const LineString * getInteriorRingN(std::size_t n) const
Get nth interior ring (hole)
Definition: Polygonal.h:38
Models an OGC SFS LinearRing.
Definition: LinearRing.h:57
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:25
Definition: GeometryComponentFilter.h:43
std::string getGeometryType() const override
Return a string representation of this Geometry type.
bool equalsExact(const Geometry *other, double tolerance=0) const override
Returns true iff the two Geometrys are of the same type and their vertices corresponding by index are...
double getLength() const override
Returns the perimeter of this Polygon
DimensionType
Definition: Dimension.h:31
int getCoordinateDimension() const override
Returns coordinate dimension.
Dimension::DimensionType getDimension() const override
Returns surface dimension (2)
size_t getNumInteriorRing() const
Returns number of interior rings (hole)
Represents a linear polygon, which may include holes.
Definition: Polygon.h:67
CoordinateSequence * getCoordinates() const override
Returns this Geometry vertices. Caller takes ownership of the returned object.
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:60
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:177
const LineString * getExteriorRing() const
Returns the exterior ring (shell)
void apply_ro(CoordinateSequenceFilter &filter) const override
bool isEmpty() const override
Returns whether or not the set of points in this Geometry is empty.
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:59
Geometry * convexHull() const override
Returns the smallest convex Polygon that contains all the points in the Geometry.
int getBoundaryDimension() const override
Returns 1 (Polygon boundary is a MultiLineString)
double getArea() const override
Returns the area of this Geometry.
Definition: CoordinateSequenceFilter.h:58
bool isRectangle() const override
Polygon overrides to check for actual rectangle.
Geometry * getBoundary() const override
Computes the boundary of this geometry.
GeometryTypeId getGeometryTypeId() const override
Return an integer representation of this Geometry type.
bool isSimple() const override
Tests if a valid polygon is simple. This method always returns true, since a valid polygon is always ...
size_t getNumPoints() const override
Returns the count of this Geometrys vertices.
GeometryTypeId
Geometry types.
Definition: Geometry.h:75
Geometry * clone() const override
Definition: Polygon.h:84
Definition: CoordinateFilter.h:43
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:67
Geometry classes support the concept of applying a Geometry filter to the Geometry.
Definition: GeometryFilter.h:48
Definition: LineString.h:70
const Coordinate * getCoordinate() const override
Returns a vertex of this Geometry, or NULL if this is the empty geometry.
Geometry * reverse() const override
void apply_rw(CoordinateSequenceFilter &filter) override
std::vector< const Polygon * > ConstVect
A vector of const Polygon pointers.
Definition: Polygon.h:74
Polygon(LinearRing *newShell, std::vector< Geometry * > *newHoles, const GeometryFactory *newFactory)