public class LocationIndexTree extends Object implements LocationIndex
SpatialKeyAlgo and can the use the resulting raw bits as cell index to recurse
into the subtrees. E.g. if there are 3 layers with 16, 4 and 4 cells each, then the spatial key has
three parts: 4 bits for the cellIndex into the 16 cells, 2 bits for the next layer and 2 bits for the last layer.| Modifier and Type | Class and Description |
|---|---|
static interface |
LocationIndexTree.EdgeCheck |
LocationIndex.Visitor| Constructor and Description |
|---|
LocationIndexTree(Graph g,
Directory dir) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
Snap |
findClosest(double queryLat,
double queryLon,
EdgeFilter edgeFilter)
This method returns the closest Snap for the specified location (lat, lon) and only if
the filter accepts the edge as valid candidate (e.g.
|
void |
flush() |
long |
getCapacity() |
int |
getMinResolutionInMeter() |
boolean |
isClosed() |
boolean |
loadExisting() |
LocationIndex |
prepareIndex() |
LocationIndex |
prepareIndex(EdgeFilter edgeFilter) |
void |
query(BBox queryBBox,
LocationIndex.Visitor function)
This method explores the LocationIndex with the specified Visitor.
|
LocationIndexTree |
setMaxRegionSearch(int numTiles)
Searches also neighbouring tiles until the maximum distance from the query point is reached
(minResolutionInMeter*regionAround).
|
LocationIndexTree |
setMinResolutionInMeter(int minResolutionInMeter)
Minimum width in meter of one tile.
|
LocationIndex |
setResolution(int minResolutionInMeter) |
void |
traverseEdge(double queryLat,
double queryLon,
EdgeIteratorState currEdge,
LocationIndexTree.EdgeCheck edgeCheck) |
public int getMinResolutionInMeter()
public LocationIndexTree setMinResolutionInMeter(int minResolutionInMeter)
public LocationIndexTree setMaxRegionSearch(int numTiles)
public LocationIndex setResolution(int minResolutionInMeter)
public boolean loadExisting()
public void flush()
public LocationIndex prepareIndex()
public LocationIndex prepareIndex(EdgeFilter edgeFilter)
public void close()
close in interface LocationIndexpublic boolean isClosed()
public long getCapacity()
public Snap findClosest(double queryLat, double queryLon, EdgeFilter edgeFilter)
LocationIndexfindClosest in interface LocationIndexedgeFilter - if a graph supports multiple vehicles we have to make sure that the entry
node into the graph is accessible from a selected vehicle. E.g. if you have a FOOT-query do:
AccessFilter.allEdges(footFlagEncoder);
public void query(BBox queryBBox, LocationIndex.Visitor function)
LocationIndexquery in interface LocationIndexpublic void traverseEdge(double queryLat,
double queryLon,
EdgeIteratorState currEdge,
LocationIndexTree.EdgeCheck edgeCheck)
Copyright © 2012–2022. All rights reserved.