public class Location2IDFullWithEdgesIndex extends Object implements LocationIndex
LocationIndex.EdgeVisitor, LocationIndex.Visitor| Constructor and Description |
|---|
Location2IDFullWithEdgesIndex(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 filter)
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.
|
void |
query(BBox queryBBox,
LocationIndex.Visitor function)
This method explores the nodes in this LocationIndex with the specified Visitor.
|
LocationIndex |
setApproximation(boolean approxDist) |
LocationIndex |
setResolution(int resolution)
Integer value to specify the resolution of this location index.
|
void |
setSegmentSize(int bytes) |
public Location2IDFullWithEdgesIndex(Graph g)
public boolean loadExisting()
loadExisting in interface Storable<LocationIndex>public LocationIndex setResolution(int resolution)
LocationIndexsetResolution in interface LocationIndexpublic LocationIndex setApproximation(boolean approxDist)
setApproximation in interface LocationIndexapproxDist - false if initialization and querying should be faster but less precise.public LocationIndex prepareIndex()
LocationIndexprepareIndex in interface LocationIndexpublic QueryResult findClosest(double queryLat, double queryLon, EdgeFilter filter)
LocationIndexfindClosest in interface LocationIndexfilter - 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 void query(BBox queryBBox, LocationIndex.Visitor function)
LocationIndexquery in interface LocationIndexpublic 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–2020. All rights reserved.