00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef GEOS_OP_OVERLAY_FUZZYPOINTLOCATOR_H
00020 #define GEOS_OP_OVERLAY_FUZZYPOINTLOCATOR_H
00021
00022 #include <geos/export.h>
00023 #include <geos/algorithm/PointLocator.h>
00024 #include <geos/geom/Geometry.h>
00025 #include <geos/geom/Location.h>
00026
00027 #include <vector>
00028 #include <memory>
00029
00030 #ifdef _MSC_VER
00031 #pragma warning(push)
00032 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
00033 #endif
00034
00035
00036 namespace geos {
00037 namespace geom {
00038 class Geometry;
00039 class Coordinate;
00040 }
00041 }
00042
00043 namespace geos {
00044 namespace operation {
00045 namespace overlay {
00046 namespace validate {
00047
00058 class GEOS_DLL FuzzyPointLocator {
00059
00060 public:
00061
00062 FuzzyPointLocator(const geom::Geometry& geom, double nTolerance);
00063
00064 geom::Location::Value getLocation(const geom::Coordinate& pt);
00065
00066 private:
00067
00068 const geom::Geometry& g;
00069
00070 double tolerance;
00071
00072 algorithm::PointLocator ptLocator;
00073
00074 std::auto_ptr<geom::Geometry> linework;
00075
00076
00077 std::auto_ptr<geom::Geometry> getLineWork(const geom::Geometry& geom);
00078
00080
00083 std::auto_ptr<geom::Geometry> extractLineWork(const geom::Geometry& geom);
00084
00085
00086 FuzzyPointLocator(const FuzzyPointLocator& other);
00087 FuzzyPointLocator& operator=(const FuzzyPointLocator& rhs);
00088 };
00089
00090 }
00091 }
00092 }
00093 }
00094
00095 #ifdef _MSC_VER
00096 #pragma warning(pop)
00097 #endif
00098
00099 #endif // ndef GEOS_OP_OVERLAY_FUZZYPOINTLOCATOR_H