rasterize-vector-tiles
v1.1.2
Published
Rasterize .mbtiles vector tiles to PNG raster tiles
Downloads
12
Maintainers
Readme
rasterize-vector-tiles
rasterize-vector-tiles converts vector tile sets in .mbtiles SQLite archives to PNG raster tile sets.
Features
- Reads: Vector tiles (.mbtiles)
- Reads protobuf .pbf vector tiles
- Compressed (deflate, gzip) or uncompressed tiles
- Writes: Raster tiles (.mbtiles)
- Containing .png data
- Transparency
- Configurable property to use for color
Use
rasterize-vector-tiles has command-line options:
$ npx rasterize-vector-tiles
Usage: npx rasterize-vector-tiles <source> <target>
source Vector tile set in .mbtiles format
target Raster tile set to be created (.mbtiles)
Options:
--colorprop value Feature property to use for gray level (0-255), default='value'
--nodata 255 Colorprop value to interpret as nodata (will not be rendered), default=255
--antialias none Control anti-aliasing (none/default/gray/subpixel), default=none
--zoomlevel 14 Upper limit on zoom level to rasterize (0-99), default=highest in input file
--png Export as individual png files rather than .mbtiles archive
Sample workflow
# Rasterize the highest zoom level in source
node rasterize-vector-tiles.js src_vtiles.mbtiles dest_png.mbtiles --colorprop value --nodata 255
# Build all lower zoom levels
gdaladdo -r average gradient.3857.mbtiles 2 4 8 16 32 64 128 256 512 1024 2048