Package com.anylogic.engine.gis
- java.lang.Object
- com.anylogic.engine.gis.AbstractGISRouteFinder
- com.anylogic.engine.gis.GraphHopperRouteFinder
- All Implemented Interfaces:
IGISRouteFinder
@AnyLogicInternalAPI public class GraphHopperRouteFinder extends AbstractGISRouteFinder
This class is internal and shouldn't be called by user.
it may be removed/renamed in future.
Provider of routes www.graphhopper.com. It requires file based routing graph and works without internet connection.
it may be removed/renamed in future.
Provider of routes www.graphhopper.com. It requires file based routing graph and works without internet connection.
- Author:
- AnyLogic North America, LLC https://anylogic.com
Modifier and Type | Field | Description |
---|---|---|
static String[] | GRAPH_HOPPER_ROUTING_FILES |
Constructor | Description |
---|---|
GraphHopperRouteFinder |
Modifier and Type | Method | Description |
---|---|---|
void | close() |
Call com.graphhopper.GraphHopper.close() to release files.
|
static com.graphhopper.GraphHopper | createGraphhopperInstance() | |
static boolean | folderContainsGraphHopperRoutingGraph | |
GISResultDouble | getDistance |
Returns the distance by route with intermediate points.
|
String | getGraphFilesPath() | |
String | getPathFindingAlgorithm() | |
int | getPrecisionInMeters() | |
GISResult<double[]> | getRoute |
Returns curve obtained "as is" from route provider, without generalization
|
RoutingMethod | getRoutingMethod() | |
void | setPathFindingAlgorithm | |
void | setPrecisionInMeters | |
void | setRoutingMethod |
public static String[] GRAPH_HOPPER_ROUTING_FILES
public GraphHopperRouteFinder(String graphFilesPath, String pathFindingAlgorithm, RoutingMethod routingMethod, int precisionInMeters)
public static boolean folderContainsGraphHopperRoutingGraph(String folder)
public GISResultDouble getDistance(double[] latLonPoints)
Description copied from interface:
IGISRouteFinder
Returns the distance by route with intermediate points.
- Parameters:
latLonPoints
- the array of coordinates ([latitude1, longitude1, latitude2, longitude2, ... latitudeN, longitudeN])- Returns:
- the distance of route which sequentially connects all specified points,
empty optional if route not found, or
null
in case of server error
@AnyLogicInternalAPI public static com.graphhopper.GraphHopper createGraphhopperInstance()
@AnyLogicInternalAPI public String getGraphFilesPath()
@AnyLogicInternalAPI public RoutingMethod getRoutingMethod()
@AnyLogicInternalAPI public void setRoutingMethod(RoutingMethod routingMethod)
@AnyLogicInternalAPI public String getPathFindingAlgorithm()
@AnyLogicInternalAPI public void setPathFindingAlgorithm(String pathFindingAlgorithm)
@AnyLogicInternalAPI public int getPrecisionInMeters()
@AnyLogicInternalAPI public void setPrecisionInMeters(int precisionInMeters)
@AnyLogicInternalAPI public void close()
Call com.graphhopper.GraphHopper.close() to release files.
public GISResult<double[]> getRoute(double[] latLonPoints)
Description copied from class:
AbstractGISRouteFinder
Returns curve obtained "as is" from route provider, without generalization
- Specified by:
getRoute
in interfaceIGISRouteFinder
- Specified by:
getRoute
in classAbstractGISRouteFinder
- Parameters:
latLonPoints
- (lat, lon) pairs representing, the start, then optional intermediate, and the end points. Returns array of (lat, lon) pairs of resulting route curve, after all the points there is a number with the total distance.- Returns:
- see above, or empty optional if route not found, or
null
in case of server error