GEOS  3.13.0dev
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
25 namespace geos {
26 namespace geom {
27 class Coordinate;
28 class LineString;
29 class Geometry;
30 class GeometryCollection;
31 }
32 }
33 
34 namespace geos {
35 namespace edgegraph { // geos.edgegraph
36 
37 
44 class GEOS_DLL EdgeGraphBuilder {
45 
46 private:
47 
48  /* members */
49  std::unique_ptr<EdgeGraph> graph;
50 
51 
52 
53 public:
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:51
Represents a collection of heterogeneous Geometry objects.
Definition: GeometryCollection.h:51
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:186
Definition: LineString.h:65
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25