AnyLogic
Expand
Font size
All Superinterfaces:
IRouteProvider<Curve<GISMarkupSegment>>, Serializable
All Known Implementing Classes:
AbstractGISRouteProvider, AbstractGISRouteProviderWithCache, AnyLogicOnlineRouteProvider, BRouterOSMRouteProvider, GraphHopperRouteProvider, JSONRouteProvider, PlainGISRouteProvider, YoursOSMRouteProvider

public interface IGISRouteProvider
extends IRouteProvider<Curve<GISMarkupSegment>>
Basic interface for creation of routes in GIS space.
Author:
AnyLogic North America, LLC https://anylogic.com

Method Summary

Modifier and TypeMethodDescription
default doublegetDistance(double... latLonPoints)
Calculates distance by route with intermediate points.
default doublegetDistance(double startLat, double startLon, double endLat, double endLon)
Calculates distance by route between two specified points.
default doublegetDistance(Point... points)
Calculates distance by route with intermediate points.
default doublegetDistance(Point startPoint, Point endPoint)
Creates a route from one point to another and calculates its length.
default doublegetLength(Curve<GISMarkupSegment> curve)
Retrieves length of the specified route.
default 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.
default Curve<GISMarkupSegment>getPathData(Point... points)
Create route with intermediate points.
default Curve<GISMarkupSegment>getPathData(Point startPoint, Point endPoint, Curve<GISMarkupSegment> out)
Retrieves the route data an agent will use to calculate the route length and determine its position on the route by calling IRouteProvider.getLength(IPathData) and IRouteProvider.getPositionAtOffset(IPathData, double, Position) respectively.
default PositiongetPositionAtOffset(Curve<GISMarkupSegment> pathData, double offset, Position out)
Retrieves agent's position on the route.
default GISRoutegetRoute(ShapeGISMap map, double startLat, double startLon, double endLat, double endLon)
Returns unidirectional GISRoute created according to provider's settings.
default GISRoutegetRoute(ShapeGISMap map, double startLat, double startLon, double endLat, double endLon, boolean bidirectional)
Returns GISRoute created according to provider's settings.
default GISRoutegetRoute(ShapeGISMap map, GISPoint start, GISPoint end)
Returns unidirectional GISRoute created according to provider's settings.
default GISRoutegetRoute(ShapeGISMap map, GISPoint start, GISPoint end, boolean bidirectional)
Returns GISRoute created according to provider's settings.

Method Details

getPathData

Curve<GISMarkupSegment> getPathData(double startLat,
 double startLon,
 double endLat,
 double endLon)
Creates route from one point to another.
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

getDistance

default double getDistance(double startLat,
 double startLon,
 double endLat,
 double endLon)
Calculates distance by route between two specified points.
Parameters:
startLat -
startLon -
endLat -
endLon -
Returns:
the distance between two specified points, measured in meters.

getDistance

@AnyLogicInternalAPI
default double getDistance(Point... points)
Calculates distance by route with intermediate points.
Parameters:
points - the array of points, first point is the start point, last point is the end point
Returns:
the distance of route which sequentially connects all specified points

getDistance

@AnyLogicInternalAPI
default double getDistance(double... latLonPoints)
Calculates 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

getPathData

default Curve<GISMarkupSegment> getPathData(Point startPoint,
 Point endPoint,
 Curve<GISMarkupSegment> out)
Description copied from interface: IRouteProvider
Retrieves the route data an agent will use to calculate the route length and determine its position on the route by calling IRouteProvider.getLength(IPathData) and IRouteProvider.getPositionAtOffset(IPathData, double, Position) respectively.
Specified by:
getPathData in interface IRouteProvider<Curve<GISMarkupSegment>>
Parameters:
startPoint - Start point of the route
endPoint - End point of the route
out - This parameter was added to prevent creating additional instances of route data objects; could be null
Returns:
the route data to move an agent between specified points;
See Also:
IPathData

getPathData

@AnyLogicInternalAPI
default Curve<GISMarkupSegment> getPathData(Point... points)
Create route with intermediate points.
Parameters:
points - the array of points, first point is the start point, last point is the end point
Returns:
the curve which sequentially connects all specified points

getPathData

@AnyLogicInternalAPI
default Curve<GISMarkupSegment> getPathData(double... latLonPoints)
Create route with intermediate points specified by pairs of latitude and longitude.
Parameters:
latLonPoints - the array of coordinates ([latitude1, longitude1, latitude2, longitude2, ... latitudeN, longitudeN])
Returns:
the curve which sequentially connects all specified points

getDistance

default double getDistance(Point startPoint,
 Point endPoint)
Description copied from interface: IRouteProvider
Creates a route from one point to another and calculates its length. Uses route provider to create a route.
Specified by:
getDistance in interface IRouteProvider<Curve<GISMarkupSegment>>
Parameters:
startPoint - Start point of a route
endPoint - End point of a route
Returns:
length of a route from one point to another

getPositionAtOffset

default Position getPositionAtOffset(Curve<GISMarkupSegment> pathData,
 double offset,
 Position out)
Description copied from interface: IRouteProvider
Retrieves agent's position on the route.
Specified by:
getPositionAtOffset in interface IRouteProvider<Curve<GISMarkupSegment>>
Parameters:
pathData - The route data of moving agent
offset - The distance that agent should pass to reach the end of the route
out - This parameter was added to prevent creating additional instances; could be null
Returns:
Agent's position on the route
See Also:
PositionIPathData

getLength

default double getLength(Curve<GISMarkupSegment> curve)
Description copied from interface: IRouteProvider
Retrieves length of the specified route.
Specified by:
getLength in interface IRouteProvider<Curve<GISMarkupSegment>>
Parameters:
curve - the route data
Returns:
length of the specified route

getRoute

default GISRoute getRoute(ShapeGISMap map,
 GISPoint start,
 GISPoint end,
 boolean bidirectional)
Returns GISRoute created according to provider's settings.
Parameters:
map -
start -
end -
bidirectional -

getRoute

default GISRoute getRoute(ShapeGISMap map,
 GISPoint start,
 GISPoint end)
Returns unidirectional GISRoute created according to provider's settings.
Parameters:
map -
start -
end -

getRoute

default GISRoute getRoute(ShapeGISMap map,
 double startLat,
 double startLon,
 double endLat,
 double endLon,
 boolean bidirectional)
Returns GISRoute created according to provider's settings.
Parameters:
map -
startLat -
startLon -
endLat -
endLon -
bidirectional -

getRoute

default GISRoute getRoute(ShapeGISMap map,
 double startLat,
 double startLon,
 double endLat,
 double endLon)
Returns unidirectional GISRoute created according to provider's settings.
Parameters:
map -
startLat -
startLon -
endLat -
endLon -