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>
66class GEOS_DLL Polygon:
public virtual Geometry,
public Polygonal
71 friend class GeometryFactory;
140 int compareToSameClass(
const Geometry *p)
const;
158 Polygon(
const Polygon &p);
179 const GeometryFactory *newFactory);
183 std::vector<Geometry *> *holes;
185 Envelope::AutoPtr computeEnvelopeInternal()
const;
The default implementation of CoordinateSequence.
Definition CoordinateArraySequence.h:37
Definition CoordinateFilter.h:43
Definition CoordinateSequenceFilter.h:58
The internal representation of a list of coordinates inside a Geometry.
Definition CoordinateSequence.h:59
Coordinate is the lightweight class used to store coordinates.
Definition Coordinate.h:60
DimensionType
Definition Dimension.h:31
Definition GeometryComponentFilter.h:43
Geometry classes support the concept of applying a Geometry filter to the Geometry.
Definition GeometryFilter.h:48
Geometry(const Geometry &geom)
Polygon overrides to check for actual rectangle.
Definition LineString.h:70
Models an OGC SFS LinearRing.
Definition LinearRing.h:57
const LineString * getExteriorRing() const
Returns the exterior ring (shell).
Polygon(LinearRing *newShell, std::vector< Geometry * > *newHoles, const GeometryFactory *newFactory)
double getLength() const
Returns the perimeter of this Polygon.
int getBoundaryDimension() const
Returns 1 (Polygon boundary is a MultiLineString).
virtual GeometryTypeId getGeometryTypeId() const
Return an integer representation of this Geometry type.
bool equalsExact(const Geometry *other, double tolerance=0) const
Returns true if the two Geometrys are exactly equal, up to a specified tolerance.
Dimension::DimensionType getDimension() const
Returns surface dimension (2).
virtual Geometry * clone() const
Definition Polygon.h:84
double getArea() const
Returns the area of this Geometry.
bool isSimple() const
Tests if a valid polygon is simple. This method always returns true, since a valid polygon is always ...
bool isRectangle() const
Polygon overrides to check for actual rectangle.
void normalize()
Converts this Geometry to normal form (or canonical form).
size_t getNumPoints() const
Returns the count of this Geometrys vertices.
virtual int getCoordinateDimension() const
Returns coordinate dimension.
void apply_rw(CoordinateSequenceFilter &filter)
Geometry * getBoundary() const
Computes the boundary of this geometry.
const Coordinate * getCoordinate() const
Returns a vertex of this Geometry, or NULL if this is the empty geometry.
bool isEmpty() const
Returns whether or not the set of points in this Geometry is empty.
size_t getNumInteriorRing() const
Returns number of interior rings (hole).
CoordinateSequence * getCoordinates() const
Returns this Geometry vertices. Caller takes ownership of the returned object.
void apply_ro(CoordinateSequenceFilter &filter) const
std::vector< const Polygon * > ConstVect
A vector of const Polygon pointers.
Definition Polygon.h:74
const LineString * getInteriorRingN(std::size_t n) const
Get nth interior ring (hole).
Geometry * convexHull() const
Returns the smallest convex Polygon that contains all the points in the Geometry.
std::string getGeometryType() const
Return a string representation of this Geometry type.
Contains the Geometry interface hierarchy and supporting classes.
Definition IndexedNestedRingTester.h:26
GeometryTypeId
Geometry types.
Definition Geometry.h:65
Basic namespace for all GEOS functionalities.
Definition IndexedNestedRingTester.h:25