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 #ifdef _MSC_VER
00036 #pragma warning(push)
00037 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
00038 #endif
00039
00040
00041 namespace geos {
00042 namespace geom {
00043 class Coordinate;
00044 }
00045 namespace geomgraph {
00046 class Edge;
00047 }
00048 }
00049
00050 namespace geos {
00051 namespace geomgraph {
00052
00053
00059 class GEOS_DLL EdgeIntersectionList{
00060 public:
00061 typedef std::set<EdgeIntersection *, EdgeIntersectionLessThen> container;
00062 typedef container::iterator iterator;
00063 typedef container::const_iterator const_iterator;
00064
00065 private:
00066 container nodeMap;
00067
00068 public:
00069
00070 Edge *edge;
00071 EdgeIntersectionList(Edge *edge);
00072 ~EdgeIntersectionList();
00073
00074
00075
00076
00077
00078
00079 EdgeIntersection* add(const geom::Coordinate& coord,
00080 int segmentIndex, double dist);
00081
00082 iterator begin() { return nodeMap.begin(); }
00083 iterator end() { return nodeMap.end(); }
00084 const_iterator begin() const { return nodeMap.begin(); }
00085 const_iterator end() const { return nodeMap.end(); }
00086
00087 bool isEmpty() const;
00088 bool isIntersection(const geom::Coordinate& pt) const;
00089
00090
00091
00092
00093 void addEndpoints();
00094
00103 void addSplitEdges(std::vector<Edge*> *edgeList);
00104
00105 Edge *createSplitEdge(EdgeIntersection *ei0, EdgeIntersection *ei1);
00106 std::string print() const;
00107
00108 };
00109
00110 std::ostream& operator<< (std::ostream&, const EdgeIntersectionList&);
00111
00112 }
00113 }
00114
00115 #ifdef _MSC_VER
00116 #pragma warning(pop)
00117 #endif
00118
00119 #endif // ifndef GEOS_GEOMGRAPH_EDGEINTERSECTIONLIST_H
00120