Overview of vector tilesđź”—
vector tiles are instructions for how the client should render geometries making them very portable. The main tradeoff is complexity of creating and styling . The alternative were raster tiles which you render upfront and store but they were much more difficult to manage and port around.
Vector tiles are instructions that can be in the following format:
- GeoJSON (human readable, widely used):Â
.json
- TopoJSON (smaller than GeoJSON, shared line segments):Â
.topojson
- Mapbox Vector Tiles (protocol buffer):Â
.mvt
They will be very tiles that store geometries on file server usually in the standard zoom
/x
/y
e.g http://localhost/tiles/{layerName}/{z}/{x}/{y}.{format}?api_key={api_key}
There are lots of js libs that can render vector tiles:
Terminologyđź”—
Tileset - A tileset is a collection of raster or vector data broken up into a uniform grid of square tiles at 22 preset zoom levels. tilesets can be either raster or vectors
Vector tilesets - a.k.a vector tiles are used as basemaps.
MBTiles - a file format for storing tilesets. It’s designed to allow you to package up many files into a single tileset. MBTiles is an open specification based on the SQLite database. MBTiles can contain raster or vector tilesets.
Workflow Ađź”—
- geojson to mbtiles via [tippicanoe](felt/tippecanoe: Build vector tilesets from large collections of GeoJSON features. (github.com))
- tippicanoe to mvt files
3d Assets in vector tiles?đź”—
One way of acheiveing 3d effects in vector tiles is to enbed height attribute to each geometry. Then as part of the front end rendering logic you can extrude based on this value. Example - Display buildings in 3D | Mapbox GL JS | Mapbox
Creating terrains raster basemaps?đź”—
Fleeting notes about vector tiles
2023-08-20 2023-09-18 2023-10-10
References