public class Location2IDFullIndex extends Object implements LocationIndex
| Constructor and Description |
|---|
Location2IDFullIndex(Graph g) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
This method makes sure that the underlying used resources are released.
|
LocationIndex |
create(long size)
Creates the underlying storage.
|
QueryResult |
findClosest(double queryLat,
double queryLon,
EdgeFilter edgeFilter)
This method returns the closest QueryResult for the specified location (lat, lon) and only if
the filter accepts the edge as valid candidate (e.g.
|
void |
flush()
This method makes sure that the underlying data is written to the storage.
|
long |
getCapacity() |
boolean |
isClosed() |
boolean |
loadExisting() |
LocationIndex |
prepareIndex()
Creates this index - to be called once before findID.
|
LocationIndex |
setApproximation(boolean approxDist) |
LocationIndex |
setResolution(int resolution)
Integer value to specify the resolution of this location index.
|
void |
setSegmentSize(int bytes) |
public Location2IDFullIndex(Graph g)
public boolean loadExisting()
loadExisting in interface Storable<LocationIndex>public LocationIndex setApproximation(boolean approxDist)
setApproximation in interface LocationIndexapproxDist - false if initialization and querying should be faster but less precise.public LocationIndex setResolution(int resolution)
LocationIndexsetResolution in interface LocationIndexpublic LocationIndex prepareIndex()
LocationIndexprepareIndex in interface LocationIndexpublic QueryResult 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:
DefaultEdgeFilter.allEdges(footFlagEncoder);
public LocationIndex create(long size)
Storablecreate in interface Storable<LocationIndex>public void flush()
Storableflush in interface Storable<LocationIndex>public void close()
Storableclose in interface Storable<LocationIndex>close in interface Closeableclose in interface AutoCloseablepublic boolean isClosed()
isClosed in interface Storable<LocationIndex>public long getCapacity()
getCapacity in interface Storable<LocationIndex>public void setSegmentSize(int bytes)
setSegmentSize in interface LocationIndexCopyright © 2012–2018. All rights reserved.