Live Vector Tiles from PostGIS with pg_tileserv: A Hands-on Workshop
10-02, 10:15–11:45 (Europe/London), Think

Learn to generate vector tiles for web maps live from PostGIS with pg_tileserv, enabling dynamic web maps and geospatial analyses without pre-generating tiles. We’ll apply this to analyse flood risk in Leeds, and access to cloud servers will be provided, so no need to install anything to participate.


Vector tiles are a key part of many modern web mapping systems, but they don’t have to be generated ahead of time and stored. Instead, they can be generated ‘on the fly’ directly from the underlying data. Importantly this allows geospatial processing to be performed ‘live’ when the tiles are generated enabling many complex geospatial workflows, as well as reducing the need to pre-generate and store many different tiles.

This workshop will take you through the whole process of generating Mapbox Vector Tiles on the fly from a PostGIS database using a tool called pg_tileserv. We will start with an introduction to vector tiles and PostGIS, then move on to using pg_tileserv to generate tiles for database tables. After demonstrating basic tile serving to a local web map (using MapLibre) and QGIS, we will move on to defining PostGIS functions to integrate with pg_tileserv and do live geospatial processing as tiles are requested. Our demonstrations will focus on assessing flooding in the UK, but there will be plenty of opportunities for participants to try other sorts of processing.

To reduce the burden on participants, we will provide access to a pre-populated cloud PostGIS instance alongside a pg_tileserv deployment for the duration of the workshop, allowing users to participate in the workshop without installing or setting up any software beyond pgAdmin (or an alternative way to run SQL queries), a text editor and (optionally) QGIS. For those who want to run things locally or continue after the workshop, we will also provide a Docker Compose configuration.

It will be helpful for participants to have some experience with PostGIS and basic geospatial SQL, as well as a basic understanding of web mapping, Javascript and HTML.

Instructions and resources are available at https://github.com/robintw/foss4guk_vector_tile_workshop.

Robin Wilson is a freelance geospatial software engineer and data scientist, working with Rebalance Earth. He has a PhD in satellite imaging and has been working in the open-source geospatial field for over 15 years, including speaking at numerous FOSS4G events.