#include <geos.h>
Inheritance diagram for geos::Polygon:
Public Member Functions | |
Polygon (LinearRing *newShell, vector< Geometry * > *newHoles, const GeometryFactory *newFactory) | |
virtual Geometry * | clone () const |
Make a deep-copy of this Geometry. | |
CoordinateSequence * | getCoordinates () const |
Returns this Geometry vertices. Caller takes ownership of the returned object. | |
int | getNumPoints () const |
Returns the count of this Geometrys vertices. | |
int | getDimension () const |
Returns surface dimension (2). | |
int | getBoundaryDimension () const |
Returns 1 (Polygon boundary is a MultiLineString). | |
Geometry * | getBoundary () const |
Returns a MultiLineString. One LineString for the shell and one for each hole. Empty for an empty Polygon. | |
bool | isEmpty () const |
Returns whether or not the set of points in this Geometry is empty. | |
bool | isSimple () const |
Returns false if the Geometry not simple. | |
const LineString * | getExteriorRing () const |
Returns the exterior ring (shell). | |
int | getNumInteriorRing () const |
Returns number of interior rings (hole). | |
const LineString * | getInteriorRingN (int n) const |
Get nth interior ring (hole). | |
string | getGeometryType () const |
Return a string representation of this Geometry type. | |
virtual GeometryTypeId | getGeometryTypeId () const |
Return an integer representation of this Geometry type. | |
bool | equalsExact (const Geometry *other, double tolerance) const |
Returns true if the two Geometrys are exactly equal, up to a specified tolerance. | |
Geometry * | convexHull () const |
Returns the smallest convex Polygon that contains all the points in the Geometry. | |
void | normalize () |
Converts this Geometry to normal form (or canonical form). | |
const Coordinate * | getCoordinate () const |
Returns a vertex of this Geometry. | |
double | getArea () const |
Returns the area of this Geometry. | |
double | getLength () const |
Returns the perimeter of this Polygon . |
The shell and holes of the polygon are represented by LinearRings. In a valid polygon, holes may touch the shell or other holes at a single point. However, no sequence of touching holes may split the polygon into two pieces. The orientation of the rings in the polygon does not matter.
The shell and holes must conform to the assertions specified in the OpenGIS Simple Features Specification for SQL .
|
Constructs a
|
|
Returns the area of this Geometry.
Returns the area of this
Reimplemented from geos::Geometry. |
|
Returns the perimeter of this
Returns the perimeter of this
Reimplemented from geos::Geometry. |