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, waitgetIdpublic 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)
SpatialRulegetMaxSpeed in interface SpatialRuleroadClass - The highway type, e.g. RoadClass.MOTORWAYtransport - The mode of transportationcurrentMaxSpeed - The current max speed value or Double.NaN if no value has been set yetpublic RoadAccess getAccess(RoadClass roadClass, TransportationMode transport, RoadAccess currentRoadAccess)
SpatialRuleRoadAccess for a certain highway type and transportation transport.getAccess in interface SpatialRuleroadClass - The highway type, e.g. RoadClass.MOTORWAYtransport - The mode of transportationcurrentRoadAccess - The current road access value (default: RoadAccess.YES)public List<org.locationtech.jts.geom.Polygon> getBorders()
SpatialRulegetBorders in interface SpatialRulepublic int getPriority()
SpatialRulegetPriority in interface SpatialRuleInteger.MIN_VALUE (minimum priority) and
Integer.MAX_VALUE (maximum priority)Copyright © 2012–2020. All rights reserved.