wiki:WikiStart

Version 3 (modified by Uriel, 7 years ago) (diff)

--

Maps Wiki

Documenting the lessons learned in trying to make a topographic world map using Maperitive and other tools. Most of this wiki will describe the process used to create a world topographic map (ie: shading based on mountains and other terrain). Adding urban data such as streets, place names, and borders was attempted but not finished.

All of the files referenced here have been downloaded to or backed up on a WD Elements 6TB USB drive currently plugged into the Michigan computer at the SDI office.

Maperitive

Maperitive is a free application for generating maps from Open Street Map data. It is also able to generate terrain maps using a set of NASA-created global height data called SRTM. The end goal of the operation is to output the map as Web Tiles, a set of static images at varying "zoom levels" which can be tiled together to make a seamless map.

The downside to this is that the entire earth is very big and requires a lot of RAM to hold all the data when the map is zoomed in far enough. The solution to this was to use scripts to break the planet up into smaller pieces which can be individually processed.

SRTM Data

Maperitive uses NASA SRTM data to generate shaded terrain maps. In the past, Maperitive was able to connect to NASA's servers and download the data as needed. Since then, NASA has locked down the servers behind a free login. A newer version of Maperitive exists which might have a workaround for this issue, but this documentation presumes Maperitive can't download the data. Instead of Maperitive downloading the data, it can be downloaded manually and then just placed in a location that Maperitive expects SRTM data to be; then it will not attempt to download it again.

The SRTM data comes in two resolutions:

  • SRTMGL1, 1-arcsecond data, divides the earth into .hgt data files covering 1x1 degree lat/lon. Each file is 3601x3601 16-bit pixels (~26MB).
  • SRTMGL3, 3-arcsecond data. Each file is 1201x1201 pixels (~2.8MB).

If downloading more than one file at a time, SRTM data is most easily obtained from NASA's servers using the Daac2Disk utility. This example command will download the entire SRTMGL1 dataset to the SRTMGL1 folder: Daac2Disk_win.exe --shortname SRTMGL1 --versionid 003 --nometadata --outputdir SRTMGL1. This utility can also be used to download data within a set of lat/lon bounds using the --bbox parameter.

To download the data from the web or using Daac2Disk, you will need NASA Earthdata account: https://urs.earthdata.nasa.gov/home. Once you have created your account, log in and from "My Applications", add the LPDAAC Data Pool.

Using SRTM in Maperitive

Once the entire world data is downloaded, a few things need to be set to use it properly in Maperitive. Copies of the STRMGL1 and GL3 datasets are on the USB drive in the folders STRMGL1 and SRTMGL3

Filling in the gaps: Areas of the world which are entirely ocean have no corresponding SRTM file, but Maperitive will try to download the file anyway. The fix for this was to generate all-zero height files for any lat/long missing from the downloaded data set. The Python script fill_terrain_tiles.py automates this process. The filled-in datasets are on the USB drive in the folders SRTMGL1_full and SRTMGL3_full

Linking the SRTM to Maperitive: In order for Maperitive to find the SRTM data, it must be placed in the correct folder: X:\Maperitive\Cache\Rasters\SRTM1 or X:\Maperitive\Cache\Rasters\SRTM3. On the USB drive, this is performed by creating a softlink to the SRTMGLx_full folder, rather than making another copy of the file. You can use the windows utility mklink to do this; it can be run from the command prompt.

To use the data in Maperitive, you must enter the command set-dem-source name=SRTM1 or set-dem-source name=SRTM3.

Generating the Shading: The nicest shading method Maperitive provides is called "Igor Shading", named after the creator of Maperitive. This will generate a single-color terrain shading of the world

Attachments (1)

Download all attachments as: .zip