Utility methods for processing SegmentStrings. More...
#include <SegmentStringUtil.h>
Static Public Member Functions | |
static void | extractSegmentStrings (const geom::Geometry *g, SegmentString::ConstVect &segStr) |
Extracts all linear components from a given Geometry to SegmentStrings. |
Utility methods for processing SegmentStrings.
static void geos::noding::SegmentStringUtil::extractSegmentStrings | ( | const geom::Geometry * | g, | |
SegmentString::ConstVect & | segStr | |||
) | [inline, static] |
Extracts all linear components from a given Geometry to SegmentStrings.
The SegmentString data item is set to be the source Geometry.
geom | the geometry to extract from | |
segStr | a List of SegmentStrings (output parameter). Ownership of elements pushed to the vector is transferred to caller. Note that the CoordinateSequence associated with the returned SegmentString elements are allocated by this function, so must also be destroyed by caller. TODO: check if this can be optimized by leaving ownership of actual CoordinateSequence to the passed Geometry. |
References geos::geom::LineString::getCoordinates(), and geos::geom::util::LinearComponentExtracter::getLines().