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

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

#include <NodedSegmentString.h>

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

Public Member Functions

std::unique_ptr< geom::CoordinateSequencegetNodedCoordinates ()
 
bool hasNodes () const
 
 NodedSegmentString (geom::CoordinateSequence *newPts, bool constructZ, bool constructM, const void *newContext)
 Creates a new segment string from a list of vertices. More...
 
 NodedSegmentString (SegmentString *ss, bool constructZ, bool constructM)
 
SegmentNodeListgetNodeList ()
 
const SegmentNodeListgetNodeList () const
 
std::unique_ptr< geom::CoordinateSequencereleaseCoordinates ()
 
std::ostream & print (std::ostream &os) const override
 
void addIntersections (algorithm::LineIntersector *li, std::size_t segmentIndex, std::size_t geomIndex)
 Add SegmentNodes for one or both intersections found for a segment of an edge to the edge intersection list.
 
void addIntersection (algorithm::LineIntersector *li, std::size_t segmentIndex, std::size_t geomIndex, std::size_t intIndex)
 Add an SegmentNode for intersection intIndex. More...
 
template<typename CoordType >
void addIntersection (const CoordType &intPt, std::size_t segmentIndex)
 Add an SegmentNode for intersection intIndex. More...
 
- Public Member Functions inherited from geos::noding::NodableSegmentString
 NodableSegmentString (const void *newContext, geom::CoordinateSequence *newSeq)
 
- 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
 

Static Public Member Functions

template<class II >
static void getNodedSubstrings (II from, II too_far, SegmentString::NonConstVect *resultEdgelist)
 
template<class C >
static void getNodedSubstrings (C *segStrings, SegmentString::NonConstVect *resultEdgelist)
 
static void getNodedSubstrings (const SegmentString::NonConstVect &segStrings, SegmentString::NonConstVect *resultEdgeList)
 
static SegmentString::NonConstVect * getNodedSubstrings (const SegmentString::NonConstVect &segStrings)
 Returns allocated object.
 
- Static Public Member Functions inherited from geos::noding::SegmentString
static int getSegmentOctant (const SegmentString &ss, std::size_t index)
 

Additional Inherited Members

- Public Types inherited from geos::noding::SegmentString
typedef std::vector< const SegmentString * > ConstVect
 
typedef std::vector< SegmentString * > NonConstVect
 
- 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

◆ NodedSegmentString()

geos::noding::NodedSegmentString::NodedSegmentString ( geom::CoordinateSequence newPts,
bool  constructZ,
bool  constructM,
const void *  newContext 
)
inline

Creates a new segment string from a list of vertices.

Parameters
newPtsCoordinateSequence representing the string, ownership transferred.
constructZshould newly-constructed coordinates store Z values?
constructMshould newly-constructed coordinates store M values?
newContextthe user-defined data of this segment string (may be null)

Member Function Documentation

◆ addIntersection() [1/2]

void geos::noding::NodedSegmentString::addIntersection ( algorithm::LineIntersector li,
std::size_t  segmentIndex,
std::size_t  geomIndex,
std::size_t  intIndex 
)
inline

Add an SegmentNode for intersection intIndex.

An intersection that falls exactly on a vertex of the SegmentString is normalized to use the higher of the two possible segmentIndexes

References geos::algorithm::LineIntersector::getIntersection().

◆ addIntersection() [2/2]

template<typename CoordType >
void geos::noding::NodedSegmentString::addIntersection ( const CoordType &  intPt,
std::size_t  segmentIndex 
)
inline

Add an SegmentNode for intersection intIndex.

An intersection that falls exactly on a vertex of the edge is normalized to use the higher of the two possible segmentIndexes


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