GEOS
3.4.2
|
00001 /********************************************************************** 00002 * 00003 * GEOS - Geometry Engine Open Source 00004 * http://geos.osgeo.org 00005 * 00006 * Copyright (C) 2006 Refractions Research Inc. 00007 * 00008 * This is free software; you can redistribute and/or modify it under 00009 * the terms of the GNU Lesser General Public Licence as published 00010 * by the Free Software Foundation. 00011 * See the COPYING file for more information. 00012 * 00013 *********************************************************************** 00014 * 00015 * Last port: operation/overlay/validate/FuzzyPointLocator.java rev. 1.1 (JTS-1.10) 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> // for composition 00024 #include <geos/geom/Geometry.h> // for auto_ptr visibility of dtor 00025 #include <geos/geom/Location.h> // for Location::Value enum 00026 00027 #include <vector> 00028 #include <memory> // for auto_ptr 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 // Forward declarations 00036 namespace geos { 00037 namespace geom { 00038 class Geometry; 00039 class Coordinate; 00040 } 00041 } 00042 00043 namespace geos { 00044 namespace operation { // geos::operation 00045 namespace overlay { // geos::operation::overlay 00046 namespace validate { // geos::operation::overlay::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 // this function has been obsoleted 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 // Declare type as noncopyable 00086 FuzzyPointLocator(const FuzzyPointLocator& other); 00087 FuzzyPointLocator& operator=(const FuzzyPointLocator& rhs); 00088 }; 00089 00090 } // namespace geos::operation::overlay::validate 00091 } // namespace geos::operation::overlay 00092 } // namespace geos::operation 00093 } // namespace geos 00094 00095 #ifdef _MSC_VER 00096 #pragma warning(pop) 00097 #endif 00098 00099 #endif // ndef GEOS_OP_OVERLAY_FUZZYPOINTLOCATOR_H