public class SpatialRuleSet extends Object
Modifier and Type | Field and Description |
---|---|
static SpatialRuleSet |
EMPTY |
Constructor and Description |
---|
SpatialRuleSet(List<SpatialRule> rules,
int spatialId) |
Modifier and Type | Method and Description |
---|---|
RoadAccess |
getAccess(RoadClass roadClass,
TransportationMode transport,
RoadAccess currentRoadAccess)
Returns the
RoadAccess for a certain highway type and transportation mode. |
double |
getMaxSpeed(RoadClass roadClass,
TransportationMode transport,
double currentMaxSpeed)
Return the max speed for a certain road class.
|
List<SpatialRule> |
getRules() |
int |
getSpatialId() |
String |
toString() |
public static final SpatialRuleSet EMPTY
public SpatialRuleSet(List<SpatialRule> rules, int spatialId)
rules
- a List of rules, ordered according to how they are to be appliedspatialId
- the index of the rule with the highest prioritypublic double getMaxSpeed(RoadClass roadClass, TransportationMode transport, double currentMaxSpeed)
roadClass
- The highway type, e.g. RoadClass.MOTORWAY
transport
- The mode of transportationcurrentMaxSpeed
- The current max speed value or -1 if no value has been set yetpublic RoadAccess getAccess(RoadClass roadClass, TransportationMode transport, RoadAccess currentRoadAccess)
RoadAccess
for a certain highway type and transportation mode.roadClass
- The highway type, e.g. RoadClass.MOTORWAY
transport
- The mode of transportationcurrentRoadAccess
- The current road access value (default: RoadAccess.YES
)public List<SpatialRule> getRules()
public int getSpatialId()
Copyright © 2012–2020. All rights reserved.