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