Workflow and technology behind this tile service

Posted on Sep 15, 2020

Behind this service stand a longer toolchain for the creation of the vector and raster tile service. Our workflow starts with the data:

  • NaturalEarth for lower zoom levels as GeoPackage
  • OpenStreetMap for higher zoom levels as PBF-files
  • The OpenStreetMap coastline as Shapefiles

For importing the NaturalEarth and the coastline, we use org2ogr form the GDAL library, while importing the OpenStreetMap data IMPOSM 3 is our choice. It allows us to easily adjust the data layout. Afterward, follows some processing in the PostgreSQL database to enhance the data quality and make some generalization.

The most generalization is made on the fly via SQL queries, which define the content of each layer and zoom level. This is the main content of the configuration file for t_rex. We decided to use the t_rex to create the vector tiles because of its simple setup and useful development tools. There is an in-built web server with different tiles views, Maputnik as a visual style editor for vector tiles, and some tools for tile caching and testing. The output of t_rex is a defined file structure containing the tiles. We use the mb-util to store these files into an SQLite database with some metadata, then called a *.mbtiles format. The tiles itself are now ready.

It follows the delivery via a webserver. For providing vector and raster tiles at the same time, we us the TileserverGL. Based on a vector tile style, the server produces raster tiles and also delivers the vector tiles. The details can also be defined in a configuration file.

Workflow for the creation of the tile service.

Workflow for the creation of the tile service. Green: Data. Yellow: File for configuration. Blue: used software. Orange: intermediate data storage or data format

The tile service can be accessed via the following URLs:

For using add them in QGIS as vector tile or XYZ layer.