LineMergeGraph.h
/**********************************************************************
*
* GEOS - Geometry Engine Open Source
* http://geos.osgeo.org
*
* Copyright (C) 2011 Sandro Santilli <strk@kbt.io>
* Copyright (C) 2006 Refractions Research Inc.
* Copyright (C) 2001-2002 Vivid Solutions Inc.
*
* This is free software; you can redistribute and/or modify it under
* the terms of the GNU Lesser General Public Licence as published
* by the Free Software Foundation.
* See the COPYING file for more information.
*
**********************************************************************
*
* Last port: operation/linemerge/LineMergeGraph.java r378 (JTS-1.12)
*
**********************************************************************/
#pragma once
#include <geos/export.h>
#include <geos/planargraph/PlanarGraph.h> // for inheritance
#include <vector>
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
#endif
// Forward declarations
namespace geos {
namespace geom {
class LineString;
class Coordinate;
}
namespace planargraph {
class Node;
class Edge;
class DirectedEdge;
}
}
namespace geos {
namespace operation { // geos::operation
namespace linemerge { // geos::operation::linemerge
class GEOS_DLL LineMergeGraph: public planargraph::PlanarGraph {
private:
planargraph::Node* getNode(const geom::Coordinate& coordinate);
std::vector<planargraph::Node*> newNodes;
std::vector<planargraph::Edge*> newEdges;
std::vector<planargraph::DirectedEdge*> newDirEdges;
public:
void addEdge(const geom::LineString* lineString);
~LineMergeGraph() override;
};
} // namespace geos::operation::linemerge
} // namespace geos::operation
} // namespace geos
#ifdef _MSC_VER
#pragma warning(pop)
#endif
geos::geom::Coordinate
Coordinate is the lightweight class used to store coordinates.
Definition Coordinate.h:217
geos::geom::LineString
Definition LineString.h:66
geos::operation::linemerge::LineMergeGraph
A planar graph of edges that is analyzed to sew the edges together.
Definition LineMergeGraph.h:58
geos::operation::linemerge::LineMergeGraph::addEdge
void addEdge(const geom::LineString *lineString)
Adds an Edge, DirectedEdges, and Nodes for the given LineString representation of an edge.
geos::planargraph::DirectedEdge
Represents a directed edge in a PlanarGraph.
Definition planargraph/DirectedEdge.h:45
geos::planargraph::Edge
Represents an undirected edge of a PlanarGraph.
Definition planargraph/Edge.h:54
geos::planargraph::Node
A node in a PlanarGraph is a location where 0 or more Edge meet.
Definition planargraph/Node.h:44
geos::planargraph::PlanarGraph
Represents a directed graph which is embeddable in a planar surface.
Definition planargraph/PlanarGraph.h:59
geos::geom
Definition Angle.h:26
geos::operation::linemerge
Line merging package.
Definition namespaces.h:192
geos::operation
Provides classes for implementing operations on geometries.
Definition CleanCoverage.h:34
geos::planargraph
Contains classes to implement a planar graph data structure.
Definition namespaces.h:293
geos
Basic namespace for all GEOS functionalities.
Definition geos.h:38