set-dem-provider Command

Contents

Specifies which DEM (digital elevation model) provider Maperitive should use for various DEM-related operations. You can specify built-in providers (like SRTM1 and SRTM3) or a custom provider.

Usage

 set-dem-provider 
     type=<DEM type>
     [custom=<true/false>]
     [cache-dir=<relative directory path>]
     [copyright=<DEM copyright text>]

Parameters:

Examples

set-dem-provider type=srtm3

Tells Maperitive to use the built-in SRTM3 DEM. This means Maperitive will automatically download any needed SRTM3 cells from the NASA's server and store them in the DEM cache on the disk. SRTM3 is the default DEM provider for Maperitive as it offers a global coverage. So this command line can be used to reset the DEM provider setting to its default state.

set-dem-provider type=srtm1

Tells Maperitive to use the built-in SRTM1 DEM. This means Maperitive will automatically download any needed SRTM1 cells from the NASA's server and store them in the DEM cache on the disk. SRTM1 has a better resolution than SRTM3 but it only covers USA (excluding much of Alaska).

Using Custom DEM Providers

Due to the way the data was collected, the "standard" SRTM3 and SRTM1 tiles suffer from data voids, especially in mountainous areas like Alps. The alternative is to use other SRTM-compatible sources like Viewfinder, which uses various approaches to fill the voids and is also available in higher resolutions than SRTM3.

Maperitive automatically downloads data for the built-in DEM providers from the Web. This is not the case for custom providers - you need to download (or prepare somehow) the data yourself and store it in a directory that is a subdirectory of the Cache/Dem directory. For example, if you want to use Viewfinder's data, you need to download the tiles you need and store them in the unzipped format (.hgt) in somewhere under the Cache/Dem directory.

While I could have provided a way to download other DEM sources automatically, I deliberately chose no to, for several reasons:

  1. I do not want to burden other people's servers (NASA is an exception since I expect their infrastructure to be able to cope with this).
  2. I do not want to be responsible for any data abuse: users need to respect the copyright of the data they are using. By forcing the manual download of the data there is a better chance people will go to the source site and read its terms and conditions.

Updating Custom DEM Provider Tiles

Each time DEM data is needed, Maperitive checks which DEM tiles are available in the custom cache. So if you want to extend the coverage of your custom DEM provider, simply download more tiles and place them in the directory beside existing ones. The next time a DEM-related operation is called, it will detect the newly added tiles.

Examples Of Custom DEM Providers Usage

set-dem-provider type=srtm1 custom=true cache-dir=Viewfinder/Alps

Tells Maperitive to use the a custom DEM provider compatible with SRTM1. In this case you need to make sure all the necessary HGT files are in the directory pointed to by the cache-dir parameter (in this case Viewfinder/Alps directory).

set-dem-provider type=srtm3 custom=true cache-dir=Viewfinder/Alps

Tells Maperitive to use the a custom DEM provider compatible with SRTM3. In this case you need to make sure all the necessary HGT files are in the directory pointed to by the cache-dir parameter (in this case Viewfinder/Alps directory).

See also: