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 private:
00048 algorithm::LineIntersector& li;
00049 geom::Coordinate interiorIntersection;
00050 std::vector<geom::Coordinate> intSegments;
00051
00052 public:
00053
00060 SingleInteriorIntersectionFinder(algorithm::LineIntersector& newLi)
00061 :
00062 li(newLi),
00063 interiorIntersection(geom::Coordinate::getNull())
00064 {
00065 }
00066
00072 bool hasIntersection() const
00073 {
00074 return interiorIntersection != geom::Coordinate::getNull();
00075 }
00076
00083 const geom::Coordinate& getInteriorIntersection() const
00084 {
00085 return interiorIntersection;
00086 }
00087
00093 const std::vector<geom::Coordinate>& getIntersectionSegments() const
00094 {
00095 return intSegments;
00096 }
00097
00107 void processIntersections(
00108 SegmentString* e0, int segIndex0,
00109 SegmentString* e1, int segIndex1);
00110
00111 bool isDone() const
00112 {
00113
00114 return interiorIntersection != geom::Coordinate::getNull();
00115 }
00116 };
00117
00118 }
00119 }
00120
00121 #endif // GEOS_NODING_SINGLEINTERIORINTERSECTIONFINDER_H
00122
00123
00124
00125