Terrain
Three queries read the surface itself, independently of any route. Pick the one that matches the shape of the question:
terrainSamplesfor readings at coordinates you already know.terrainProfilefor readings along a line — an elevation profile as data.terrainGridfor readings across an area whose features are not yet located, such as finding high ground or a slope facing a given direction.
All three return the same TerrainSample shape and read from the same digital elevation model, so a value means the same thing whichever query produced it. Coordinates are [longitude, latitude] in WGS 84, elevations are in meters above sea level, and slope is in degrees.
The sample
point[Float!]!
Echo of the sampled [longitude, latitude].
elevationFloat
Meters above sea level. Null outside DEM coverage.
slopeFloat
Slope angle in degrees. Null outside DEM coverage.
aspectFloat
Downhill compass bearing, 0-360, where 0 is north. Null outside DEM coverage, and null on flat ground, which has no downhill direction.
aspectOctantAspectOctant
aspect as a compass octant: NORTH, NORTH_EAST, EAST, SOUTH_EAST, SOUTH, SOUTH_WEST, WEST, NORTH_WEST. Null whenever aspect is null.
steepnessBandSteepnessBand
FROM_25_TO_30, FROM_30_TO_35, FROM_35_TO_40, FROM_40_TO_45, or ABOVE_45. Null below 25 degrees and outside DEM coverage.
distanceMetersFloat
Distance along the geometry from its start. Populated by terrainProfile only; null in a terrainSamples or terrainGrid result.
aspectOctant and steepnessBand use the same vocabulary as the aspect and steepness map overlays, so a value you read here matches the legend a user sees on the map.
Every result also carries zoom and resolutionMeters, the DEM tile zoom the reading was taken at and the ground distance one pixel covers there, so a reading can be reproduced later.
terrainSamples
Readings at specific points.
Input
terrainSamples(input: TerrainSamplesInput!)
locations[[Float!]!]!
Between 1 and 100 [longitude, latitude] pairs.
Example
Response
TerrainSamplesResult returns count, coveredCount, zoom, resolutionMeters, and samples, one entry per requested location in the order you sent them.
terrainProfile
Readings along a line: the elevation profile of a geometry, as data.
Input
terrainProfile(input: TerrainProfileInput!)
coordinates[[Float!]!]!
Ordered [longitude, latitude] pairs forming the geometry.
spacingMetersFloat
default: 100
Target sampling interval in meters, between 10 and 1000.
Example
Response
TerrainProfileResult has the same shape as TerrainSamplesResult, and its samples carry distanceMeters.
terrainGrid
Readings across an area, on a regular lattice.
Input
terrainGrid(input: TerrainGridInput!)
bbox[Float!]!
[minLongitude, minLatitude, maxLongitude, maxLatitude].
colsInt
default: 16
Number of grid columns, between 2 and 64.
rowsInt
default: 16
Number of grid rows, between 2 and 64.
Example
Response
TerrainGridResult returns the samples as cells rather than samples, and echoes the cols and rows it laid them out on, so a flat list maps back onto the lattice by index.