Public Member Functions

geos::geom::LinearRing Class Reference

Models an OGC SFS LinearRing. More...

#include <LinearRing.h>

Inheritance diagram for geos::geom::LinearRing:
geos::geom::LineString geos::geom::Geometry

List of all members.

Public Member Functions

 LinearRing (const LinearRing &lr)
 LinearRing (CoordinateSequence *points, const GeometryFactory *newFactory)
 Constructs a LinearRing with the given points.
 LinearRing (CoordinateSequence::AutoPtr points, const GeometryFactory *newFactory)
 Hopefully cleaner version of the above.
virtual Geometryclone () const
int getBoundaryDimension () const
 Returns Dimension.FALSE, since by definition LinearRings do not have a boundary.
bool isSimple () const
 Returns true, since by definition LinearRings are always simple.
std::string getGeometryType () const
 Return a string representation of this Geometry type.
virtual GeometryTypeId getGeometryTypeId () const
 Return an integer representation of this Geometry type.
void setPoints (CoordinateSequence *cl)
Geometryreverse () const

Detailed Description

Models an OGC SFS LinearRing.

A LinearRing is a LineString which is both closed and simple. In other words, the first and last coordinate in the ring must be equal, and the interior of the ring must not self-intersect. Either orientation of the ring is allowed.

A ring must have either 0 or 4 or more points. The first and last points must be equal (in 2D). If these conditions are not met, the constructors throw an IllegalArgumentException


Constructor & Destructor Documentation

geos::geom::LinearRing::LinearRing ( CoordinateSequence points,
const GeometryFactory newFactory 
)

Constructs a LinearRing with the given points.

Parameters:
points points forming a closed and simple linestring, or null or an empty array to create the empty geometry. This array must not contain null elements. If not null LinearRing will take ownership of points.
newFactory the GeometryFactory used to create this geometry

Member Function Documentation

virtual Geometry* geos::geom::LinearRing::clone (  )  const [inline, virtual]

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

Returns:
a clone of this instance

Reimplemented from geos::geom::LineString.

int geos::geom::LinearRing::getBoundaryDimension (  )  const [virtual]

Returns Dimension.FALSE, since by definition LinearRings do not have a boundary.

Returns:
Dimension::False

Reimplemented from geos::geom::LineString.

bool geos::geom::LinearRing::isSimple (  )  const [virtual]

Returns true, since by definition LinearRings are always simple.

Returns:
true
See also:
Geometry::isSimple

Reimplemented from geos::geom::Geometry.

Geometry* geos::geom::LinearRing::reverse (  )  const

Creates a LineString whose coordinates are in the reverse order of this objects

Returns:
a LineString with coordinates in the reverse order

Reimplemented from geos::geom::LineString.


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