Skip to content
Snippets Groups Projects
Commit d1ef5627 authored by Riccardo Boero's avatar Riccardo Boero :innocent:
Browse files

Cleaned up repo and update Dockerfile

parent 996e4194
No related branches found
Tags v0.2
No related merge requests found
File added
geodata/data
FROM python:3.9.16-slim-bullseye
FROM python:3.12.6-slim-bullseye
# update system and install required software
RUN apt update && /usr/local/bin/python -m pip install --upgrade pip && apt install git zip -y
......
import argparse
from geotiff_processor.geotiff_handler import Geotiff2epsg4326
def main(zip_path, temp_dir_suffix):
handler = Geotiff2epsg4326(zip_path, temp_dir_suffix)
handler.process()
if __name__ == "__main__":
parser = argparse.ArgumentParser(description='Reproject GeoTIFF files in a ZIP archive to EPSG:4326.')
parser.add_argument('zip_path', type=str, help='Path to the ZIP file containing GeoTIFFs.')
parser.add_argument('--suffix', type=str, help='User-defined suffix for the temporary directory.', default='default_suffix')
args = parser.parse_args()
print("Processing file at path:", args.zip_path, "with temporary directory suffix:", args.suffix)
main(args.zip_path, args.suffix)
#!/bin/bash
echo "*** Setting up the batch." # expected number of records in DB:
pip install git+https://FACT_token:glpat-1zG-TQx___xLsPjj2vsG@git.nilu.no/fact/utils/geotiff2epsg4326.git
#for y in {2017..2021}
for y in {2017..2021}
do
echo "Starting processing year ${y}"
python fix_geotiffs.py ../geodata/data/lulc${y}.zip --suffix ${y} > proj${y}.txt 2>&1 &
done
wait
echo "*** All years concluded!!!"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment