00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef GEOS_OP_OVERLAY_FUZZYPOINTLOCATOR_H
00022 #define GEOS_OP_OVERLAY_FUZZYPOINTLOCATOR_H
00023
00024 #include <geos/algorithm/PointLocator.h>
00025 #include <geos/geom/Geometry.h>
00026 #include <geos/geom/Location.h>
00027
00028 #include <vector>
00029 #include <memory>
00030
00031
00032 namespace geos {
00033 namespace geom {
00034 class Geometry;
00035 class Coordinate;
00036 }
00037 }
00038
00039 namespace geos {
00040 namespace operation {
00041 namespace overlay {
00042
00053 class FuzzyPointLocator {
00054
00055 public:
00056
00057 FuzzyPointLocator(const geom::Geometry& geom, double nTolerance);
00058
00059 geom::Location::Value getLocation(const geom::Coordinate& pt);
00060
00061 private:
00062
00063 const geom::Geometry& g;
00064
00065 double tolerance;
00066
00067 algorithm::PointLocator ptLocator;
00068
00069 std::auto_ptr<geom::Geometry> linework;
00070
00071
00072 std::auto_ptr<geom::Geometry> getLineWork(const geom::Geometry& geom);
00073
00075
00078 std::auto_ptr<geom::Geometry> extractLineWork(const geom::Geometry& geom);
00079
00080
00081 };
00082
00083 }
00084 }
00085 }
00086
00087 #endif // ndef GEOS_OP_OVERLAY_FUZZYPOINTLOCATOR_H
00088
00089
00090
00091
00092