public class SpatialRuleLookupJTS extends Object implements SpatialRuleLookup
EMPTY| Constructor and Description |
|---|
SpatialRuleLookupJTS(List<SpatialRule> spatialRules,
org.locationtech.jts.geom.Envelope maxBounds) |
| Modifier and Type | Method and Description |
|---|---|
org.locationtech.jts.geom.Envelope |
getBounds() |
int |
getSpatialId(SpatialRule rule)
This method returns an identification number from 0 to size (exclusive) for the specified rule.
|
SpatialRule |
getSpatialRule(int spatialId)
This method returns the SpatialRule for a given Spatial Id.
|
SpatialRule |
lookupRule(double lat,
double lon)
Return an applicable rule for this location.
|
SpatialRule |
lookupRule(GHPoint point)
See
SpatialRuleLookup.lookupRule(double, double) for details. |
int |
size() |
public SpatialRuleLookupJTS(List<SpatialRule> spatialRules, org.locationtech.jts.geom.Envelope maxBounds)
public SpatialRule lookupRule(double lat, double lon)
SpatialRuleLookup
If the requested location is outside of the supported bounds or no SpatialRule is registered at this location
SpatialRule.EMPTY is returned.
lookupRule in interface SpatialRuleLookuppublic SpatialRule lookupRule(GHPoint point)
SpatialRuleLookupSpatialRuleLookup.lookupRule(double, double) for details.lookupRule in interface SpatialRuleLookuppublic int getSpatialId(SpatialRule rule)
SpatialRuleLookupgetSpatialId in interface SpatialRuleLookuppublic SpatialRule getSpatialRule(int spatialId)
SpatialRuleLookupgetSpatialRule in interface SpatialRuleLookuppublic int size()
size in interface SpatialRuleLookuppublic org.locationtech.jts.geom.Envelope getBounds()
getBounds in interface SpatialRuleLookupCopyright © 2012–2020. All rights reserved.