Code Monkey home page Code Monkey logo

Comments (8)

mg262 avatar mg262 commented on July 4, 2024 3

It's somewhat misleading to use pbf to mean zipped pbf. protobuf doesn't in itself have any support for DEFLATE (http://stackoverflow.com/a/7181908/1908650). format should contain something that indicates that the content is zipped PBF, rather than plain PBF.

NB. Not trying to be pedantic -- I have spent a lot of time on a wild goose chase due to this issue. I know that vector MBTiles contain zipped PBF, but it's still not clear to me whether it's legitimate for a vector tileserver to output either PBF or zipped PBF, or whether it has to be one of the two. If anyone knows, I'd be grateful for the clarification.

from mbtiles-spec.

JesseCrocker avatar JesseCrocker commented on July 4, 2024

Im using vector tiles stored in mbtiles files in mobile applications, with format set to pbf, and compressing the tiles with deflate(using zlib). I don't use a json metadata field.

from mbtiles-spec.

incanus avatar incanus commented on July 4, 2024

This is also done by Mapbox Studio when uploading custom sources. I don't have a lot of info there, but you could check the source.

from mbtiles-spec.

systemed avatar systemed commented on July 4, 2024

Yep. That's pretty much what I did - looked at mapbox-upload-validate and tiletype to figure out what Tilemaker should do. But it'd be good to have it canonicalised here.

from mbtiles-spec.

e-n-f avatar e-n-f commented on July 4, 2024

Tippecanoe has another implementation of how to write the format. It seems like the json ought to be part of the spec unless there are other clients that don't require it.

from mbtiles-spec.

pnorman avatar pnorman commented on July 4, 2024

NB. Not trying to be pedantic -- I have spent a lot of time on a wild goose chase due to this issue. I know that vector MBTiles contain zipped PBF, but it's still not clear to me whether it's legitimate for a vector tileserver to output either PBF or zipped PBF, or whether it has to be one of the two. If anyone knows, I'd be grateful for the clarification.

It can output either. It's common to only serve with a compressed HTTP Content-Encoding. Some implementations (notably Mapbox's) violate the HTTP spec by sending compressed data when identity is requested.

#46 takes the route of having the tileset specify both the format (application/vnd.mapbox-vector-tile) and compression.

from mbtiles-spec.

sfkeller avatar sfkeller commented on July 4, 2024

Ihope this issue will fixed soon (in #46 = version 2.0?)!
In a first attempt to implement an MVT reader it took us literally days(!) of debugging, no realizing that PBF's are stored as zipped files in mbtiles.
If services (notably Mapbox's) really violate the HTTP spec. this should be a separate issue.

from mbtiles-spec.

springmeyer avatar springmeyer commented on July 4, 2024

Ran into this old issue, which is resolved by https://github.com/mapbox/mbtiles-spec/blob/master/1.3/spec.md#content. Note: above there is mention of deflate compression, but actually vector tiles are expected to be encoded with gzip coding rather than pure deflate coding (see https://github.com/ebiggers/libdeflate#deflate-vs-zlib-vs-gzip for the differences).

from mbtiles-spec.

Related Issues (20)

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.