Tanner Rollefson

djangorestframework-mvt, Serving Vector Tiles from Django

I created and released djangorestframework-mvt through Corteva’s official open source GitHub. It is an extension for Django REST Framework that creates views which serialize model data into Google Protobuf encoded Mapbox Vector Tiles via PostgreSQL and PostGIS.

The package makes it straightforward to serve dynamic vector tiles directly from a PostGIS database without an intermediate tile server. Install it with pip install djangorestframework-mvt and point a DRF view at a model with a geometry field.

It is officially listed on awesome-vector-tiles, a curated list of vector tile tools and servers maintained by Mapbox.

For a full breakdown of the approach behind serving dynamic vector tiles from PostGIS, see the Crunchy Data write-up.

LinkedIn GitHub LeetCode