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

104 lines
2.2 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);
2017-02-08 09:54:38 +01:00
/**
* return delay in seconds for height obstacles
*/
2017-02-10 18:44:11 +01:00
public double defineHeightObstacle(RouteDataObject road, short startIndex, short endIndex);
2017-02-08 09:54:38 +01:00
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
*/
2019-06-24 14:03:53 +02:00
public float getDefaultSpeed();
/**
* Used as minimal threshold of default speed
*
* @return minimal speed at road in m/s
*/
public float getMinSpeed();
/**
* Used for A* routing to predict h(x) : it should be great any g(x)
*
* @return maximum speed to calculate shortest distance
*/
2019-06-24 14:03:53 +02:00
public float getMaxSpeed();
2014-02-02 14:06:09 +01:00
/**
* aware of road restrictions
*/
public boolean restrictionsAware();
2018-07-31 21:41:38 +02:00
/**
* @param obj
* @return if road supports area routing
*/
public boolean isArea(RouteDataObject obj);
/**
* 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);
2017-02-08 09:54:38 +01:00
2018-07-31 21:41:38 +02:00
2014-02-02 14:06:09 +01:00
}