GEOS  3.10.1
PolygonRingTouch.h
1 /**********************************************************************
2  *
3  * GEOS - Geometry Engine Open Source
4  * http://geos.osgeo.org
5  *
6  * Copyright (C) 2021 Paul Ramsey <pramsey@cleverelephant.ca>
7  * Copyright (C) 2021 Martin Davis
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 #pragma once
17 
18 #include <geos/export.h>
19 
20 
21 #include <memory>
22 
23 // Forward declarations
24 namespace geos {
25 namespace geom {
26 class Coordinate;
27 }
28 namespace operation {
29 namespace valid {
30 class PolygonRing;
31 }
32 }
33 }
34 
35 namespace geos { // geos.
36 namespace operation { // geos.operation
37 namespace valid { // geos.operation.valid
38 
40 
41 class GEOS_DLL PolygonRingTouch {
42 
43 private:
44 
45  PolygonRing* ring;
46  Coordinate touchPt;
47 
48 
49 public:
50 
51  PolygonRingTouch(PolygonRing* p_ring, const Coordinate& p_pt)
52  : ring(p_ring)
53  , touchPt(p_pt)
54  {};
55 
56  const Coordinate* getCoordinate() const;
57 
58  PolygonRing* getRing() const;
59 
60  bool isAtLocation(const Coordinate& pt) const;
61 
62 };
63 
64 } // namespace geos.operation.valid
65 } // namespace geos.operation
66 } // namespace geos
67 
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:60
Basic namespace for all GEOS functionalities.
Definition: Angle.h:26