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) // warning C4355: 'this' : used in base member initializer list 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);
86 static SegmentString::NonConstVect* getNodedSubstrings(
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;
127 geom::CoordinateSequence* getCoordinates()
const override;
128 geom::CoordinateSequence* releaseCoordinates();
130 bool isClosed()
const override;
132 std::ostream& print(std::ostream& os)
const override;
142 int getSegmentOctant(std::size_t index)
const;
149 void addIntersections(algorithm::LineIntersector* li,
150 std::size_t segmentIndex, std::size_t geomIndex);
159 void addIntersection(algorithm::LineIntersector* li,
160 std::size_t segmentIndex,
161 std::size_t geomIndex, std::size_t intIndex);
170 void addIntersection(
const geom::Coordinate& intPt,
171 std::size_t segmentIndex);
176 SegmentNodeList nodeList;
178 std::unique_ptr<geom::CoordinateSequence> pts;
180 static int safeOctant(
const geom::Coordinate& p0,
const geom::Coordinate& p1);
192 #include "geos/noding/NodedSegmentString.inl" 195 #endif // GEOS_NODING_NODEDSEGMENTSTRING_H An interface for classes which support adding nodes to a segment string.
Definition: NodableSegmentString.h:37
An interface for classes which represent a sequence of contiguous line segments.
Definition: SegmentString.h:46
Represents a list of contiguous line segments, and supports noding the segments.
Definition: NodedSegmentString.h:58
void addSplitEdges(std::vector< SegmentString *> &edgeList)
Basic namespace for all GEOS functionalities.
Definition: Angle.h:26
NodedSegmentString(geom::CoordinateSequence *newPts, const void *newContext)
Creates a new segment string from a list of vertices.
Definition: NodedSegmentString.h:101
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:58