AnyLogic
Expand
Font size
All Implemented Interfaces:
IGISRouteProvider, IRouteProvider<Curve<GISMarkupSegment>>, Serializable
Direct Known Subclasses:
AbstractGISRouteProviderWithCache, PlainGISRouteProvider

@AnyLogicInternalAPI
public abstract class AbstractGISRouteProvider
extends Object
implements IGISRouteProvider
See Also:
Serialized Form

Constructor Summary

ConstructorDescription
AbstractGISRouteProvider() 

Method Summary

Modifier and TypeMethodDescription
final doublegetDistance(double... latLonPoints)
Calculates distance by route with intermediate points.
final Curve<GISMarkupSegment>getPathData(double... latLonPoints)
Create route with intermediate points specified by pairs of latitude and longitude.
final Curve<GISMarkupSegment>getPathData(double startLat, double startLon, double endLat, double endLon)
Creates route from one point to another.
intgetPrecisionInMeters() 
booleanisThrowError()
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
voidsetPrecisionInMeters(int precisionInMeters) 
AbstractGISRouteProvidersetRouteNotFoundBehavior(GISRouteNotFoundBehavior behavior)
Configures this route provider to either throw error or create a straight route if the requested route can't be found (applicable for route providers supporting route search).
voidsetThrowError(boolean throwError)

Methods inherited from class java.lang.Object

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

Methods inherited from interface com.anylogic.engine.gis.IGISRouteProvider

getDistance, getDistance, getDistance, getLength, getPathData, getPathData, getPositionAtOffset, getRoute, getRoute, getRoute, getRoute

Constructor Details

AbstractGISRouteProvider

public AbstractGISRouteProvider()

Method Details

setPrecisionInMeters

public void setPrecisionInMeters(int precisionInMeters)

getPrecisionInMeters

public int getPrecisionInMeters()

getPathData

public final Curve<GISMarkupSegment> getPathData(double startLat,
 double startLon,
 double endLat,
 double endLon)
Description copied from interface: IGISRouteProvider
Creates route from one point to another.
Specified by:
getPathData in interface IGISRouteProvider
Parameters:
startLat - the latitude of the 1st point, measured in degrees (-90 ... (South) ... 0 ... (North) ... +90)
startLon - the longitude of the 1st point, measured in degrees (-180 ... (West) ... 0 ... (East) ... +180)
endLat - the latitude of the 2nd point, measured in degrees (-90 ... (South) ... 0 ... (North) ... +90)
endLon - the longitude of the 2nd point, measured in degrees (-180 ... (West) ... 0 ... (East) ... +180)
Returns:
the route from one point to another

getPathData

public final Curve<GISMarkupSegment> getPathData(double... latLonPoints)
Description copied from interface: IGISRouteProvider
Create route with intermediate points specified by pairs of latitude and longitude.
Specified by:
getPathData in interface IGISRouteProvider
Parameters:
latLonPoints - the array of coordinates ([latitude1, longitude1, latitude2, longitude2, ... latitudeN, longitudeN])
Returns:
the curve which sequentially connects all specified points

getDistance

public final double getDistance(double... latLonPoints)
Description copied from interface: IGISRouteProvider
Calculates distance by route with intermediate points.
Specified by:
getDistance in interface IGISRouteProvider
Parameters:
latLonPoints - the array of coordinates ([latitude1, longitude1, latitude2, longitude2, ... latitudeN, longitudeN])
Returns:
the distance of route which sequentially connects all specified points

isThrowError

@AnyLogicInternalAPI
public boolean isThrowError()
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.

setThrowError

@Deprecated
public void setThrowError(boolean throwError)

setRouteNotFoundBehavior

public AbstractGISRouteProvider setRouteNotFoundBehavior(GISRouteNotFoundBehavior behavior)
Configures this route provider to either throw error or create a straight route if the requested route can't be found (applicable for route providers supporting route search).
Parameters:
behavior - the behavior
Returns:
this object, for convenience