Class GraphUtils
- java.lang.Object
-
- eu.europa.ec.eurostat.jgiscotools.graph.algo.GraphUtils
-
public class GraphUtils extends Object
Various algorithms on graphs.- Author:
- julien Gaffuri
-
-
Constructor Summary
Constructors Constructor Description GraphUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Node
areConnected(Edge e1, Edge e2)
Check if two edges are connected.static Edge
findSimilarDuplicateEdgeToRemove(Graph g, double haussdorffDistance)
static double
getArea(Edge e)
static Collection<org.locationtech.jts.geom.LineString>
getEdgeGeometries(Graph g)
static Collection<org.locationtech.jts.geom.LineString>
getEdgeGeometries(Collection<Edge> es)
static Set<Edge>
getEdgesInCommon(Face f1, Face f2)
static double
getLength(Face f1, Face f2)
static Edge
getLongest(Edge e1, Edge e2)
static Set<Node>
getNodes(Collection<Edge> edges)
static void
removeSimilarDuplicateEdges(Graph g, double haussdorffDistance)
static Edge
revert(Edge e)
-
-
-
Method Detail
-
getArea
public static double getArea(Edge e)
-
removeSimilarDuplicateEdges
public static void removeSimilarDuplicateEdges(Graph g, double haussdorffDistance)
-
findSimilarDuplicateEdgeToRemove
public static Edge findSimilarDuplicateEdgeToRemove(Graph g, double haussdorffDistance)
-
areConnected
public static Node areConnected(Edge e1, Edge e2)
Check if two edges are connected. If so, return the connection node.- Parameters:
e1
-e2
-- Returns:
-
getEdgeGeometries
public static Collection<org.locationtech.jts.geom.LineString> getEdgeGeometries(Graph g)
-
getEdgeGeometries
public static Collection<org.locationtech.jts.geom.LineString> getEdgeGeometries(Collection<Edge> es)
-
getNodes
public static Set<Node> getNodes(Collection<Edge> edges)
-
-