Skip to content

Vector Tiles

anthonyblackham edited this page Jul 24, 2017 · 3 revisions

GIS data typically will either be either a vector or raster data type. Tiled map services historically were raster based but with the advent of openstreetmaps vector tiles are becoming much more common with the added benefit of being slimmer and loading faster. ESRI also has their proprietary vector tile packages (vtpk) but I'm going to focus on Open Source formats.

Mapbox created the mbtile format which can be both vector and raster and is ideal for map services and is also utilised on mobile applications.

Let's look at the process of creating a custom mbtile basemap.

Basemap:

You can download basemap packages from https://openmaptiles.com/downloads/

These are all well and dandy but if you want something custom you'll need to find a way to generate your own data as well.

GIS Data:

You can use QGIS or Arcmap to create your GIS data,

Projection: EPSG 3857 or 4326

There are a few different tools for generating mbtiles:

Mapbox and tippecanoe seem to require geojson files as a prerequisite so you'll need to convert your GIS data to that format before you convert them to mbtiles

Online GeoJSON converters:

In theory you can also merge layers together with tippecanoe

tippecanoe -L layer1:layer1.geojson -L layer2:layer2.geojson -o yourtiles.mbtiles

the Qtiles plugin converts whatever data you have loaded into mbtiles.

Merging mbtiles

Now that you have a few mbtiles layers you can merge them with mbutil by following this guide

It seems Landez may also be an option but it may be a mashup with a transparency

Once they are merged if they worked properly you should have a custom basemap with your own layers that can be loaded on your fancy mobile device.

But if you want my opinion GeoPackage is a better standard for offline caches of GIS data.