31 lines
919 B
Python
31 lines
919 B
Python
"""Bootstrap Copernicus DEM tiles for an AOI.
|
|
|
|
The production implementation should download Copernicus DEM GLO-30 tiles and
|
|
write Cloud-Optimized GeoTIFFs into `data/dem`.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
import argparse
|
|
from pathlib import Path
|
|
|
|
|
|
def parse_args() -> argparse.Namespace:
|
|
parser = argparse.ArgumentParser(description="Bootstrap Copernicus DEM for an AOI")
|
|
parser.add_argument("--bbox", required=True, help="AOI bbox: minlon,minlat,maxlon,maxlat")
|
|
parser.add_argument("--output-dir", default="/data/dem", type=Path)
|
|
return parser.parse_args()
|
|
|
|
|
|
def main() -> None:
|
|
args = parse_args()
|
|
args.output_dir.mkdir(parents=True, exist_ok=True)
|
|
raise NotImplementedError(
|
|
"Copernicus DEM download/mosaic/COG conversion is implemented in a later stage. "
|
|
f"Requested bbox={args.bbox}, output_dir={args.output_dir}"
|
|
)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|