GEOS  3.14.0dev
Public Member Functions | List of all members
geos::noding::BasicSegmentString Class Reference

Represents a list of contiguous line segments, and supports noding the segments. More...

#include <BasicSegmentString.h>

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

Public Member Functions

 BasicSegmentString (geom::CoordinateSequence *newPts, const void *newContext)
 Construct a BasicSegmentString. More...
 
std::ostream & print (std::ostream &os) const override
 
int getSegmentOctant (std::size_t index) const
 Gets the octant of the segment starting at vertex index. More...
 
- Public Member Functions inherited from geos::noding::SegmentString
 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...
 
const geom::CoordinateXY & nextInRing (std::size_t index) const
 
const geom::CoordinateXY & prevInRing (std::size_t index) const
 
bool isClosed () const
 

Additional Inherited Members

- Public Types inherited from geos::noding::SegmentString
typedef std::vector< const SegmentString * > ConstVect
 
typedef std::vector< SegmentString * > NonConstVect
 
- Static Public Member Functions inherited from geos::noding::SegmentString
static int getSegmentOctant (const SegmentString &ss, std::size_t index)
 
- Protected Attributes inherited from geos::noding::SegmentString
geom::CoordinateSequenceseq
 

Detailed Description

Represents a list of contiguous line segments, and supports noding the segments.

The line segments are represented by an array of Coordinates. Intended to optimize the noding of contiguous segments by reducing the number of allocated objects. SegmentStrings can carry a context object, which is useful for preserving topological or parentage information. All noded substrings are initialized with the same context object.

Constructor & Destructor Documentation

◆ BasicSegmentString()

geos::noding::BasicSegmentString::BasicSegmentString ( geom::CoordinateSequence newPts,
const void *  newContext 
)
inline

Construct a BasicSegmentString.

Parameters
newPtsCoordinateSequence representing the string, externally owned
newContextthe context associated to this SegmentString

Member Function Documentation

◆ getSegmentOctant()

int geos::noding::BasicSegmentString::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

References geos::noding::Octant::octant().


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