GEOS 3.14.0dev
LineMergeGraph.h
1/**********************************************************************
2 *
3 * GEOS - Geometry Engine Open Source
4 * http://geos.osgeo.org
5 *
6 * Copyright (C) 2011 Sandro Santilli <strk@kbt.io>
7 * Copyright (C) 2006 Refractions Research Inc.
8 * Copyright (C) 2001-2002 Vivid Solutions Inc.
9 *
10 * This is free software; you can redistribute and/or modify it under
11 * the terms of the GNU Lesser General Public Licence as published
12 * by the Free Software Foundation.
13 * See the COPYING file for more information.
14 *
15 **********************************************************************
16 *
17 * Last port: operation/linemerge/LineMergeGraph.java r378 (JTS-1.12)
18 *
19 **********************************************************************/
20
21#pragma once
22
23#include <geos/export.h>
24#include <geos/planargraph/PlanarGraph.h> // for inheritance
25
26#include <vector>
27
28#ifdef _MSC_VER
29#pragma warning(push)
30#pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
31#endif
32
33// Forward declarations
34namespace geos {
35namespace geom {
36class LineString;
37class Coordinate;
38}
39namespace planargraph {
40class Node;
41class Edge;
42class DirectedEdge;
43}
44}
45
46
47namespace geos {
48namespace operation { // geos::operation
49namespace linemerge { // geos::operation::linemerge
50
59
60private:
61
62 planargraph::Node* getNode(const geom::Coordinate& coordinate);
63
64 std::vector<planargraph::Node*> newNodes;
65
66 std::vector<planargraph::Edge*> newEdges;
67
68 std::vector<planargraph::DirectedEdge*> newDirEdges;
69
70public:
71
80 void addEdge(const geom::LineString* lineString);
81
82 ~LineMergeGraph() override;
83};
84} // namespace geos::operation::linemerge
85} // namespace geos::operation
86} // namespace geos
87
88#ifdef _MSC_VER
89#pragma warning(pop)
90#endif
91
Coordinate is the lightweight class used to store coordinates.
Definition Coordinate.h:217
Definition LineString.h:66
A planar graph of edges that is analyzed to sew the edges together.
Definition LineMergeGraph.h:58
void addEdge(const geom::LineString *lineString)
Adds an Edge, DirectedEdges, and Nodes for the given LineString representation of an edge.
A node in a PlanarGraph is a location where 0 or more Edge meet.
Definition planargraph/Node.h:44
Represents a directed graph which is embeddable in a planar surface.
Definition planargraph/PlanarGraph.h:59
Basic namespace for all GEOS functionalities.
Definition geos.h:39