Models an OGC SFS LinearRing
.
More...
#include <LinearRing.h>
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 Geometry * | clone () 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) |
Geometry * | reverse () const |
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
geos::geom::LinearRing::LinearRing | ( | CoordinateSequence * | points, | |
const GeometryFactory * | newFactory | |||
) |
Constructs a LinearRing
with the given points.
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 |
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).
Reimplemented from geos::geom::LineString.
int geos::geom::LinearRing::getBoundaryDimension | ( | ) | const [virtual] |
Returns Dimension.FALSE
, since by definition LinearRings do not have a boundary.
Reimplemented from geos::geom::LineString.
bool geos::geom::LinearRing::isSimple | ( | ) | const [virtual] |
Returns true
, since by definition LinearRings are always simple.
true
Reimplemented from geos::geom::Geometry.
Geometry* geos::geom::LinearRing::reverse | ( | ) | const |
Creates a LineString whose coordinates are in the reverse order of this objects
Reimplemented from geos::geom::LineString.