GEOS  3.14.0dev
Public Types | Public Member Functions | Protected Member Functions | Friends | List of all members
geos::geom::Polygon Class Reference

Represents a linear polygon, which may include holes. More...

#include <geos.h>

Inherits geos::geom::SurfaceImpl< RingType >.

Public Types

typedef std::vector< const Polygon * > ConstVect
 A vector of const Polygon pointers.
 

Public Member Functions

std::unique_ptr< CoordinateSequencegetCoordinates () const override
 Returns this Geometry vertices. Caller takes ownership of the returned object.
 
std::unique_ptr< Polygonclone () const
 
std::unique_ptr< GeometrygetBoundary () const override
 Computes the boundary of this geometry. More...
 
std::string getGeometryType () const override
 Return a string representation of this Geometry type.
 
GeometryTypeId getGeometryTypeId () const override
 Return an integer representation of this Geometry type.
 
void normalize () override
 
std::unique_ptr< Polygonreverse () const
 
double getArea () const override
 Returns the area of this Geometry.
 
bool isRectangle () const override
 Polygon overrides to check for actual rectangle.
 
void orientRings (bool exteriorCW)
 Apply a ring ordering convention to this polygon, with interior rings having an opposite orientation to the specified exterior orientation. More...
 

Protected Member Functions

PolygoncloneImpl () const override
 Make a deep-copy of this Geometry.
 
PolygonreverseImpl () const override
 Make a geometry with coordinates in reverse order.
 
int getSortIndex () const override
 

Friends

class GeometryFactory
 

Detailed Description

Represents a linear polygon, which may include holes.

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 .

Member Function Documentation

◆ clone()

std::unique_ptr<Polygon> geos::geom::Polygon::clone ( ) const
inline

Creates and returns a full copy of this Polygon object. (including all coordinates contained by it).

Returns
a clone of this instance

◆ getBoundary()

std::unique_ptr<Geometry> geos::geom::Polygon::getBoundary ( ) const
overridevirtual

Computes the boundary of this geometry.

Returns
a lineal geometry (which may be empty)
See also
Geometry::getBoundary

Implements geos::geom::Geometry.

◆ normalize()

void geos::geom::Polygon::normalize ( )
overridevirtual

Reorganizes this Geometry into normal form (or canonical form). Starting point of rings is lower left, collections are ordered by geometry type, etc.

Implements geos::geom::Geometry.

◆ orientRings()

void geos::geom::Polygon::orientRings ( bool  exteriorCW)

Apply a ring ordering convention to this polygon, with interior rings having an opposite orientation to the specified exterior orientation.

Parameters
exteriorCWshould exterior ring be clockwise?

The documentation for this class was generated from the following file: