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 SpatialRuleLookup
public SpatialRule lookupRule(GHPoint point)
SpatialRuleLookup
SpatialRuleLookup.lookupRule(double, double)
for details.lookupRule
in interface SpatialRuleLookup
public int getSpatialId(SpatialRule rule)
SpatialRuleLookup
getSpatialId
in interface SpatialRuleLookup
public SpatialRule getSpatialRule(int spatialId)
SpatialRuleLookup
getSpatialRule
in interface SpatialRuleLookup
public int size()
size
in interface SpatialRuleLookup
public org.locationtech.jts.geom.Envelope getBounds()
getBounds
in interface SpatialRuleLookup
Copyright © 2012–2020. All rights reserved.