6

We are currently hosting OSM vector tiles on our mapping server (courtesy osm2vectortiles and tilesever-gl). Now I'm trying to convert our own shapefiles into the same Mapbox Vector Tile format so we can add them as an overlay to our maps.

I believe one way this can be accomplished is by importing the shapefile to PostGIS and then creating vector tiles from that, but I'd like to avoid having to use PostGIS as a middleman if I can, and instead go directly from Shapefile->Mapbox Vector Tiles (which will be stored in an MBTiles container). These will then be served via tileserver-gl.

Does any such tool exist that can convert shapefiles (1-2GB) directly to vector tiles, and ideally perform simplification while it does so?

5

mapbox-tile-copy will convert shapefiles (and a bunch of other formats) to Mapbox Vector Tiles on Amazon S3.

There is also tippecanoe to create an mbtiles of vector tiles from your shapefile.

1

With the release of QGIS 3.8 there is new feature to generate raster MBTiles layers. Once the layer you want to convert is setup, you can open up the Toolbox by either selecting the gear icon or by going into the processing tab on the menu bar and selecting toolbox. Then in the Processing Toolbox, drill-down into the Raster Tools section. Within this section, select the Generate XYZ tile (MBTiles) option.

Here is a reference to this with a straight forward and well illustrated example on how to use this new QGIS feature.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.