GEOS 3.9.1
FuzzyPointLocator.h
1/**********************************************************************
2 *
3 * GEOS - Geometry Engine Open Source
4 * http://geos.osgeo.org
5 *
6 * Copyright (C) 2006 Refractions Research Inc.
7 *
8 * This is free software; you can redistribute and/or modify it under
9 * the terms of the GNU Lesser General Public Licence as published
10 * by the Free Software Foundation.
11 * See the COPYING file for more information.
12 *
13 ***********************************************************************
14 *
15 * Last port: operation/overlay/validate/FuzzyPointLocator.java rev. 1.1 (JTS-1.10)
16 *
17 **********************************************************************/
18
19#ifndef GEOS_OP_OVERLAY_FUZZYPOINTLOCATOR_H
20#define GEOS_OP_OVERLAY_FUZZYPOINTLOCATOR_H
21
22#include <geos/export.h>
23#include <geos/algorithm/PointLocator.h> // for composition
24#include <geos/geom/Geometry.h> // for unique_ptr visibility of dtor
25#include <geos/geom/Location.h> // for Location::Value enum
26
27#include <vector>
28#include <memory> // for unique_ptr
29
30#ifdef _MSC_VER
31#pragma warning(push)
32#pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
33#endif
34
35// Forward declarations
36namespace geos {
37namespace geom {
38class Geometry;
39class Coordinate;
40}
41}
42
43namespace geos {
44namespace operation { // geos::operation
45namespace overlay { // geos::operation::overlay
46namespace validate { // geos::operation::overlay::validate
47
58class GEOS_DLL FuzzyPointLocator {
59
60public:
61
62 FuzzyPointLocator(const geom::Geometry& geom, double nTolerance);
63
64 geom::Location getLocation(const geom::Coordinate& pt);
65
66private:
67
68 const geom::Geometry& g;
69
70 double tolerance;
71
73
74 std::unique_ptr<geom::Geometry> linework;
75
76 // this function has been obsoleted
77 std::unique_ptr<geom::Geometry> getLineWork(const geom::Geometry& geom);
78
83 std::unique_ptr<geom::Geometry> extractLineWork(const geom::Geometry& geom);
84
85 // Declare type as noncopyable
86 FuzzyPointLocator(const FuzzyPointLocator& other) = delete;
87 FuzzyPointLocator& operator=(const FuzzyPointLocator& rhs) = delete;
88};
89
90} // namespace geos::operation::overlay::validate
91} // namespace geos::operation::overlay
92} // namespace geos::operation
93} // namespace geos
94
95#ifdef _MSC_VER
96#pragma warning(pop)
97#endif
98
99#endif // ndef GEOS_OP_OVERLAY_FUZZYPOINTLOCATOR_H
Computes the topological relationship (Location) of a single point to a Geometry.
Definition PointLocator.h:57
Coordinate is the lightweight class used to store coordinates.
Definition Coordinate.h:60
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition Geometry.h:188
Finds the most likely Location of a point relative to the polygonal components of a geometry,...
Definition FuzzyPointLocator.h:58
Location
Constants representing the location of a point relative to a geometry.
Definition Location.h:34
Basic namespace for all GEOS functionalities.
Definition IndexedNestedRingTester.h:26