OsmAnd/OsmAnd-java/src/net/osmand/router/VehicleRouter.java

82 lines
1.8 KiB
Java
Raw Normal View History

package net.osmand.router;
2014-02-02 14:06:09 +01:00
import java.util.Map;
import net.osmand.binary.RouteDataObject;
import net.osmand.router.BinaryRoutePlanner.RouteSegment;
2014-02-02 14:06:09 +01:00
public interface VehicleRouter {
2014-02-02 14:06:09 +01:00
public boolean containsAttribute(String attribute);
2014-02-02 14:06:09 +01:00
public String getAttribute(String attribute);
2014-02-02 14:06:09 +01:00
/**
* return if the road is accepted for routing
*/
public boolean acceptLine(RouteDataObject way);
2014-02-02 14:06:09 +01:00
/**
* return oneway +/- 1 if it is oneway and 0 if both ways
*/
public int isOneWay(RouteDataObject road);
2014-07-18 17:50:38 +02:00
/**
* return penalty transition in seconds
*/
public float getPenaltyTransition(RouteDataObject road);
/**
2014-02-02 14:06:09 +01:00
* return delay in seconds (0 no obstacles)
*/
2014-02-02 14:06:09 +01:00
public float defineObstacle(RouteDataObject road, int point);
2014-02-02 14:06:09 +01:00
/**
* return delay in seconds (0 no obstacles)
*/
public float defineRoutingObstacle(RouteDataObject road, int point);
/**
2014-02-02 14:06:09 +01:00
* return routing speed in m/s for vehicle for specified road
*/
2014-02-02 14:06:09 +01:00
public float defineRoutingSpeed(RouteDataObject road);
/**
* return real speed in m/s for vehicle for specified road
*/
public float defineVehicleSpeed(RouteDataObject road);
/**
* define priority to multiply the speed for g(x) A*
*/
2014-02-02 14:06:09 +01:00
public float defineSpeedPriority(RouteDataObject road);
/**
* Used for A* routing to calculate g(x)
*
* @return minimal speed at road in m/s
*/
2014-02-02 14:06:09 +01:00
public float getMinDefaultSpeed();
/**
* Used for A* routing to predict h(x) : it should be great any g(x)
*
* @return maximum speed to calculate shortest distance
*/
2014-02-02 14:06:09 +01:00
public float getMaxDefaultSpeed();
/**
* aware of road restrictions
*/
public boolean restrictionsAware();
/**
* Calculate turn time
*/
2014-02-02 14:06:09 +01:00
public double calculateTurnTime(RouteSegment segment, int segmentEnd, RouteSegment prev, int prevSegmentEnd);
public VehicleRouter build(Map<String, String> params);
}