AnyLogic
Expand
Font size
All Implemented Interfaces:
IGISRouteFinder

@AnyLogicInternalAPI
public class GISStraightRouteFinder
extends AbstractGISRouteFinder
This class is internal and shouldn't be called by user.
it may be removed/renamed in future.
Author:
AnyLogic North America, LLC https://anylogic.com

Constructor Summary

ConstructorDescription
GISStraightRouteFinder() 

Method Summary

Modifier and TypeMethodDescription
GISResultDoublegetDistance(double[] latLonPoints)
Returns the distance by route with intermediate points.
GISResult<double[]>getRoute(double[] latLonPoints)
Returns curve obtained "as is" from route provider, without generalization
static doublegetStraightDistance(double[] latLonPoints) 

Methods inherited from class com.anylogic.engine.gis.AbstractGISRouteFinder

registerDistanceCache

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Details

GISStraightRouteFinder

public GISStraightRouteFinder()

Method Details

getRoute

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 interface IGISRouteFinder
Specified by:
getRoute in class AbstractGISRouteFinder
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

getDistance

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

getStraightDistance

public static double getStraightDistance(double[] latLonPoints)