GEOS 3.15.0dev
BoundaryOp.h
1/**********************************************************************
2 *
3 * GEOS - Geometry Engine Open Source
4 * http://geos.osgeo.org
5 *
6 * Copyright (C) 2022 ISciences LLC
7 *
8 * This is free software; you can redistribute and/or modify it under
9 * the terms of the GNU Lesser General Public Licence as published
10 * by the Free Software Foundation.
11 * See the COPYING file for more information.
12 *
13 **********************************************************************
14 *
15 * Last port: operation/BoundaryOp.java fd5aebb
16 *
17 **********************************************************************/
18
19#pragma once
20
21#include <geos/algorithm/BoundaryNodeRule.h>
22#include <geos/geom/Geometry.h>
23#include <map>
24
25namespace geos {
26namespace geom {
27class Curve;
28class LineString;
29class MultiCurve;
30class MultiLineString;
31class GeometryCollection;
32}
33}
34
35namespace geos {
36namespace operation {
37
49class GEOS_DLL BoundaryOp {
50
51public:
58
66
73 static std::unique_ptr<geom::Geometry> getBoundary(const geom::Geometry& g);
74
83 static std::unique_ptr<geom::Geometry> getBoundary(const geom::Geometry& g, const algorithm::BoundaryNodeRule& bnRule);
84
100 static bool hasBoundary(const geom::Geometry& geom, const algorithm::BoundaryNodeRule& boundaryNodeRule);
101
107 std::unique_ptr<geom::Geometry> getBoundary();
108
109private:
110 const geom::Geometry& m_geom;
111 const geom::GeometryFactory& m_geomFact;
112 const algorithm::BoundaryNodeRule& m_bnRule;
113
114 std::unique_ptr<geom::Geometry> boundaryMultiCurve(const geom::GeometryCollection& mLine);
115
116 std::unique_ptr<geom::CoordinateSequence> computeBoundaryCoordinates(const geom::GeometryCollection& mLine) const;
117
118 std::unique_ptr<geom::Geometry> boundaryCurve(const geom::Curve& line) const;
119};
120
121}
122}
123
An interface for rules which determine whether node points which are in boundaries of lineal geometry...
Definition BoundaryNodeRule.h:52
Represents a collection of heterogeneous Geometry objects.
Definition GeometryCollection.h:51
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition GeometryFactory.h:71
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition Geometry.h:196
Definition BoundaryOp.h:49
static bool hasBoundary(const geom::Geometry &geom, const algorithm::BoundaryNodeRule &boundaryNodeRule)
BoundaryOp(const geom::Geometry &geom, const algorithm::BoundaryNodeRule &bnRule)
static std::unique_ptr< geom::Geometry > getBoundary(const geom::Geometry &g, const algorithm::BoundaryNodeRule &bnRule)
BoundaryOp(const geom::Geometry &geom)
static std::unique_ptr< geom::Geometry > getBoundary(const geom::Geometry &g)
std::unique_ptr< geom::Geometry > getBoundary()
Basic namespace for all GEOS functionalities.
Definition geos.h:38