mirror of
https://github.com/hyperknot/openfreemap.git
synced 2026-05-21 14:02:15 +00:00
work
This commit is contained in:
@@ -35,11 +35,7 @@ def cli(mbtiles_path: Path, dir_path: Path):
|
||||
write_tile_files(c, dir_path=dir_path)
|
||||
|
||||
# planetiler has missing tiles by design, so disabling this
|
||||
# if it's a full planet run,
|
||||
# make sure there are exactly the right number of files generated
|
||||
# if 'planet' in mbtiles_path.resolve().parent.name:
|
||||
# assert count_files(dir_path / 'tiles') == calculate_tiles_sum(14)
|
||||
# print(f'Tile number: {calculate_tiles_sum(14)} - OK')
|
||||
# assert_all_tiles_present(mbtiles_path, dir_path)
|
||||
|
||||
write_metadata(c, dir_path=dir_path)
|
||||
print('extract_mbtiles.py DONE')
|
||||
@@ -113,6 +109,17 @@ def write_tile_files(c, *, dir_path):
|
||||
raise
|
||||
|
||||
|
||||
def assert_all_tiles_present(mbtiles_path, dir_path):
|
||||
"""
|
||||
If it's a full planet run,
|
||||
ake sure there are exactly the right number of files generated.
|
||||
"""
|
||||
|
||||
if 'planet' in mbtiles_path.resolve().parent.name:
|
||||
assert count_files(dir_path / 'tiles') == calculate_tiles_sum(14)
|
||||
print(f'Tile number: {calculate_tiles_sum(14)} - OK')
|
||||
|
||||
|
||||
def count_files(folder):
|
||||
total = 0
|
||||
for root, dirs, files in os.walk(folder):
|
||||
|
||||
20
scripts/tile_gen/extract_mbtiles/out/metadata.json
Normal file
20
scripts/tile_gen/extract_mbtiles/out/metadata.json
Normal file
File diff suppressed because one or more lines are too long
@@ -1,6 +1,9 @@
|
||||
from ssh_lib.utils import apt_get_update
|
||||
from ssh_lib.utils import apt_get_update, exists
|
||||
|
||||
|
||||
def install_rclone(c):
|
||||
if exists(c, '/usr/bin/rclone'):
|
||||
return
|
||||
|
||||
apt_get_update(c)
|
||||
c.sudo('curl https://rclone.org/install.sh | sudo bash')
|
||||
|
||||
Reference in New Issue
Block a user