#include <EdgeGraph.h>
Inherited by geos::dissolve::DissolveEdgeGraph.
|
| EdgeGraph () |
|
HalfEdge * | addEdge (const geom::CoordinateXYZM &orig, const geom::CoordinateXYZM &dest) |
|
void | getVertexEdges (std::vector< const HalfEdge * > &edgesOut) |
|
HalfEdge * | findEdge (const geom::CoordinateXY &orig, const geom::CoordinateXY &dest) |
|
|
static bool | isValidEdge (const geom::CoordinateXY &orig, const geom::CoordinateXY &dest) |
|
A graph comprised of HalfEdge
s. It supports tracking the vertices in the graph via edges incident on them, to allow efficient lookup of edges and vertices.
This class may be subclassed to use a different subclass of HalfEdge, by overriding createEdge
. If additional logic is required to initialize edges then addEdge
can be overridden as well.
- Author
- Martin Davis
◆ EdgeGraph()
geos::edgegraph::EdgeGraph::EdgeGraph |
( |
| ) |
|
|
inline |
◆ addEdge()
HalfEdge * geos::edgegraph::EdgeGraph::addEdge |
( |
const geom::CoordinateXYZM & |
orig, |
|
|
const geom::CoordinateXYZM & |
dest |
|
) |
| |
Adds an edge between the coordinates orig and dest to this graph. Only valid edges can be added (in particular, zero-length segments cannot be added)
- Parameters
-
orig | the edge origin location |
dest | the edge destination location. |
- Returns
- the created edge
-
null if the edge was invalid and not added
- See also
- isValidEdge(Coordinate, Coordinate)
◆ createEdge()
virtual HalfEdge * geos::edgegraph::EdgeGraph::createEdge |
( |
const geom::CoordinateXYZM & |
orig | ) |
|
|
protectedvirtual |
Creates a single HalfEdge. Override to use a different HalfEdge subclass.
- Parameters
-
- Returns
- a new HalfEdge with the given origin
◆ findEdge()
HalfEdge * geos::edgegraph::EdgeGraph::findEdge |
( |
const geom::CoordinateXY & |
orig, |
|
|
const geom::CoordinateXY & |
dest |
|
) |
| |
Finds an edge in this graph with the given origin and destination, if one exists.
- Parameters
-
orig | the origin location |
dest | the destination location. |
- Returns
- an edge with the given orig and dest, or null if none exists
◆ insert()
HalfEdge * geos::edgegraph::EdgeGraph::insert |
( |
const geom::CoordinateXYZM & |
orig, |
|
|
const geom::CoordinateXYZM & |
dest, |
|
|
HalfEdge * |
eAdj |
|
) |
| |
|
protected |
Inserts an edge not already present into the graph.
- Parameters
-
orig | the edge origin location |
dest | the edge destination location |
eAdj | an existing edge with same orig (if any) |
- Returns
- the created edge
◆ isValidEdge()
static bool geos::edgegraph::EdgeGraph::isValidEdge |
( |
const geom::CoordinateXY & |
orig, |
|
|
const geom::CoordinateXY & |
dest |
|
) |
| |
|
static |
Tests if the given coordinates form a valid edge (with non-zero length).
- Parameters
-
orig | the start coordinate |
dest | the end coordinate |
- Returns
- true if the edge formed is valid
The documentation for this class was generated from the following file: