File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ # COILED n-tasks 3111
4+ # COILED max-workers 100
5+ # COILED region us-west-2
6+ # COILED memory 8 GiB
7+ # COILED container ghcr.io/osgeo/gdal
8+ # COILED forward-aws-credentials True
9+
10+ # Install aws CLI
11+ if [ ! " $( which aws) " ]; then
12+ curl " https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o " awscliv2.zip"
13+ unzip -qq awscliv2.zip
14+ ./aws/install
15+ fi
16+
17+ # Download file to be processed
18+ filename=$( aws s3 ls --no-sign-request --recursive s3://sentinel-cogs/sentinel-s2-l2a-cogs/54/E/XR/ | \
19+ grep " .tif" | \
20+ awk ' {print $4}' | \
21+ awk " NR==$(( $COILED_BATCH_TASK_ID + 1 )) " )
22+ aws s3 cp --no-sign-request s3://sentinel-cogs/$filename in.tif
23+
24+ # Reproject GeoTIFF
25+ gdalwarp -t_srs EPSG:4326 in.tif out.tif
26+
27+ # Move result to processed bucket
28+ aws s3 mv out.tif s3://oss-scratch-space/sentinel-reprojected/$filename
You can’t perform that action at this time.
0 commit comments