Skip to content

3D terrain server for Cesium tiles and terrain elevation computation

Servers

https://api.dev.kalisio.xyz/k2Development

Health

Service status


Service health check

GET
/healthcheck

Authorizations

bearerAuth

Paste a Kalisio JWT access token to authorize requests sent through the API gateway.

Type
HTTP (bearer)

Responses

Service is up

application/json
JSON
{
  
"isRunning": true
}

Playground

Server
Authorization

Samples


Terrain


Terrain layer metadata (single-file mode)

GET
/layer.json

Returns the Cesium quantized-mesh layer metadata for the single terrain file configured through TERRAIN_FILEPATH.

Authorizations

bearerAuth

Paste a Kalisio JWT access token to authorize requests sent through the API gateway.

Type
HTTP (bearer)

Responses

Layer metadata

application/json
JSON
{
  
"format": "quantized-mesh-1.0",
  
"scheme": "tms",
  
"tiles": [
  
  
[
  
  
  
"{z}/{x}/{y}.terrain"
  
  
]
  
],
  
"bounds": [
  
  
[
  
  
  
-180,
  
  
  
-90,
  
  
  
180,
  
  
  
90
  
  
]
  
],
  
"additionalProperties": "string"
}

Playground

Server
Authorization

Samples


Terrain tile (single-file mode)

GET
/{z}/{x}/{y}.terrain

Returns the gzipped quantized-mesh tile located at z/x/y from the single terrain file configured through TERRAIN_FILEPATH.

Authorizations

bearerAuth

Paste a Kalisio JWT access token to authorize requests sent through the API gateway.

Type
HTTP (bearer)

Parameters

Path Parameters

z*

Tile zoom level

Type
integer
Required
x*

Tile column

Type
integer
Required
y*

Tile row (TMS scheme)

Type
integer
Required

Responses

A quantized-mesh tile (gzip encoded)

application/vnd.quantized-mesh

Playground

Server
Authorization
Variables
Key
Value

Samples


Terrain layer metadata (multi-file mode)

GET
/{terrain}/layer.json

Returns the layer metadata for one of the terrain files served from the TERRAIN_FOLDER folder.

Authorizations

bearerAuth

Paste a Kalisio JWT access token to authorize requests sent through the API gateway.

Type
HTTP (bearer)

Parameters

Path Parameters

terrain*

Terrain file basename in lower case without the extension, e.g. myterrain for /mbtiles/myterrain.mbtiles.

Type
string
Required
Example"myterrain"

Responses

Layer metadata

application/json
JSON
{
  
"format": "quantized-mesh-1.0",
  
"scheme": "tms",
  
"tiles": [
  
  
[
  
  
  
"{z}/{x}/{y}.terrain"
  
  
]
  
],
  
"bounds": [
  
  
[
  
  
  
-180,
  
  
  
-90,
  
  
  
180,
  
  
  
90
  
  
]
  
],
  
"additionalProperties": "string"
}

Playground

Server
Authorization
Variables
Key
Value

Samples


Terrain tile (multi-file mode)

GET
/{terrain}/{z}/{x}/{y}.terrain

Returns the gzipped quantized-mesh tile located at z/x/y from one of the terrain files served from the TERRAIN_FOLDER folder.

Authorizations

bearerAuth

Paste a Kalisio JWT access token to authorize requests sent through the API gateway.

Type
HTTP (bearer)

Parameters

Path Parameters

terrain*

Terrain file basename in lower case without the extension, e.g. myterrain for /mbtiles/myterrain.mbtiles.

Type
string
Required
Example"myterrain"
z*

Tile zoom level

Type
integer
Required
x*

Tile column

Type
integer
Required
y*

Tile row (TMS scheme)

Type
integer
Required

Responses

A quantized-mesh tile (gzip encoded)

application/vnd.quantized-mesh

Playground

Server
Authorization
Variables
Key
Value

Samples


Elevation

Terrain elevation computation


Compute the elevation profile under a path

POST
/elevation

Computes the elevation of the terrain under a linear geographical element (a path/trajectory) from the available elevation data and a requested target resolution.

By default the elevation dataset is selected depending on the resolution:

  • resolution < 250m: SRTM v4,
  • resolution < 500m: GMTED 2010 — Maximum 7.5 arc-seconds grid,
  • resolution < 1000m: GMTED 2010 — Maximum 15 arc-seconds grid,
  • otherwise: GMTED 2010 — Maximum 30 arc-seconds grid.

When a GMTED dataset is selected the maximum elevation within each grid cell is returned, otherwise the mean elevation is returned.

The configuration properties below can be passed either as query parameters or as members of the posted GeoJSON. Any source sample with a nodata value is set to 0.

Authorizations

bearerAuth

Paste a Kalisio JWT access token to authorize requests sent through the API gateway.

Type
HTTP (bearer)

Parameters

Query Parameters

resolution

Interval, in meters, between two elevation samples over the profile source. Values below 30 are clamped to 30.

Type
integer
Example1000
Minimum
30
Default
30
concurrency

How many segments are computed in parallel server side. Capped at 6.

Type
integer
Minimum
1
Maximum
6
Default
4
demOverride

The name of an elevation dataset to use for custom datasets, resolved relative to /mbtiles. k2 auto-selects a dataset when empty.

Type
string
Default
""
corridorWidth

The width, in meters, of a corridor to consider around the path. The computed elevation is the max elevation of all the covered samples.

Type
number
Default
0
elevationOffset

A constant offset, in meters, added to every computed elevation sample.

Type
integer
Default
0

Request Body

application/json
JSON
{
  
"type": "string",
  
"properties": {
  
},
  
"geometry": {
  
  
"type": "string",
  
  
"coordinates": [
  
  
  
[
  
  
  
  
[
  
  
  
  
  
0.65,
  
  
  
  
  
43.1
  
  
  
  
],
  
  
  
  
[
  
  
  
  
  
0.65,
  
  
  
  
  
42.2
  
  
  
  
]
  
  
  
]
  
  
]
  
}
}

Responses

A GeoJSON FeatureCollection of sampled points

application/json
JSON
{
  
"type": "string",
  
"features": [
  
  
{
  
  
  
"type": "string",
  
  
  
"geometry": {
  
  
  
  
"type": "string",
  
  
  
  
"coordinates": [
  
  
  
  
  
[
  
  
  
  
  
  
0.65,
  
  
  
  
  
  
43.1
  
  
  
  
  
]
  
  
  
  
]
  
  
  
},
  
  
  
"properties": {
  
  
  
  
"z": 393,
  
  
  
  
"t": 0
  
  
  
}
  
  
}
  
]
}

Playground

Server
Authorization
Variables
Key
Value
Body

Samples