GEOS  3.3.3
FuzzyPointLocator.h
1 /**********************************************************************
2  * $Id: FuzzyPointLocator.h 3255 2011-03-01 17:56:10Z mloskot $
3  *
4  * GEOS - Geometry Engine Open Source
5  * http://geos.refractions.net
6  *
7  * Copyright (C) 2006 Refractions Research Inc.
8  *
9  * This is free software; you can redistribute and/or modify it under
10  * the terms of the GNU Lesser General Public Licence as published
11  * by the Free Software Foundation.
12  * See the COPYING file for more information.
13  *
14  ***********************************************************************
15  *
16  * Last port: operation/overlay/validate/FuzzyPointLocator.java rev. 1.1 (JTS-1.10)
17  *
18  **********************************************************************/
19 
20 #ifndef GEOS_OP_OVERLAY_FUZZYPOINTLOCATOR_H
21 #define GEOS_OP_OVERLAY_FUZZYPOINTLOCATOR_H
22 
23 #include <geos/export.h>
24 #include <geos/algorithm/PointLocator.h> // for composition
25 #include <geos/geom/Geometry.h> // for auto_ptr visibility of dtor
26 #include <geos/geom/Location.h> // for Location::Value enum
27 
28 #include <vector>
29 #include <memory> // for auto_ptr
30 
31 #ifdef _MSC_VER
32 #pragma warning(push)
33 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
34 #endif
35 
36 // Forward declarations
37 namespace geos {
38  namespace geom {
39  class Geometry;
40  class Coordinate;
41  }
42 }
43 
44 namespace geos {
45 namespace operation { // geos::operation
46 namespace overlay { // geos::operation::overlay
47 namespace validate { // geos::operation::overlay::validate
48 
59 class GEOS_DLL FuzzyPointLocator {
60 
61 public:
62 
63  FuzzyPointLocator(const geom::Geometry& geom, double nTolerance);
64 
65  geom::Location::Value getLocation(const geom::Coordinate& pt);
66 
67 private:
68 
69  const geom::Geometry& g;
70 
71  double tolerance;
72 
73  algorithm::PointLocator ptLocator;
74 
75  std::auto_ptr<geom::Geometry> linework;
76 
77  // this function has been obsoleted
78  std::auto_ptr<geom::Geometry> getLineWork(const geom::Geometry& geom);
79 
81  //
84  std::auto_ptr<geom::Geometry> extractLineWork(const geom::Geometry& geom);
85 
86  // Declare type as noncopyable
88  FuzzyPointLocator& operator=(const FuzzyPointLocator& rhs);
89 };
90 
91 } // namespace geos::operation::overlay::validate
92 } // namespace geos::operation::overlay
93 } // namespace geos::operation
94 } // namespace geos
95 
96 #ifdef _MSC_VER
97 #pragma warning(pop)
98 #endif
99 
100 #endif // ndef GEOS_OP_OVERLAY_FUZZYPOINTLOCATOR_H
101 
102 /**********************************************************************
103  * $Log$
104  **********************************************************************/
105