23 #ifndef GEOS_NODING_NODEDSEGMENTSTRING_H
24 #define GEOS_NODING_NODEDSEGMENTSTRING_H
26 #include <geos/inline.h>
27 #include <geos/export.h>
28 #include <geos/noding/NodableSegmentString.h>
29 #include <geos/geom/CoordinateSequence.h>
30 #include <geos/algorithm/LineIntersector.h>
31 #include <geos/noding/SegmentNode.h>
32 #include <geos/noding/SegmentNodeList.h>
33 #include <geos/noding/SegmentString.h>
34 #include <geos/geom/Coordinate.h>
40 #pragma warning(disable: 4251 4355)
64 getNodedSubstrings(II from, II too_far,
65 SegmentString::NonConstVect* resultEdgelist)
67 for(II i = from; i != too_far; ++i) {
76 getNodedSubstrings(C* segStrings,
77 SegmentString::NonConstVect* resultEdgelist)
79 getNodedSubstrings(segStrings->begin(), segStrings->end(), resultEdgelist);
82 static void getNodedSubstrings(
const SegmentString::NonConstVect& segStrings,
83 SegmentString::NonConstVect* resultEdgeList);
87 const SegmentString::NonConstVect& segStrings);
89 std::vector<geom::Coordinate> getNodedCoordinates();
110 , pts(ss->getCoordinates()->clone())
113 ~NodedSegmentString()
override =
default;
115 SegmentNodeList& getNodeList();
117 const SegmentNodeList& getNodeList()
const;
120 size()
const override
125 const geom::Coordinate& getCoordinate(std::size_t i)
const override;
130 bool isClosed()
const override;
132 std::ostream& print(std::ostream& os)
const override;
150 std::size_t segmentIndex, std::size_t geomIndex);
160 std::size_t segmentIndex,
161 std::size_t geomIndex, std::size_t intIndex);
171 std::size_t segmentIndex);
178 std::unique_ptr<geom::CoordinateSequence> pts;
192 #include "geos/noding/NodedSegmentString.inl"
A LineIntersector is an algorithm that can both test whether two line segments intersect and compute ...
Definition: LineIntersector.h:50
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:58
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:60
An interface for classes which support adding nodes to a segment string.
Definition: NodableSegmentString.h:37
Represents a list of contiguous line segments, and supports noding the segments.
Definition: NodedSegmentString.h:58
void addIntersection(algorithm::LineIntersector *li, std::size_t segmentIndex, std::size_t geomIndex, std::size_t intIndex)
Add an SegmentNode for intersection intIndex.
static SegmentString::NonConstVect * getNodedSubstrings(const SegmentString::NonConstVect &segStrings)
Returns allocated object.
NodedSegmentString(geom::CoordinateSequence *newPts, const void *newContext)
Creates a new segment string from a list of vertices.
Definition: NodedSegmentString.h:101
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 intersectio...
void addIntersection(const geom::Coordinate &intPt, std::size_t segmentIndex)
Add an SegmentNode for intersection intIndex.
geom::CoordinateSequence * getCoordinates() const override
Return a pointer to the CoordinateSequence associated with this SegmentString.
int getSegmentOctant(std::size_t index) const
Gets the octant of the segment starting at vertex index.
A list of the SegmentNode present along a NodedSegmentString.
Definition: SegmentNodeList.h:56
void addSplitEdges(std::vector< SegmentString * > &edgeList)
An interface for classes which represent a sequence of contiguous line segments.
Definition: SegmentString.h:46
Basic namespace for all GEOS functionalities.
Definition: Angle.h:26