GEOS 3.16.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
23namespace geos { // geos.
24namespace operation { // geos.operation
25namespace valid { // geos.operation.valid
26
27class GEOS_DLL PolygonRingSelfNode {
28 using CoordinateXY = geos::geom::CoordinateXY;
29
30private:
31
32 CoordinateXY nodePt;
33 const CoordinateXY* e00;
34 const CoordinateXY* e01;
35 const CoordinateXY* e10;
36 const CoordinateXY* e11;
37
38
39public:
40
41 PolygonRingSelfNode(
42 const CoordinateXY& p_nodePt,
43 const CoordinateXY* p_e00,
44 const CoordinateXY* p_e01,
45 const CoordinateXY* p_e10,
46 const CoordinateXY* p_e11)
47 : nodePt(p_nodePt)
48 , e00(p_e00)
49 , e01(p_e01)
50 , e10(p_e10)
51 , e11(p_e11)
52 {}
53
59 const CoordinateXY* getCoordinate() const {
60 return &nodePt;
61 }
62
74 bool isExterior(bool isInteriorOnRight) const;
75
76};
77
78} // namespace geos.operation.valid
79} // namespace geos.operation
80} // namespace geos
81
Basic namespace for all GEOS functionalities.
Definition geos.h:38