GEOS 3.11.1
EdgeGraphBuilder.h
1/**********************************************************************
2 *
3 * GEOS - Geometry Engine Open Source
4 * http://geos.osgeo.org
5 *
6 * Copyright (C) 2020 Paul Ramsey <pramsey@cleverelephant.ca>
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
16#pragma once
17
18#include <geos/edgegraph/EdgeGraph.h>
19
20#include <geos/export.h>
21#include <string>
22#include <cassert>
23
24// Forward declarations
25namespace geos {
26namespace geom {
27class Coordinate;
28class LineString;
29class Geometry;
30class GeometryCollection;
31}
32}
33
34namespace geos {
35namespace edgegraph { // geos.edgegraph
36
37
44class GEOS_DLL EdgeGraphBuilder {
45
46private:
47
48 /* members */
49 std::unique_ptr<EdgeGraph> graph;
50
51
52
53public:
54
56 graph(new EdgeGraph())
57 {};
58
59 static std::unique_ptr<EdgeGraph> build(const geom::GeometryCollection* geoms);
60
61 std::unique_ptr<EdgeGraph> getGraph();
62
71 void add(const geom::Geometry* geometry);
72 void add(const geom::LineString* linestring);
73
81 void add(const geom::GeometryCollection* geometries);
82
83};
84
85
86} // namespace geos.edgegraph
87} // namespace geos
88
89
90
91
Definition: EdgeGraphBuilder.h:44
void add(const geom::Geometry *geometry)
void add(const geom::GeometryCollection *geometries)
Definition: EdgeGraph.h:58
Represents a collection of heterogeneous Geometry objects.
Definition: GeometryCollection.h:52
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:186
Definition: LineString.h:66
Basic namespace for all GEOS functionalities.
Definition: geos.h:39