GEOS  3.13.0dev
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | Friends | List of all members
geos::noding::SegmentString Class Reference

An interface for classes which represent a sequence of contiguous line segments. More...

#include <SegmentString.h>

Inheritance diagram for geos::noding::SegmentString:
geos::noding::BasicSegmentString geos::noding::NodableSegmentString geos::noding::NodedSegmentString

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. More...
 
const void * getData () const
 Gets the user-defined data for this segment string. More...
 
void setData (const void *data)
 Sets the user-defined data for this segment string. More...
 
std::size_t size () const
 
template<typename CoordType = geom::Coordinate>
const CoordType & getCoordinate (std::size_t i) const
 
const geom::CoordinateSequencegetCoordinates () const
 Return a pointer to the CoordinateSequence associated with this SegmentString. More...
 
geom::CoordinateSequencegetCoordinates ()
 
int getSegmentOctant (std::size_t index) const
 Gets the octant of the segment starting at vertex index. More...
 
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::CoordinateSequenceseq
 

Friends

std::ostream & operator<< (std::ostream &os, const SegmentString &ss)
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ SegmentString()

geos::noding::SegmentString::SegmentString ( const void *  newContext,
geom::CoordinateSequence newSeq 
)
inline

Construct a SegmentString.

Parameters
newContextthe context associated to this SegmentString
newSeqcoordinates of this SegmentString

Member Function Documentation

◆ getCoordinates()

const geom::CoordinateSequence* geos::noding::SegmentString::getCoordinates ( void  ) const
inline

Return a pointer to the CoordinateSequence associated with this SegmentString.

Note
The CoordinateSequence is owned by this SegmentString!

◆ getData()

const void* geos::noding::SegmentString::getData ( ) const
inline

Gets the user-defined data for this segment string.

Returns
the user-defined data

◆ getSegmentOctant()

int geos::noding::SegmentString::getSegmentOctant ( std::size_t  index) const
inline

Gets the octant of the segment starting at vertex index.

Parameters
indexthe index of the vertex starting the segment. Must not be the last index in the vertex list
Returns
the octant of the segment at the vertex

◆ setData()

void geos::noding::SegmentString::setData ( const void *  data)
inline

Sets the user-defined data for this segment string.

Parameters
dataan Object containing user-defined data

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