Skip to content

Instantly share code, notes, and snippets.

@gtitov
Last active February 10, 2022 20:03
Show Gist options
  • Save gtitov/014270467ec1a5bfc0d9652e5aca309c to your computer and use it in GitHub Desktop.
Save gtitov/014270467ec1a5bfc0d9652e5aca309c to your computer and use it in GitHub Desktop.

По умолчанию pbf от tippecanoe в формате gzip (хотя и с расширением pbf) mapbox/tippecanoe#793

Figured out after much searching that this is probably indicating a zipped pbf file. That kind of should at least be mentioned somewhere.

Tippecanoe generates gzipped tiles by default because that is what Mapbox uploads and clients expect. You can use --no-tile-compression if you don't want compression.

Это приводит к ошибке mapbox/mapbox-gl-js#1567 (comment)

@mofoyoda the error generally fires when it sees something it doesn't expect when decoding tiles from protocol buffers. Can you send us a sample of a particular tile that doesn't work?

Варианты решений:

  1. либо распаковать roblabs/openmaptiles-ios-demo#3

cf. Discussion on whether .pbf can should be compressed when using tippecanoe: mapbox / tippecanoe #582

Given a MBTile file with gzip'd vector data, is there an efficient way to extract the entire XYZ file structure as uncompressed?

  • GZip command
gzip --decompress --recursive  --suffix .pbf *
  1. либо изначально в tippecanoe дать флаг mapbox/tippecanoe#793 (comment)

Tippecanoe generates gzipped tiles by default because that is what Mapbox uploads and clients expect. You can use --no-tile-compression if you don't want compression.

Пример команды для генерации тайлов

tippecanoe -zg --output-to-directory=roadstiles --drop-densest-as-needed --extend-zooms-if-still-dropping --no-tile-compression roads.geojson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment