mirror of
https://github.com/protomaps/PMTiles.git
synced 2026-02-04 10:51:07 +00:00
add pmtiles-show
This commit is contained in:
15
python/bin/pmtiles-show
Normal file → Executable file
15
python/bin/pmtiles-show
Normal file → Executable file
@@ -0,0 +1,15 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
import sys
|
||||||
|
from pmtiles.reader import read
|
||||||
|
|
||||||
|
if len(sys.argv) <= 1:
|
||||||
|
print("Usage: pmtiles-show PMTILES_FILE")
|
||||||
|
exit(1)
|
||||||
|
|
||||||
|
with read(sys.argv[1]) as reader:
|
||||||
|
print('spec version: ',reader.version)
|
||||||
|
print('metadata:')
|
||||||
|
for k, v in reader.metadata.items():
|
||||||
|
print(k,'=',v)
|
||||||
|
print('root entries:', reader.root_entries)
|
||||||
|
|||||||
Reference in New Issue
Block a user