A lightweight service that exposes different endpoints related to terrain data:


You can serve either serve:
TERRAIN_FILEPATH environment variable,TERRAIN_FOLDER environment variable, all *.mbtiles file will be served.Check for service's health, return a json object with a single member isRunning.
Return layer metadata in json format for a single terrain file.
Get an individual tile for a single terrain file (i.e. the tile located at x,y,z).
Return layer metadata in json format for the given terrain file when multiple fils are server from a folder.
The terrain parameter is expected to be the terrain file basename in lower case without the extension, e.g. myterrain for the /mbtiles/myterrain.mbtiles file.
Get an individual tile for given terrain file when multiple fils are server from a folder (i.e. the tile located at x,y,z).
The terrain parameter is expected to be the terrain file basename lower case without the extension, e.g. myterrain for the /mbtiles/myterrain.mbtiles file.
Computes the elevation of the terrain under a linear geographical element (i.e. a path/trajectory) based on available elevation data and a requested target resolution. By default, the elevation dataset will be selected depending on the resolution according to the following rules:
[!WARNING] When GMTED dataset is selected the maximum elevation within each elevation grid cell will be returned, otherwise the mean elevation is returned.
The elevation endpoint allows to post a body that must conform a GeoJSON feature defining the target geographical element geometry with the following configuration properties:
| Name | Description | Default value |
|---|---|---|
resolution | Interval, in meters, between two elevation samples over the profile source. | 30 meters |
concurrency | How many segments will be computed in parallel server side. | 4 |
demOverride | The name of an elevation dataset to use for custom datasets. k2 will auto select a dataset if empty. | "" |
corridorWidth | The width, in meters, of a corridor to consider "around" the path for computation. The computed elevation will be the max elevation of all the covered samples. | 0 |
The POST body must contain the GeoJSON to use as elevation profile source. If the GeoJSON is a FeatureCollection, then only the first feature will be used in the computation.
[!TIP] The configuration properties can also be passed as query parameters.
The endpoint result is a GeoJSON feature collection defining the sample points geometry with the following properties:
z defines the computed elevation of the sampled point taking margin into account,t defines the computed curvilinear abscissa of the sampled point along the path.[!IMPORTANT] The elevation computation will set to
0any source sample whith anodatavalue.
You can build the image with the following command:
docker build -t <your-image-name> .
This project is configured to use GitHub Actions to build and push the image on the Kalisio's Docker Hub.
The built image is tagged using the version property in the package.json file.
This image is designed to be deployed using the Kargo project.
Check out the compose file to have an overview on how the container is deployed.
Please read the Contributing file for details on our code of conduct, and the process for submitting pull requests to us.
We use SemVer for versioning. For the versions available, see the tags on this repository.
When releasing a patch, minor or major version, i.e. the following tasks have to be done:
The command npm run release:<type>, where <type> is either patch, minor or major, will do the job for you !
docker run -it --name ctb -v "./path/to/geotiff/:/data" tumgis/ctb-quantized-meshgdalbuildvrt dataset.vrt /data/*.tifgdalwarp -s_srs EPSG:2154 -t_srs EPSG:4326 dataset.vrt dataset-EPSG4326.vrtgdaladdo -r average dataset-EPSG4326.vrt 2 4 8 16ctb-tile -f Mesh -C -N -o /target/path/for/generated/quantized/meshes/ dataset-EPSG4326.vrtctb-tile -f Mesh -C -N -l -o /target/path/for/generated/quantized/meshes/ dataset-EPSG4326.vrtquantized_mesh2mbtiles.py script from this project, and generate MBTiles file from quantized meshes : python quantized_mesh2mbtiles.py /path/to/quantized/meshes/ terrain.mbtilesThis project is sponsored by

This project is licensed under the MIT License - see the license file for details