/vector-tiles-rasterizer

Primary LanguageTypeScriptOtherNOASSERTION

vector-tiles-rasterizer

a proxy server written in fastify for rasterizing vector tiles according to a mapbox style in real time. the vector tiles can be served from any vector tiles backend e.g. tegola or tileserver-gl.

a quick example for additional information


badge-alerts-lgtm

grade-badge-lgtm

snyk


A proxy server written in fastify for rasterizing vector tiles on the fly. the vector tiles can be served from any vector tiles backend e.g. tegola or tileserver-gl.

API

Checkout the OpenAPI spec here


Build and Run

On Ubuntu 20.04 just run the following command after installation of all dependencies

Shell

npm install
sh run.sh

Docker

On any other OS build and run docker

docker build -t vector-tiles-rasterizer:latest -f Dockerfile .

then simply run

docker run -it \
-v /path/to/styleDir:/mnt/styles \
-e APP_STYLE_FILE_PATH=/mnt/styles/styleName.json \
verctor-tiles-rasterizer:latest

Test

Tests are done on a docker container

It is possible to build the container to run only unit or integration testing by passing TESTS_TO_RUN=unit|integration as a build-arg, by default it will run both

--build-arg TESTS_TO_RUN=unit|integration

integration:

test against a tileserver-gl serving vector-tiles

docker run --rm -it -p 80:80 -u 0 maptiler/tileserver-gl
docker build -f ./tests.Dockerfile --build-arg TESTS_TO_RUN=integration -t vector-tiles-rasterizer-integration:latest .
docker run --network host -it --name vtr-integration vector-tiles-rasterizer-integration:latest

unit:

docker build -f ./tests.Dockerfile --build-arg TESTS_TO_RUN=unit -t vector-tiles-rasterizer-unit:latest .
docker run --network host -it --name vtr-unit vector-tiles-rasterizer-unit:latest