Package com.graphhopper.reader.dem
Class MultiSourceElevationProvider
java.lang.Object
com.graphhopper.reader.dem.TileBasedElevationProvider
com.graphhopper.reader.dem.MultiSourceElevationProvider
- All Implemented Interfaces:
ElevationProvider
The MultiSourceElevationProvider mixes different elevation providers to provide the best available elevation data
for a certain area.
- Author:
- Robin Boldt
-
Field Summary
Fields inherited from interface com.graphhopper.reader.dem.ElevationProvider
NOOP
-
Constructor Summary
ConstructorsConstructorDescriptionMultiSourceElevationProvider
(TileBasedElevationProvider srtmProvider, TileBasedElevationProvider globalProvider) MultiSourceElevationProvider
(String cacheDir) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns true if bilinear interpolation is enabled.double
getEle
(double lat, double lon) void
release()
Release resources.setAutoRemoveTemporaryFiles
(boolean autoRemoveTemporary) Creating temporary files can take a long time as we need to unpack them as well as to fill our DataAccess object, so this option can be used to disable the default clear mechanism via specifying 'false'.setBaseURL
(String baseURL) For the MultiSourceElevationProvider you have to specify the base URL separated by a ';'.Set to true if you have a small area and need high speed access.setInterpolate
(boolean interpolate) Configuration option to use bilinear interpolation to find the elevation at a point from the surrounding elevation points.toString()
Methods inherited from class com.graphhopper.reader.dem.TileBasedElevationProvider
getCacheDir, getDirectory, setDownloader
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.graphhopper.reader.dem.ElevationProvider
getEle
-
Constructor Details
-
MultiSourceElevationProvider
public MultiSourceElevationProvider(TileBasedElevationProvider srtmProvider, TileBasedElevationProvider globalProvider) -
MultiSourceElevationProvider
public MultiSourceElevationProvider() -
MultiSourceElevationProvider
-
-
Method Details
-
getEle
public double getEle(double lat, double lon) - Returns:
- returns the height in meters or Double.NaN if invalid
-
setBaseURL
For the MultiSourceElevationProvider you have to specify the base URL separated by a ';'. The first for cgiar, the second for gmted.- Overrides:
setBaseURL
in classTileBasedElevationProvider
-
setDAType
Description copied from class:TileBasedElevationProvider
Set to true if you have a small area and need high speed access. Default is DAType.MMAP- Overrides:
setDAType
in classTileBasedElevationProvider
-
setInterpolate
Description copied from class:TileBasedElevationProvider
Configuration option to use bilinear interpolation to find the elevation at a point from the surrounding elevation points. Has only an effect if called before the first getEle call. Turned off by default.- Overrides:
setInterpolate
in classTileBasedElevationProvider
-
canInterpolate
public boolean canInterpolate()Description copied from interface:ElevationProvider
Returns true if bilinear interpolation is enabled.- Specified by:
canInterpolate
in interfaceElevationProvider
- Overrides:
canInterpolate
in classTileBasedElevationProvider
-
release
public void release()Description copied from interface:ElevationProvider
Release resources. -
setAutoRemoveTemporaryFiles
Description copied from class:TileBasedElevationProvider
Creating temporary files can take a long time as we need to unpack them as well as to fill our DataAccess object, so this option can be used to disable the default clear mechanism via specifying 'false'.- Overrides:
setAutoRemoveTemporaryFiles
in classTileBasedElevationProvider
-
toString
-