21#include <geos/export.h>
29#include <geos/noding/SegmentNode.h>
33#pragma warning(disable: 4251)
54class GEOS_DLL SegmentNodeList {
61 mutable std::vector<SegmentNode> nodeMap;
62 mutable bool ready =
false;
78 void checkSplitEdgesCorrectness(
const std::vector<SegmentString*>& splitEdges)
const;
100 std::unique_ptr<geom::CoordinateSequence> createSplitEdgePts(
const SegmentNode* ei0,
const SegmentNode* ei1)
const;
110 void addCollapsedNodes();
116 void findCollapsesFromExistingVertices(
117 std::vector<std::size_t>& collapsedVertexIndexes)
const;
126 void findCollapsesFromInsertedNodes(
127 std::vector<std::size_t>& collapsedVertexIndexes)
const;
130 size_t& collapsedVertexIndex);
137 SegmentNodeList(
const SegmentNodeList& other) =
delete;
138 SegmentNodeList& operator=(
const SegmentNodeList& rhs) =
delete;
140 friend std::ostream& operator<< (std::ostream& os,
const SegmentNodeList& l);
142 using container =
decltype(nodeMap);
143 using iterator = container::iterator;
144 using const_iterator = container::const_iterator;
149 : constructZ(p_constructZ)
150 , constructM(p_constructM)
153 ~SegmentNodeList() =
default;
161 bool getConstructZ()
const {
165 bool getConstructM()
const {
176 template<
typename CoordType>
177 void add(
const CoordType& intPt, std::size_t segmentIndex) {
179 nodeMap.emplace_back(edge, intPt, segmentIndex,
reinterpret_cast<const SegmentString&
>(edge).getSegmentOctant(segmentIndex));
188 return nodeMap.size();
193 return nodeMap.begin();
196 const_iterator begin()
const {
198 return nodeMap.begin();
203 return nodeMap.end();
206 const_iterator end()
const {
208 return nodeMap.end();
The internal representation of a list of coordinates inside a Geometry.
Definition CoordinateSequence.h:56
Represents a list of contiguous line segments, and supports noding the segments.
Definition NodedSegmentString.h:58
A list of the SegmentNode present along a NodedSegmentString.
Definition SegmentNodeList.h:54
std::unique_ptr< geom::CoordinateSequence > getSplitCoordinates()
void addSplitEdges(std::vector< SegmentString * > &edgeList)
void add(const CoordType &intPt, std::size_t segmentIndex)
Definition SegmentNodeList.h:177
size_t size() const
Return the number of nodes in this list.
Definition SegmentNodeList.h:185
Represents an intersection point between two NodedSegmentString.
Definition SegmentNode.h:38
An interface for classes which represent a sequence of contiguous line segments.
Definition SegmentString.h:47
Classes to compute nodings for arrangements of line segments and line segment sequences.
Definition InvalidSegmentDetector.h:25
Basic namespace for all GEOS functionalities.
Definition geos.h:39