Commit ed51d96f authored by Eric Duminil's avatar Eric Duminil
Browse files

If needed, when GMLs have been flattened

parent 696c29ea
from pathlib import Path
from download_files_from_LGL_BW import BUNDESLAND, RASTER, UTM
SCRIPT_DIR = Path(__file__).resolve().parent
BW = SCRIPT_DIR / "BW.proj"
for gml_path in BW.glob("LoD2_32_*.gml"):
name = gml_path.name
_lod, _utm, x, y, _size, _ext = name.split("_")
x = int(x)
y = int(y)
x -= (x + 1) % RASTER
y -= y % RASTER
# x = x + 1
zip_folder = BW / f"LoD2_{UTM}_{x}_{y}_{RASTER}_{BUNDESLAND}"
zip_folder.mkdir(exist_ok=True)
gml_path.rename(zip_folder / name)
zip_file = zip_folder.with_suffix('.zip')
zip_file.touch()
print('.', end='')
print()
print("Done")
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment