- Main Page
- Namespaces
- Classes
- Files
- Related Pages

- Class List
- Class Hierarchy
- Class Members

# geos::noding::SegmentString Class Reference

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

`#include <SegmentString.h>`

List of all members.

## Public Types
typedef std::vector< const SegmentString * > | ConstVect
typedef std::vector < SegmentString * > | NonConstVect
## Public Member Functions
void | testInvariant () const
| SegmentString (geom::CoordinateSequence *newPts, const void *newContext)
| Construct a SegmentString.
const void * | getData () const
const SegmentNodeList & | getNodeList () const
SegmentNodeList & | getNodeList ()
unsigned int | size () const
const geom::Coordinate & | getCoordinate (unsigned int i) const
geom::CoordinateSequence * | getCoordinates () const
| Return a pointer to the CoordinateSequence associated with this SegmentString.
void | notifyCoordinatesChange () const
| Notify this object that the CoordinateSequence associated with it might have been updated.
void | setIsolated (bool isIsolated)
bool | isIsolated () const
bool | isClosed () const
int | getSegmentOctant (unsigned int index) const
| Gets the octant of the segment starting at vertex `index`.
void | addIntersections (algorithm::LineIntersector *li, unsigned int segmentIndex, int geomIndex)
| Add {SegmentNode}s for one or both intersections found for a segment of an edge to the edge intersection list.
void | addIntersection (algorithm::LineIntersector *li, unsigned int segmentIndex, int geomIndex, int intIndex)
| Add an SegmentNode for intersection intIndex.
void | addIntersection (const geom::Coordinate &intPt, unsigned int segmentIndex)
| Add an SegmentNode for intersection intIndex.
## Static Public Member Functions
static void | getNodedSubstrings (const SegmentString::NonConstVect &segStrings, SegmentString::NonConstVect *resultEdgeList)
static SegmentString::NonConstVect * | getNodedSubstrings (const SegmentString::NonConstVect &segStrings)
## Friends
std::ostream & | operator<< (std::ostream &os, const SegmentString &ss)

## Detailed Description

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

The line segments are represented by a CoordinateSequence.

TODO: This should be changed to use a vector of Coordinate, 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.

Final class.

Last port: noding/SegmentString.java rev. 1.5 (JTS-1.7)

## Constructor & Destructor Documentation

geos::noding::SegmentString::SegmentString | ( | geom::CoordinateSequence * | newPts,
|  | const void * | newContext |
| ) |  |  |

Construct a SegmentString.

Parameters:

  | newPts | CoordinateSequence representing the string, externally owned
  | newContext | the context associated to this SegmentString

## Member Function Documentation

geom::CoordinateSequence* geos::noding::SegmentString::getCoordinates | ( |  | ) | const

Return a pointer to the CoordinateSequence associated with this SegmentString.

Note that the CoordinateSequence is not owned by this SegmentString!

void geos::noding::SegmentString::notifyCoordinatesChange | ( |  | ) | const

Notify this object that the CoordinateSequence associated with it might have been updated.

This must be called so that the SegmentString object makes all the necessary checks and updates to verify consistency

int geos::noding::SegmentString::getSegmentOctant | ( | unsigned int | index | ) | const

Gets the octant of the segment starting at vertex `index`.

Parameters:

  | index | the 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

void geos::noding::SegmentString::addIntersection | ( | algorithm::LineIntersector * | li,
|  | unsigned int | segmentIndex,
|  | int | geomIndex,
|  | int | intIndex |
| ) |  |  |

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

void geos::noding::SegmentString::addIntersection | ( | const geom::Coordinate & | intPt,
|  | unsigned int | segmentIndex |
| ) |  |  |

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:

- SegmentString.h