22 #ifndef GEOS_GEOMGRAPH_EDGEINTERSECTIONLIST_H
23 #define GEOS_GEOMGRAPH_EDGEINTERSECTIONLIST_H
25 #include <geos/export.h>
30 #include <geos/geomgraph/EdgeIntersection.h>
31 #include <geos/geom/Coordinate.h>
33 #include <geos/inline.h>
37 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
59 class GEOS_DLL EdgeIntersectionList {
64 using container = std::vector<EdgeIntersection>;
65 using const_iterator = container::const_iterator;
68 mutable container nodeMap;
74 EdgeIntersectionList(
const Edge* edge);
75 ~EdgeIntersectionList() =
default;
82 void add(
const geom::Coordinate& coord,
size_t segmentIndex,
double dist);
88 std::sort(nodeMap.begin(), nodeMap.end());
89 nodeMap.erase(std::unique(nodeMap.begin(), nodeMap.end()), nodeMap.end());
93 return nodeMap.begin();
101 bool isEmpty()
const;
102 bool isIntersection(
const geom::Coordinate& pt)
const;
117 void addSplitEdges(std::vector<Edge*>* edgeList);
119 Edge* createSplitEdge(
const EdgeIntersection* ei0,
const EdgeIntersection* ei1);
120 std::string print()
const;
123 std::ostream& operator<< (std::ostream&,
const EdgeIntersectionList&);
132 #endif // ifndef GEOS_GEOMGRAPH_EDGEINTERSECTIONLIST_H