Skip to content

One layer's shapes inside a box, or a grid of heights

GET
/v1/map/{layer}
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.

layer
required
Layer

The layer to draw: airspace, tfr, uas_restrictions, notams, special_use, terrain, remote_id.

string

The layer to draw: airspace, tfr, uas_restrictions, notams, special_use, terrain, remote_id.

bbox
required
Bbox

The box as west,south,east,north in decimal degrees, up to 2 a side.

string

The box as west,south,east,north in decimal degrees, up to 2 a side.

zoom
Any of:
integer
<= 22

Map zoom level; sets how much detail comes back.

at
Any of:
string format: date-time

When the answer is for (ISO 8601). It decides which TFRs and NOTAMs are active. Default: now. A time without a zone is read as UTC.

format
Any of:
string

heights for a grid of ground heights laid out like ArduPilot’s terrain grid instead of shapes (terrain only). Omit for shapes.

source
Any of:
string

Where the data comes from, for a layer with more than one. terrain: 3dep (USGS, the default) or srtm (what Mission Planner sends ArduPilot).

spacing_m
Any of:
number
>= 5 <= 1000

With format=heights: metres between points, ArduPilot’s TERRAIN_SPACING. Default 100.

alt_ft
Any of:
number
<= 10000

The altitude envelope the map answers for, in feet: layers with altitude bands drop shapes whose band starts above it (notams). Default 400, the FAA’s 400 ft drone ceiling.

Successful Response

Media typeapplication/geo+json
Any of:
MapLayerResponse

A GeoJSON FeatureCollection (RFC 7946), with a few extra members.

object
type
Type
string
default: FeatureCollection
Allowed value: FeatureCollection
layer
required
Layer

The layer drawn.

string
source
Any of:
string
bbox
required
Bbox

The box as asked: west, south, east, north.

Array<number>
zoom
Any of:
integer
at
required
At

The time the shapes are for (UTC).

string format: date-time
alt_ft
Any of:
number
as_of
Any of:
string format: date-time
features
required
Features

The shapes. Each feature’s properties describe it; see the Location guide.

Array<object>
object
key
additional properties
any

Example

{
"type": "FeatureCollection"
}

Unknown layer, or one with nothing to draw yet.

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object

Example generated

{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}

The layer’s source could not be read. Nothing is known.