1
0
mirror of https://github.com/tumic0/pbf2png.git synced 2024-10-05 22:53:22 +02:00
pbf2png/README.md

28 lines
1.0 KiB
Markdown
Raw Permalink Normal View History

2020-07-03 00:40:38 +02:00
# pbf2png
PBF(MVT) tiles to PNG convertor - [QtPBFImagePlugin](https://github.com/tumic0/QtPBFImagePlugin)
example/benchmark app. Converts a directory of Mapbox vector tiles to PNG tiles.
## Build
```shell
qmake pbf2png.pro
make
```
## Usage
2020-07-04 20:15:57 +02:00
```shell
pbf2png [options] DIR
```
2020-07-03 00:40:38 +02:00
Use `pbf2png -h` for help. The parameters should be self-explanatory, except the
`-M` - tile name mask parameter. It's only there because of the notoriously known
design flaw in the Mapbox vector tiles specification - the missing zoom level
in the tile data. To render a tile, a workaround that fetches the zoom level from
the file name (or somewhere else) is required. The default mask(regular expression)
2020-07-04 20:15:57 +02:00
is `([0-9]+).*` which should fit all common tile name schemes like `$z-$x-$y.pbf`,
`$z_$y_$x.mvt`, etc.
2020-07-04 20:16:51 +02:00
### Styles
2020-07-04 20:15:57 +02:00
See the QtPBFImagePlugin [documentation](https://github.com/tumic0/QtPBFImagePlugin#styles)
for how to set the style used for rendering the tiles. For the default OpenMapTiles
data schema and the default OSM-Liberty style nothing needs to be done.