Terrain Tiles

The API serves raster tiles of Terrain Tiles dataset - basemap digital elevation model (DEM) of the world in a raster tile format.

For more information on Terrain Tiles please refer to: https://mapzen.com/documentation/terrain-tiles/

Representation of DEM data

Various techniques can be used to visualize terrain data.

Hillshade

Shaded relief, or hill-shading, shows the shape of the terrain in a realistic fashion by showing how the three-dimensional surface would be illuminated from a point light source. For details, see: https://en.wikipedia.org/wiki/Terrain_cartography#Shaded_relief

GeoTIFF

Tiles in GeoTIFF format, with spatial reference. Default dimensions - 256 x 256 pixels. Default projection - EPSG:3857 (Pseudo-Mercator, Web Mercator).

Slope

Slope is the measure of steepness or the degree of inclination of a feature relative to the horizontal plane. Wiki: https://en.wikipedia.org/wiki/Grade_%28slope%29

API format

GET /api/render/terrain/{z}/{x}/{y}

Render a raster tile of Terrain Tiles dataset. Avaliable zooms: [1, 16].

Parameters:
  • x – tile coordinate x
  • y – tile coordinate y
  • z – tile coordinate z
Query Parameters:
 
  • format(optional) tile format [hillshade, geotiff, slope]. Default : hillshade
  • FILTERING(optional) bool parameter, apply artifact removing (filtering) to tile? Default : FALSE
  • COLORMAP(optional) name of colormap to be applied for slope. Default : terrain
  • MIN_SLOPE(optional) min slope to be shown. Default : 0
  • SLOPE_RANGE(optional) slope range for map visualization and legend. Default : (0.0,90.0)
  • AZIMUTH(optional, valid when format=hillshade) The azimuth is the angular direction of the sun, measured from north in clockwise degrees from 0 to 360. An azimuth of 90 degrees is east. The default azimuth is 315 degrees (NW). Visualization: https://www.youtube.com/watch?v=Vf0mAmxLU4M
  • ALTITUDE(optional, valid when format=hillshade) The altitude is the slope or angle of the illumination source above the horizon. The units are in degrees, from 0 (on the horizon) to 90 (overhead). The default is 45 degrees. Visualization: https://www.youtube.com/watch?v=im84wGILI7I
  • THRESHOLDS(optional, valid when format=hillshade) The value thresholds for coloring the terrain.
  • COLORS(optional, valid when format=hillshade) The hex color values linked to the corresponding ranges, which are derived by given THRESHOLDS.

Examples

Hillshade

http

GET /api/render/terrain/14/9789/5666?api_key=XXX HTTP/1.1
Host: gate.eos.com

curl

curl -i 'https://gate.eos.com/api/render/terrain/14/9789/5666?api_key=XXX'

GeoTIFF

Default representation

http

GET /api/render/terrain/14/9789/5666?format=geotiff&api_key=XXX HTTP/1.1
Host: gate.eos.com

curl

curl -i 'https://gate.eos.com/api/render/terrain/14/9789/5666?format=geotiff&api_key=XXX'

Outliers filtering

http

GET /api/render/terrain/14/9789/5666?format=geotiff&FILTERING=TRUE&api_key=XXX HTTP/1.1
Host: gate.eos.com

curl

curl -i 'https://gate.eos.com/api/render/terrain/14/9789/5666?format=geotiff&FILTERING=TRUE&api_key=XXX'

Slope

Default slope visualization

http

GET /api/render/terrain/12/2444/1415?format=slope&api_key=XXX HTTP/1.1
Host: gate.eos.com

curl

curl -i 'https://gate.eos.com/api/render/terrain/12/2444/1415?format=slope&api_key=XXX'

Slope visualization with a custom palette

http

GET /api/render/terrain/16/38932/22785?format=slope&COLORMAP=OrRd_r&api_key=XXX HTTP/1.1
Host: gate.eos.com

curl

curl -i 'https://gate.eos.com/api/render/terrain/16/38932/22785?format=slope&COLORMAP=OrRd_r&api_key=XXX'

Slope range correction

When a minimum and maximum values of slope are known in advance they can be set using SLOPE_RANGE query to enhance local representation.

http

GET /api/render/terrain/3/2/2?format=slope&COLORMAP=Spectral&SLOPE_RANGE=0%2C70&api_key=XXX HTTP/1.1
Host: gate.eos.com

curl

curl -i 'https://gate.eos.com/api/render/terrain/3/2/2?format=slope&COLORMAP=Spectral&SLOPE_RANGE=0%2C70&api_key=XXX'