00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef GEOS_GEOMGRAPH_EDGEINTERSECTION_H
00019 #define GEOS_GEOMGRAPH_EDGEINTERSECTION_H
00020
00021 #include <string>
00022
00023 #include <geos/geom/Coordinate.h>
00024
00025 #include <geos/inline.h>
00026
00027
00028 namespace geos {
00029 namespace geomgraph {
00030
00031 class EdgeIntersection {
00032 public:
00033 geom::Coordinate coord;
00034 int segmentIndex;
00035 double dist;
00036 EdgeIntersection(const geom::Coordinate& newCoord, int newSegmentIndex, double newDist);
00037 virtual ~EdgeIntersection();
00038 int compare(int newSegmentIndex, double newDist) const;
00039 bool isEndPoint(int maxSegmentIndex);
00040 std::string print() const;
00041 int compareTo(const EdgeIntersection *) const;
00042 };
00043
00044 struct EdgeIntersectionLessThen {
00045 bool operator()(const EdgeIntersection *ei1,
00046 const EdgeIntersection *ei2) const
00047 {
00048 if ( ei1->segmentIndex<ei2->segmentIndex ||
00049 ( ei1->segmentIndex==ei2->segmentIndex &&
00050 ei1->dist<ei2->dist ) ) return true;
00051 return false;
00052 }
00053 };
00054
00055
00056 }
00057 }
00058
00059
00060
00061
00062
00063 #endif // ifndef GEOS_GEOMGRAPH_EDGEINTERSECTION_H
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074