Code Monkey home page Code Monkey logo

pbf2png's Introduction

pbf2png

PBF(MVT) tiles to PNG convertor - QtPBFImagePlugin example/benchmark app. Converts a directory of Mapbox vector tiles to PNG tiles.

Build

qmake pbf2png.pro
make

Usage

pbf2png [options] DIR

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) is ([0-9]+).* which should fit all common tile name schemes like $z-$x-$y.pbf, $z_$y_$x.mvt, etc.

Styles

See the QtPBFImagePlugin documentation 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.

pbf2png's People

Contributors

tumic0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pbf2png's Issues

I'm just getting white squares

Hi.
Great project.
When I run the tool against my MVT tiles I get white png files. :(
What am I doing wrong?

Here is an example file.
9_461_313.zip

They are in standard Mapbox format (I believe).

I was wondering if it's just that I need to add my own styling.
I have Mapbox Bright styles in ~/.local/share/pbf2png/styles/

I want them to be loadable instead of the vector tiles when I zoom out on the map... so I want the background transparent and the boarders black.

Any help you can give is very muchly appreciated.

Is there some way to turn on more debugging information so I can be sure it's finding protoc etc correctly?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.