/src/geos/include/geos/operation/valid/PolygonRingTouch.h
Line | Count | Source |
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 | | #include <geos/geom/Coordinate.h> |
20 | | |
21 | | |
22 | | // Forward declarations |
23 | | namespace geos { |
24 | | namespace operation { |
25 | | namespace valid { |
26 | | class PolygonRing; |
27 | | } |
28 | | } |
29 | | } |
30 | | |
31 | | namespace geos { // geos. |
32 | | namespace operation { // geos.operation |
33 | | namespace valid { // geos.operation.valid |
34 | | |
35 | | class GEOS_DLL PolygonRingTouch { |
36 | | using CoordinateXY = geos::geom::CoordinateXY; |
37 | | |
38 | | private: |
39 | | |
40 | | PolygonRing* ring; |
41 | | CoordinateXY touchPt; |
42 | | |
43 | | |
44 | | public: |
45 | | |
46 | | PolygonRingTouch(PolygonRing* p_ring, const CoordinateXY& p_pt) |
47 | 1.10k | : ring(p_ring) |
48 | 1.10k | , touchPt(p_pt) |
49 | 1.10k | {}; |
50 | | |
51 | | const CoordinateXY* getCoordinate() const; |
52 | | |
53 | | PolygonRing* getRing() const; |
54 | | |
55 | | bool isAtLocation(const CoordinateXY& pt) const; |
56 | | |
57 | | }; |
58 | | |
59 | | } // namespace geos.operation.valid |
60 | | } // namespace geos.operation |
61 | | } // namespace geos |
62 | | |