public class LandmarkStorage extends Object implements Storable<LandmarkStorage>
Constructor and Description |
---|
LandmarkStorage(GraphHopperStorage graph,
Directory dir,
LMConfig lmConfig,
int landmarks) |
Modifier and Type | Method and Description |
---|---|
void |
close()
This method makes sure that the underlying used resources are released.
|
LandmarkStorage |
create(long byteCount)
Creates the underlying storage.
|
void |
createLandmarks()
This method calculates the landmarks and initial weightings to & from them.
|
protected com.carrotsearch.hppc.IntHashSet |
findBorderEdgeIds(SpatialRuleLookup ruleLookup)
This method makes edges crossing the specified border inaccessible to split a bigger area into smaller subnetworks.
|
void |
flush()
This method makes sure that the underlying data is written to the storage.
|
long |
getCapacity() |
int |
getLandmarkCount() |
int[] |
getLandmarks(int subnetwork) |
Weighting |
getLmSelectionWeighting() |
int |
getMinimumNodes() |
int |
getSubnetworksWithLandmarks() |
Weighting |
getWeighting()
This method returns the weighting for which the landmarks are originally created
|
boolean |
isClosed() |
boolean |
isEmpty() |
boolean |
loadExisting() |
LandmarkStorage |
setLandmarkSuggestions(List<LandmarkSuggestion> landmarkSuggestions)
This method forces the landmark preparation to skip the landmark search and uses the specified landmark list instead.
|
void |
setLMSelectionWeighting(Weighting lmSelectionWeighting)
This weighting is used for the selection heuristic and is per default not the weighting specified in the contructor.
|
void |
setLogDetails(boolean logDetails)
By default do not log many details.
|
LandmarkStorage |
setMaximumWeight(double maxWeight)
Specify the maximum possible value for your used area.
|
void |
setMinimumNodes(int minimumNodes)
This method sets the required number of nodes of a subnetwork for which landmarks should be calculated.
|
void |
setSpatialRuleLookup(SpatialRuleLookup ruleLookup)
This method specifies the polygons which should be used to split the world wide area to improve performance and
quality in this scenario.
|
String |
toString() |
public LandmarkStorage(GraphHopperStorage graph, Directory dir, LMConfig lmConfig, int landmarks)
public LandmarkStorage setMaximumWeight(double maxWeight)
maxWeight
- use a negative value to automatically determine this value.public void setLogDetails(boolean logDetails)
public LandmarkStorage setLandmarkSuggestions(List<LandmarkSuggestion> landmarkSuggestions)
public void setMinimumNodes(int minimumNodes)
public int getMinimumNodes()
setMinimumNodes(int)
public void setLMSelectionWeighting(Weighting lmSelectionWeighting)
public Weighting getLmSelectionWeighting()
public Weighting getWeighting()
public void createLandmarks()
public void setSpatialRuleLookup(SpatialRuleLookup ruleLookup)
protected com.carrotsearch.hppc.IntHashSet findBorderEdgeIds(SpatialRuleLookup ruleLookup)
public int getLandmarkCount()
public int[] getLandmarks(int subnetwork)
public int getSubnetworksWithLandmarks()
public boolean isEmpty()
public boolean loadExisting()
loadExisting
in interface Storable<LandmarkStorage>
public LandmarkStorage create(long byteCount)
Storable
create
in interface Storable<LandmarkStorage>
public void flush()
Storable
flush
in interface Storable<LandmarkStorage>
public void close()
Storable
close
in interface Storable<LandmarkStorage>
close
in interface Closeable
close
in interface AutoCloseable
public boolean isClosed()
isClosed
in interface Storable<LandmarkStorage>
public long getCapacity()
getCapacity
in interface Storable<LandmarkStorage>
Copyright © 2012–2020. All rights reserved.