GEOS 3.14.0dev
|
An interface for classes which represent a sequence of contiguous line segments. More...
#include <SegmentString.h>
Public Types | |
typedef std::vector< const SegmentString * > | ConstVect |
typedef std::vector< SegmentString * > | NonConstVect |
Public Member Functions | |
SegmentString (const void *newContext, geom::CoordinateSequence *newSeq) | |
Construct a SegmentString. | |
const void * | getData () const |
Gets the user-defined data for this segment string. | |
void | setData (const void *data) |
Sets the user-defined data for this segment string. | |
std::size_t | size () const |
template<typename CoordType = geom::Coordinate> | |
const CoordType & | getCoordinate (std::size_t i) const |
const geom::CoordinateSequence * | getCoordinates () const |
Return a pointer to the CoordinateSequence associated with this SegmentString. | |
geom::CoordinateSequence * | getCoordinates () |
int | getSegmentOctant (std::size_t index) const |
Gets the octant of the segment starting at vertex index. | |
const geom::CoordinateXY & | nextInRing (std::size_t index) const |
const geom::CoordinateXY & | prevInRing (std::size_t index) const |
bool | isClosed () const |
virtual std::ostream & | print (std::ostream &os) const |
Static Public Member Functions | |
static int | getSegmentOctant (const SegmentString &ss, std::size_t index) |
Protected Attributes | |
geom::CoordinateSequence * | seq |
Friends | |
std::ostream & | operator<< (std::ostream &os, const SegmentString &ss) |
An interface for classes which represent a sequence of contiguous line segments.
SegmentStrings can carry a context object, which is useful for preserving topological or parentage information.
|
inline |
Construct a SegmentString.
newContext | the context associated to this SegmentString |
newSeq | coordinates of this SegmentString |
|
inline |
Return a pointer to the CoordinateSequence associated with this SegmentString.
|
inline |
Gets the user-defined data for this segment string.
|
inline |
Gets the octant of the segment starting at vertex index.
index | the index of the vertex starting the segment. Must not be the last index in the vertex list |
|
inline |
Gets the next vertex in a ring from a vertex index.
index | the vertex index |
|
inline |
Gets the previous vertex in a ring from a vertex index.
index | the vertex index |
|
inline |
Sets the user-defined data for this segment string.
data | an Object containing user-defined data |