Class TileBasedElevationProvider

java.lang.Object
com.graphhopper.reader.dem.TileBasedElevationProvider
All Implemented Interfaces:
ElevationProvider
Direct Known Subclasses:
AbstractSRTMElevationProvider, AbstractTiffElevationProvider, MultiSourceElevationProvider

public abstract class TileBasedElevationProvider extends Object implements ElevationProvider
Provides basic methods that are usually used in an ElevationProvider using tiles from files.
Author:
Robin Boldt
  • Constructor Details

    • TileBasedElevationProvider

      protected TileBasedElevationProvider(String cacheDirString)
  • Method Details

    • setInterpolate

      public TileBasedElevationProvider setInterpolate(boolean interpolate)
      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.
    • canInterpolate

      public boolean canInterpolate()
      Description copied from interface: ElevationProvider
      Returns true if bilinear interpolation is enabled.
      Specified by:
      canInterpolate in interface ElevationProvider
    • setBaseURL

      public TileBasedElevationProvider setBaseURL(String baseUrl)
      Specifies the service URL where to download the elevation data. An empty string should set it to the default URL. Default is a provider-dependent URL which should work out of the box.
    • setDAType

      public TileBasedElevationProvider setDAType(DAType daType)
      Set to true if you have a small area and need high speed access. Default is DAType.MMAP
    • setAutoRemoveTemporaryFiles

      public TileBasedElevationProvider 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'.
    • setDownloader

      public TileBasedElevationProvider setDownloader(Downloader downloader)
    • getCacheDir

      protected File getCacheDir()
    • getDirectory

      protected Directory getDirectory()