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:

## Public Member Functions

| LinearRing (const LinearRing &lr)
| LinearRing (CoordinateSequence::Ptr &&points, const GeometryFactory &newFactory)
| Constructs a LinearRing with the given points.
std::unique_ptr< LinearRing > | clone () const
int | getBoundaryDimension () const override
| Returns `Dimension.FALSE`, since by definition LinearRings do not have a boundary.
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< LinearRing > | reverse () const
void | orient (bool isCW)
Public Member Functions inherited from geos::geom::LineString
std::unique_ptr< LineString > | clone () const
| Creates and returns a full copy of this `LineString` object (including all coordinates contained by it).
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.
bool | isCurved () const override
std::unique_ptr< LineString > | reverse () 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
LinearRing * | cloneImpl () const override
| Make a deep-copy of this Geometry.
LinearRing * | reverseImpl () 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.
LineString * | cloneImpl () const override
| Make a deep-copy of this Geometry.
LineString * | reverseImpl () 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

  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

References cloneImpl().

## Member Function Documentation

## cloneImpl()

LinearRing * geos::geom::LinearRing::cloneImpl | ( |  | ) | const

inline override protected virtual

Make a deep-copy of this Geometry.

Implements geos::geom::Geometry.

Referenced by LinearRing().

## getBoundaryDimension()

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

override virtual

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

Returns
  Dimension::False

Implements geos::geom::Geometry.

## getGeometryType()

std::string geos::geom::LinearRing::getGeometryType | ( |  | ) | const

override virtual

Return a string representation of this Geometry type.

Implements geos::geom::Geometry.

## getGeometryTypeId()

GeometryTypeId geos::geom::LinearRing::getGeometryTypeId | ( |  | ) | const

override virtual

Return an integer representation of this Geometry type.

Implements geos::geom::Geometry.

References reverseImpl().

## getSortIndex()

int geos::geom::LinearRing::getSortIndex | ( |  | ) | const

inline override protected virtual

Implements geos::geom::Geometry.

## reverseImpl()

LinearRing * geos::geom::LinearRing::reverseImpl | ( |  | ) | const

override protected virtual

Make a geometry with coordinates in reverse order.

Implements geos::geom::Geometry.

Referenced by getGeometryTypeId().

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

- LinearRing.h