Package com.graphhopper.routing.lm
Class LMPreparationHandler
java.lang.Object
com.graphhopper.routing.lm.LMPreparationHandler
This class deals with the A*, landmark and triangulation (ALT) preparations.
- Author:
- Peter Karich
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
int
void
init
(GraphHopperConfig ghConfig) final boolean
load
(List<LMConfig> lmConfigs, BaseGraph baseGraph, EncodedValueLookup encodedValueLookup) Loads the landmark data for all given configs if available.prepare
(List<LMConfig> lmConfigs, BaseGraph baseGraph, EncodingManager encodingManager, StorableProperties properties, LocationIndex locationIndex, boolean closeEarly) Prepares the landmark data for all given configssetLMProfiles
(LMProfile... lmProfiles) setLMProfiles
(Collection<LMProfile> lmProfiles) Enables the use of landmarks to reduce query times.void
setPreparationThreads
(int preparationThreads) This method changes the number of threads used for preparation on import.
-
Constructor Details
-
LMPreparationHandler
public LMPreparationHandler()
-
-
Method Details
-
init
-
getLandmarks
public int getLandmarks() -
isEnabled
public final boolean isEnabled() -
getPreparationThreads
public int getPreparationThreads() -
setPreparationThreads
public void setPreparationThreads(int preparationThreads) This method changes the number of threads used for preparation on import. Default is 1. Make sure that you have enough memory when increasing this number! -
setLMProfiles
-
setLMProfiles
Enables the use of landmarks to reduce query times. -
getLMProfiles
-
load
public List<LandmarkStorage> load(List<LMConfig> lmConfigs, BaseGraph baseGraph, EncodedValueLookup encodedValueLookup) Loads the landmark data for all given configs if available.- Returns:
- the loaded landmark storages
-
prepare
public List<PrepareLandmarks> prepare(List<LMConfig> lmConfigs, BaseGraph baseGraph, EncodingManager encodingManager, StorableProperties properties, LocationIndex locationIndex, boolean closeEarly) Prepares the landmark data for all given configs
-