org.h2gis.network.graph_creator
Class ST_ShortestPath
java.lang.Object
org.h2gis.h2spatialapi.AbstractFunction
org.h2gis.network.graph_creator.GraphFunction
org.h2gis.network.graph_creator.ST_ShortestPath
- All Implemented Interfaces:
- Function, ScalarFunction
public class ST_ShortestPath
- extends GraphFunction
- implements ScalarFunction
Calculates the shortest path(s) between vertices in a JGraphT graph produced
from the input_edges table produced by ST_Graph.
- Author:
- Adam Gouge
|
Method Summary |
protected static Map<Integer,com.vividsolutions.jts.geom.Geometry> |
getEdgeGeometryMap(Connection connection,
TableLocation tableName,
String firstGeometryField)
Return a map of edge ids to edge geometries, or null if the input table
contains no geometry fields. |
protected static String |
getFirstGeometryField(Connection connection,
TableLocation tableName)
Return the first geometry field of tableName or null if it contains none. |
String |
getJavaStaticMethod()
|
static ResultSet |
getShortestPath(Connection connection,
String inputTable,
String orientation,
int source,
int destination)
|
static ResultSet |
getShortestPath(Connection connection,
String inputTable,
String orientation,
String weight,
int source,
int destination)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NO_GEOM_FIELD_ERROR
public static final String NO_GEOM_FIELD_ERROR
- See Also:
- Constant Field Values
REMARKS
public static final String REMARKS
- See Also:
- Constant Field Values
ST_ShortestPath
public ST_ShortestPath()
- Constructor
getJavaStaticMethod
public String getJavaStaticMethod()
- Specified by:
getJavaStaticMethod in interface ScalarFunction
getShortestPath
public static ResultSet getShortestPath(Connection connection,
String inputTable,
String orientation,
int source,
int destination)
throws SQLException
- Parameters:
connection - connectioninputTable - Edges table produced by ST_Graphorientation - Orientation stringsource - Source vertex iddestination - Destination vertex id
- Returns:
- Shortest path
- Throws:
SQLException
getShortestPath
public static ResultSet getShortestPath(Connection connection,
String inputTable,
String orientation,
String weight,
int source,
int destination)
throws SQLException
- Parameters:
connection - connectioninputTable - Edges table produced by ST_Graphorientation - Orientation stringweight - Weightsource - Source vertex iddestination - Destination vertex id
- Returns:
- Shortest path
- Throws:
SQLException
getFirstGeometryField
protected static String getFirstGeometryField(Connection connection,
TableLocation tableName)
throws SQLException
- Return the first geometry field of tableName or null if it contains none.
- Parameters:
connection - ConnectiontableName - TableLocation
- Returns:
- The first geometry field of tableName or null if it contains none
- Throws:
SQLException
getEdgeGeometryMap
protected static Map<Integer,com.vividsolutions.jts.geom.Geometry> getEdgeGeometryMap(Connection connection,
TableLocation tableName,
String firstGeometryField)
throws SQLException
- Return a map of edge ids to edge geometries, or null if the input table
contains no geometry fields.
- Parameters:
connection - ConnectiontableName - TableLocation
- Returns:
- A map of edge ids to edge geometries, or null if the input table
contains no geometry fields
- Throws:
SQLException
Copyright © 2015 IRSTV CNRS-FR-2488. All Rights Reserved.