00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef GEOS_GEOMGRAPH_EDGEINTERSECTIONLIST_H
00023 #define GEOS_GEOMGRAPH_EDGEINTERSECTIONLIST_H
00024
00025 #include <geos/export.h>
00026 #include <vector>
00027 #include <set>
00028 #include <string>
00029
00030 #include <geos/geomgraph/EdgeIntersection.h>
00031 #include <geos/geom/Coordinate.h>
00032
00033 #include <geos/inline.h>
00034
00035
00036 namespace geos {
00037 namespace geom {
00038 class Coordinate;
00039 }
00040 namespace geomgraph {
00041 class Edge;
00042 }
00043 }
00044
00045 namespace geos {
00046 namespace geomgraph {
00047
00048
00054 class GEOS_DLL EdgeIntersectionList{
00055 public:
00056 typedef std::set<EdgeIntersection *, EdgeIntersectionLessThen> container;
00057 typedef container::iterator iterator;
00058 typedef container::const_iterator const_iterator;
00059
00060 private:
00061 container nodeMap;
00062
00063 public:
00064
00065 Edge *edge;
00066 EdgeIntersectionList(Edge *edge);
00067 ~EdgeIntersectionList();
00068
00069
00070
00071
00072
00073
00074 EdgeIntersection* add(const geom::Coordinate& coord,
00075 int segmentIndex, double dist);
00076
00077 iterator begin() { return nodeMap.begin(); }
00078 iterator end() { return nodeMap.end(); }
00079 const_iterator begin() const { return nodeMap.begin(); }
00080 const_iterator end() const { return nodeMap.end(); }
00081
00082 bool isEmpty() const;
00083 bool isIntersection(const geom::Coordinate& pt) const;
00084
00085
00086
00087
00088 void addEndpoints();
00089
00098 void addSplitEdges(std::vector<Edge*> *edgeList);
00099
00100 Edge *createSplitEdge(EdgeIntersection *ei0, EdgeIntersection *ei1);
00101 std::string print() const;
00102
00103 };
00104
00105 }
00106 }
00107
00108
00109
00110
00111
00112 #endif // ifndef GEOS_GEOMGRAPH_EDGEINTERSECTIONLIST_H
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123