00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef GEOS_NODING_SINGLEINTERIORINTERSECTIONFINDER_H
00017 #define GEOS_NODING_SINGLEINTERIORINTERSECTIONFINDER_H
00018
00019 #include <geos/noding/SegmentIntersector.h>
00020 #include <geos/geom/Coordinate.h>
00021
00022 #include <vector>
00023
00024
00025 namespace geos {
00026 namespace algorithm {
00027 class LineIntersector;
00028 }
00029 namespace noding {
00030 class SegmentString;
00031 }
00032 }
00033
00034 namespace geos {
00035 namespace noding {
00036
00044 class SingleInteriorIntersectionFinder: public SegmentIntersector
00045 {
00046
00047 public:
00048
00055 SingleInteriorIntersectionFinder(algorithm::LineIntersector& newLi)
00056 :
00057 li(newLi),
00058 interiorIntersection(geom::Coordinate::getNull())
00059 {
00060 }
00061
00067 bool hasIntersection() const
00068 {
00069 return !interiorIntersection.isNull();
00070 }
00071
00078 const geom::Coordinate& getInteriorIntersection() const
00079 {
00080 return interiorIntersection;
00081 }
00082
00088 const std::vector<geom::Coordinate>& getIntersectionSegments() const
00089 {
00090 return intSegments;
00091 }
00092
00102 void processIntersections(
00103 SegmentString* e0, int segIndex0,
00104 SegmentString* e1, int segIndex1);
00105
00106 bool isDone() const
00107 {
00108 return !interiorIntersection.isNull();
00109 }
00110
00111 private:
00112 algorithm::LineIntersector& li;
00113 geom::Coordinate interiorIntersection;
00114 std::vector<geom::Coordinate> intSegments;
00115
00116
00117 SingleInteriorIntersectionFinder(const SingleInteriorIntersectionFinder& other);
00118 SingleInteriorIntersectionFinder& operator=(const SingleInteriorIntersectionFinder& rhs);
00119 };
00120
00121 }
00122 }
00123
00124 #endif // GEOS_NODING_SINGLEINTERIORINTERSECTIONFINDER_H
00125
00126
00127
00128