tilezen / mapbox-vector-tile

Python package for encoding & decoding Mapbox Vector Tiles
MIT License
240 stars 47 forks source link

Generating metadata.json #105

Closed alpha-beta-soup closed 6 years ago

alpha-beta-soup commented 6 years ago

Is it possible to generate a matching TileJSON metadata.json to match a given vector tile produced with this library? I'm creating a server that is capable of serving application/vnd.mapbox-vector-tile output. I'm still in an early stage of development, and would appreciate an easy way to inspect my output and see if it is correct (literally just a single tile with a local directory, or localhost). There is a QGIS plugin that appears to be capable of this, but it demands a metadata.json file including layer names, attributes, a count of the number of features, geometry type, etc. It seems to me that this is all information I pass to the encode function before generating the tile itself. So would it be possible to use/extend this project to include the generation of a metadata.json file?

https://github.com/geometalab/Vector-Tiles-Reader-QGIS-Plugin/issues/181

alpha-beta-soup commented 6 years ago

In think in the interim I will just use this library decode the tile and read it as geojson in order to validate that no data was lost and geometries are in the correct positions.

nvkelso commented 6 years ago

@alpha-beta-soup See https://github.com/geometalab/Vector-Tiles-Reader-QGIS-Plugin/issues/78 and https://github.com/tilezen/tapalcatl-py/issues/23.

The long answer is it's served at the edge and not by this library (which is just a dump pass thru of data schemas and doesn't know about schemas).

The TileJSON in the other issue is hand constructed and maintained, fun times.