public abstract class AbstractSpatialRule extends Object implements SpatialRule
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_PRIORITY |
Constructor and Description |
---|
AbstractSpatialRule(List<org.locationtech.jts.geom.Polygon> borders) |
AbstractSpatialRule(org.locationtech.jts.geom.Polygon border) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
RoadAccess |
getAccess(RoadClass roadClass,
TransportationMode transport,
RoadAccess currentRoadAccess)
Returns the
RoadAccess for a certain highway type and transportation transport. |
List<org.locationtech.jts.geom.Polygon> |
getBorders()
Returns the borders in which the SpatialRule is valid
|
double |
getMaxSpeed(RoadClass roadClass,
TransportationMode transport,
double currentMaxSpeed)
Return the max speed for a certain road class and transportation mode.
|
int |
getPriority()
Returns the priority of the rule.
|
int |
hashCode() |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getId
public static final int DEFAULT_PRIORITY
public AbstractSpatialRule(List<org.locationtech.jts.geom.Polygon> borders)
public AbstractSpatialRule(org.locationtech.jts.geom.Polygon border)
public double getMaxSpeed(RoadClass roadClass, TransportationMode transport, double currentMaxSpeed)
SpatialRule
getMaxSpeed
in interface SpatialRule
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)
SpatialRule
RoadAccess
for a certain highway type and transportation transport.getAccess
in interface SpatialRule
roadClass
- The highway type, e.g. RoadClass.MOTORWAY
transport
- The mode of transportationcurrentRoadAccess
- The current road access value (default: RoadAccess.YES
)public List<org.locationtech.jts.geom.Polygon> getBorders()
SpatialRule
getBorders
in interface SpatialRule
public int getPriority()
SpatialRule
getPriority
in interface SpatialRule
Integer.MIN_VALUE
(minimum priority) and
Integer.MAX_VALUE
(maximum priority)Copyright © 2012–2020. All rights reserved.