GEOS  3.13.0dev
PolygonRingSelfNode.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 #include <geos/geom/Coordinate.h>
21 
22 #include <memory>
23 
24 
25 namespace geos { // geos.
26 namespace operation { // geos.operation
27 namespace valid { // geos.operation.valid
28 
29 using geos::geom::CoordinateXY;
30 
31 class GEOS_DLL PolygonRingSelfNode {
32 
33 private:
34 
35  CoordinateXY nodePt;
36  const CoordinateXY* e00;
37  const CoordinateXY* e01;
38  const CoordinateXY* e10;
39  const CoordinateXY* e11;
40 
41 
42 public:
43 
44  PolygonRingSelfNode(
45  const CoordinateXY& p_nodePt,
46  const CoordinateXY* p_e00,
47  const CoordinateXY* p_e01,
48  const CoordinateXY* p_e10,
49  const CoordinateXY* p_e11)
50  : nodePt(p_nodePt)
51  , e00(p_e00)
52  , e01(p_e01)
53  , e10(p_e10)
54  , e11(p_e11)
55  {}
56 
62  const CoordinateXY* getCoordinate() const {
63  return &nodePt;
64  }
65 
77  bool isExterior(bool isInteriorOnRight) const;
78 
79 };
80 
81 } // namespace geos.operation.valid
82 } // namespace geos.operation
83 } // namespace geos
84 
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25