Skip to main content

Terrain tile API

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/

ParameterDescription
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.

Representation of DEM data​

Various techniques can be used to visualize terrain data.

curl 'https://api-connect.eos.com/api/render/terrain/11/328/794?api_key=<your api key>'

Render terrain

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).

Default representation​

https://api-connect.eos.com/api/render/terrain/11/328/794?format=geotiff&api_key=<your_api_key>

Outliers filtering​

https://api-connect.eos.com/api/render/terrain/11/328/794?format=geotiff&FILTERING=TRUE&api_key=<your_api_key>

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

Default slope visualization​

https://api-connect.eos.com/api/render/terrain/11/328/794?format=slope&api_key=<your_api_key>

Render terrain

Slope visualization with a custom palette​

https://api-connect.eos.com/api/render/terrain/11/328/794?format=slope&COLORMAP=OrRd_r&api_key=<your_api_key>

Render terrain

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.

https://api-connect.eos.com/api/render/terrain/11/328/794?format=slope&COLORMAP=Spectral&SLOPE_RANGE=0%2C70&api_key=<your_api_key>

HTTP Request​

GET https://api-connect.eos.com/api/render/terrain/<z>/<x>/<y>?api_key=<your api key>

Example:

https://api-connect.eos.com/api/render/terrain/11/328/794?api_key=<your_api_key>

Elevation point value​

Get elevation value in a given point.

curl -i 'https://api-connect.eos.com/api/render/terrain/point/<lat>/<lon>?api_key=<your_api_key>'

The above commands returns the following JSON with results

{"index_value": 1198.758544921875}

HTTP Request​

GET https://api-connect.eos.com/api/render/terrain/point/<lat>/<lon>?api_key=<your_api_key>

Parameters​

ParameterValueDescription
lat35.947344068Latitude geographic coordinate that specifies the north–south position of a point on the Earth’s surface
lon121.345009409Longitude is a geographic coordinate that specifies the east-west position of a point on the Earth’s surface. It is an angular measurement

Query parameters​

ParameterValueDescription
api_key(Required) Apikey retrieved from developer portal