GEOS  3.13.0dev
Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
geos::geom::LinearRing Class Reference

Models an OGC SFS LinearRing. A LinearRing is a LineString which is both closed and simple. More...

#include <LinearRing.h>

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

Public Member Functions

 LinearRing (const LinearRing &lr)
 
 LinearRing (CoordinateSequence::Ptr &&points, const GeometryFactory &newFactory)
 Constructs a LinearRing with the given points. More...
 
std::unique_ptr< LinearRingclone () const
 
int getBoundaryDimension () const override
 Returns Dimension.FALSE, since by definition LinearRings do not have a boundary. More...
 
bool isClosed () const override
 
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 setPoints (const CoordinateSequence *cl)
 
std::unique_ptr< LinearRingreverse () const
 
void orient (bool isCW)
 
- Public Member Functions inherited from geos::geom::LineString
std::unique_ptr< LineStringclone () const
 Creates and returns a full copy of this LineString object (including all coordinates contained by it) 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.
 
double getLength () const override
 Returns the length of this Geometry.
 
std::unique_ptr< LineStringreverse () const
 

Static Public Attributes

static const unsigned int MINIMUM_VALID_SIZE = 3
 The minimum number of vertices allowed in a valid non-empty ring. Empty rings with 0 vertices are also valid.
 

Protected Member Functions

int getSortIndex () const override
 
LinearRingcloneImpl () const override
 Make a deep-copy of this Geometry.
 
LinearRingreverseImpl () const override
 Make a geometry with coordinates in reverse order.
 
- Protected Member Functions inherited from geos::geom::LineString
 LineString (const LineString &ls)
 
 LineString (CoordinateSequence::Ptr &&pts, const GeometryFactory &newFactory)
 Constructs a LineString taking ownership the given CoordinateSequence.
 
LineStringcloneImpl () const override
 Make a deep-copy of this Geometry.
 
LineStringreverseImpl () const override
 Make a geometry with coordinates in reverse order.
 
int getSortIndex () const override
 
void geometryChangedAction () override
 Notifies this Geometry that its Coordinates have been changed by an external party.
 

Additional Inherited Members

- Public Types inherited from geos::geom::LineString
typedef std::vector< const LineString * > ConstVect
 A vector of const LineString pointers.
 

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 ring must not self-intersect. Either orientation of the ring is allowed.

A ring must have either 0 or 3 or more points. The first and last points must be equal (in 2D). If these conditions are not met, the constructors throw an geos::util::IllegalArgumentException A ring with 3 points is invalid, because it is collapsed and thus has a self-intersection. It is allowed to be constructed so that it can be represented, and repaired if needed.

Constructor & Destructor Documentation

◆ LinearRing()

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

Constructs a LinearRing with the given points.

Parameters
pointspoints 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.
newFactorythe GeometryFactory used to create this geometry

Member Function Documentation

◆ getBoundaryDimension()

int geos::geom::LinearRing::getBoundaryDimension ( ) const
overridevirtual

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

Returns
Dimension::False

Implements geos::geom::Geometry.


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