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