21#include <geos/export.h>
22#include <geos/geom/Coordinate.h>
23#include <geos/noding/SegmentPointComparator.h>
24#include <geos/noding/SegmentString.h>
45 friend std::ostream& operator<< (std::ostream& os,
const SegmentNode& n);
65 template<
typename CoordType>
67 const CoordType& nCoord,
68 std::size_t nSegmentIndex,
int nSegmentOctant)
69 : segmentOctant(nSegmentOctant)
71 , segmentIndex(nSegmentIndex)
74 assert(segmentIndex < ss.size());
75 isInteriorVar = !coord.equals2D(ss.getCoordinate(segmentIndex));
91 bool isEndPoint(
unsigned int maxSegmentIndex)
const
93 if(segmentIndex == 0 && ! isInteriorVar) {
96 if(segmentIndex == maxSegmentIndex) {
118 if (coord.equals2D(other.
coord)) {
127 if (!isInteriorVar)
return -1;
128 if (!other.isInteriorVar)
return 1;
130 return SegmentPointComparator::compare(
131 segmentOctant, coord,
139struct GEOS_DLL SegmentNodeLT {
141 operator()(SegmentNode* s1, SegmentNode* s2)
const
143 return s1->compareTo(*s2) < 0;
147 operator()(
const SegmentNode& s1,
const SegmentNode& s2)
const
149 return s1.compareTo(s2) < 0;
Represents an intersection point between two NodedSegmentString.
Definition SegmentNode.h:38
int compareTo(const SegmentNode &other) const
Definition SegmentNode.h:109
std::size_t segmentIndex
the index of the containing line segment in the parent edge
Definition SegmentNode.h:51
geom::CoordinateXYZM coord
the point of intersection (own copy)
Definition SegmentNode.h:48
bool isInterior() const
Return true if this Node is internal (not on the boundary) of the corresponding segment....
Definition SegmentNode.h:86
SegmentNode(const SegmentString &ss, const CoordType &nCoord, std::size_t nSegmentIndex, int nSegmentOctant)
Definition SegmentNode.h:66
An interface for classes which represent a sequence of contiguous line segments.
Definition SegmentString.h:47
Basic namespace for all GEOS functionalities.
Definition geos.h:39