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