AnyLogic AnyLogic
Expand
Font size
  • java.lang.Object
    • com.anylogic.engine.gis.AbstractGISRouteProvider
All Implemented Interfaces:
IGISRouteProvider, IRouteProvider<Curve<GISMarkupSegment>>, java.io.Serializable
Direct Known Subclasses:
AbstractGISRouteProviderWithCache, PlainGISRouteProvider

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

Constructor Summary

Constructors 
AbstractGISRouteProvider()  
Constructor Description

Method Summary

All Methods Instance Methods Concrete Methods Deprecated Methods 
double getDistance​(double startLat, double startLon, double endLat, double endLon)
Calculates distance by route between two specified points.
Curve<GISMarkupSegment> getPathData​(double... latlonPoints)
Create route with intermediate points specified by pairs of latitude and longitude.
Curve<GISMarkupSegment> getPathData​(double startLat, double startLon, double endLat, double endLon)
Creates route from one point to another.
int getPrecisionInMeters()  
boolean isThrowError()
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
void setPrecisionInMeters​(int precisionInMeters)  
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).
void setThrowError​(boolean throwError)
Modifier and Type Method Description

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, getLength, getPathData, getPathData, getPositionAtOffset, getRoute, getRoute, getRoute, getRoute

Constructor Detail

AbstractGISRouteProvider

public AbstractGISRouteProvider()

Method Detail

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 witch sequentially connects all specified points

getDistance

public final double getDistance​(double startLat,
                                double startLon,
                                double endLat,
                                double endLon)
Description copied from interface: IGISRouteProvider
Calculates distance by route between two specified points.
Specified by:
getDistance in interface IGISRouteProvider
Returns:
the distance between two specified points, measured in meters.

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
How can we improve this article?