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)
LocationIndex
setResolution
in interface LocationIndex
public LocationIndex setApproximation(boolean approxDist)
setApproximation
in interface LocationIndex
approxDist
- false if initialization and querying should be faster but less precise.public LocationIndex prepareIndex()
LocationIndex
prepareIndex
in interface LocationIndex
public QueryResult findClosest(double queryLat, double queryLon, EdgeFilter filter)
LocationIndex
findClosest
in interface LocationIndex
filter
- 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)
LocationIndex
query
in interface LocationIndex
public LocationIndex create(long size)
Storable
create
in interface Storable<LocationIndex>
public void flush()
Storable
flush
in interface Storable<LocationIndex>
public void close()
Storable
close
in interface Storable<LocationIndex>
close
in interface Closeable
close
in interface AutoCloseable
public boolean isClosed()
isClosed
in interface Storable<LocationIndex>
public long getCapacity()
getCapacity
in interface Storable<LocationIndex>
public void setSegmentSize(int bytes)
setSegmentSize
in interface LocationIndex
Copyright © 2012–2020. All rights reserved.