Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Concatenate pbf tiles and TileJSONs #6

Open
petrsloup opened this issue Mar 11, 2016 · 3 comments
Open

Concatenate pbf tiles and TileJSONs #6

petrsloup opened this issue Mar 11, 2016 · 3 comments

Comments

@petrsloup
Copy link
Member

We need to be able to process following requests:

  • /vector/{mbtiles_name},{mbtiles_name}/{z}/{x}/{y}.pbf
    • the pbfs need to be concatenated (we already do this for fonts)
    • the issue is with concatenating pbfs from different zoom levels
      • e.g. /vector/a,b/8/19/21.pbf when b has maxzoom 6
        • combine a/8/19/21.pbf and part of b/6/4/5.pbf (the tile needs to be unpacked, scaled, repacked)
  • /vector/{mbtiles_name},{mbtiles_name}.json
    • solve name, maxzoom, bbox, center, ...
@klokan
Copy link
Member

klokan commented Apr 6, 2016

It seems to be done by Mapnik usually (see klokantech/tileserver-mapnik#13), but we may prefer an implementation without Mapnik dependency here.

@klokan
Copy link
Member

klokan commented Sep 20, 2016

The speed of the PBF JavaScript-native library https://github.com/mapbox/pbf has improved recently - if we decide to parse and reencode the PBFs for overzooming (scale + shift) at some point.

The https://github.com/mapbox/vector-tile-js is using it already.

In case we decide to go for mapnik C/C++ implementation, here is a node-js wrapper example:
https://github.com/naturalatlas/tilestrata-vtile-composite/blob/master/index.js
and the official documentation:
http://mapnik.org/documentation/node-mapnik/3.5/#VectorTile.composite

It would be practical to compare the speed of the two implementations, once finished.

@jingsam
Copy link

jingsam commented Sep 21, 2016

I would suggest not to implement this feature, as this feature is not only unnecessary but hard to properly implemented. One problem is how do you solve vector layer id conflict? What if I composite too much pbf s and exceed 500K limits?

Simple codes are easy to test and maintenance. Omit the unnecessary feature and keep the code clean, I suggest.

@petrsloup petrsloup removed their assignment Dec 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants