One layer's shapes inside a box, or a grid of heights
const url = 'https://api.uavcrew.ai/v1/map/tfr?bbox=-97.80%2C30.20%2C-97.70%2C30.30&format=heights&source=srtm';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.uavcrew.ai/v1/map/tfr?bbox=-97.80%2C30.20%2C-97.70%2C30.30&format=heights&source=srtm' \ --header 'Authorization: Bearer <token>'Return one layer’s shapes inside a box as a GeoJSON FeatureCollection, for a map.
The body can be handed straight to a map library as a GeoJSON source.
Shapes describe themselves but say nothing about a particular spot;
use GET /v1/location for that. A source that can’t be read answers
503, never an empty collection.
With format=heights the terrain layer answers with a plain JSON grid
of ground heights instead, starting at the box’s south-west corner, for
a GCS to send ArduPilot as TERRAIN_DATA.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The layer to draw: airspace, tfr, uas_restrictions, notams, special_use, terrain, remote_id.
The layer to draw: airspace, tfr, uas_restrictions, notams, special_use, terrain, remote_id.
Query Parameters
Section titled “Query Parameters”The box as west,south,east,north in decimal degrees, up to 2 a side.
The box as west,south,east,north in decimal degrees, up to 2 a side.
Responses
Section titled “Responses”Successful Response
A GeoJSON FeatureCollection (RFC 7946), with a few extra members.
object
The layer drawn.
The box as asked: west, south, east, north.
The time the shapes are for (UTC).
The shapes. Each feature’s properties describe it; see the Location guide.
object
A grid of heights laid out like ArduPilot’s terrain grid (format=heights).
object
The layer asked for.
The box as asked: west, south, east, north.
The time asked for (UTC).
Metres between points, north and east.
Points from south to north.
Points from west to east.
Whole metres above sea level. heights_m[i][j] is the point i x spacing_m north and j x spacing_m east of the box’s south-west corner, ArduPilot’s height[x][y]. null where the source has no data.
Example
{ "type": "FeatureCollection"}Unknown layer, or one with nothing to draw yet.
Validation Error
object
object
object
Example generated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}The layer’s source could not be read. Nothing is known.
