GEOS 3.11.1
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 LineString;
28class MultiLineString;
29}
30}
31
32namespace geos {
33namespace operation {
34
46class GEOS_DLL BoundaryOp {
47
48public:
55
63
70 static std::unique_ptr<geom::Geometry> getBoundary(const geom::Geometry& g);
71
80 static std::unique_ptr<geom::Geometry> getBoundary(const geom::Geometry& g, const algorithm::BoundaryNodeRule& bnRule);
81
97 static bool hasBoundary(const geom::Geometry& geom, const algorithm::BoundaryNodeRule& boundaryNodeRule);
98
104 std::unique_ptr<geom::Geometry> getBoundary();
105
106private:
107 const geom::Geometry& m_geom;
108 const geom::GeometryFactory& m_geomFact;
109 const algorithm::BoundaryNodeRule& m_bnRule;
110
111 std::unique_ptr<geom::Geometry> boundaryMultiLineString(const geom::MultiLineString& mLine);
112
113 std::vector<geom::Coordinate> computeBoundaryCoordinates(const geom::MultiLineString& mLine);
114
115 std::unique_ptr<geom::Geometry> boundaryLineString(const geom::LineString& line);
116};
117
118}
119}
120
An interface for rules which determine whether node points which are in boundaries of lineal geometry...
Definition: BoundaryNodeRule.h:50
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:66
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:186
Definition: LineString.h:66
Models a collection of LineStrings.
Definition: MultiLineString.h:50
Definition: BoundaryOp.h:46
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:39