diff options
| author | typebrook <typebrook@gmail.com> | 2019-08-15 23:51:40 +0800 |
|---|---|---|
| committer | typebrook <typebrook@gmail.com> | 2019-08-15 23:51:40 +0800 |
| commit | 8daf16baa75f048574216a21234f90363b56cdf5 (patch) | |
| tree | a09514563d31a8da3238a39c75fbbf2a27c181d6 /scripts | |
| parent | fb43491d084fbdcbc82ab7cc93b9cce0e37aa15b (diff) | |
update
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/mvt_decode.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/mvt_decode.py b/scripts/mvt_decode.py new file mode 100644 index 0000000..6e42006 --- /dev/null +++ b/scripts/mvt_decode.py | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | import mapbox_vector_tile | ||
| 2 | import sys | ||
| 3 | |||
| 4 | #Python3 | ||
| 5 | |||
| 6 | mvt = sys.argv[1] | ||
| 7 | |||
| 8 | print(mvt) | ||
| 9 | |||
| 10 | with open(mvt, 'rb') as f: | ||
| 11 | data = f.read() | ||
| 12 | decoded_data = mapbox_vector_tile.decode(data) | ||
| 13 | with open(mvt + '_decode.txt', 'w') as f: | ||
| 14 | print(decoded_data) | ||