snippets/mvt_decode/decode.py

11 lines
248 B
Python
Raw Permalink Normal View History

2024-06-15 06:51:00 +00:00
import mapbox_vector_tile
import json
import sys
with open(sys.argv[1], 'rb') as f:
data = f.read()
decoded_data = mapbox_vector_tile.decode(data)
print(json.dumps(decoded_data))
with open('out.txt', 'w') as f:
f.write(repr(decoded_data))