-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run unify projection step in parallel
- Loading branch information
1 parent
ba4a1a2
commit a5a5c8e
Showing
2 changed files
with
37 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/bash | ||
|
||
# arguments: | ||
# $0 - The name of this script | ||
# $1 - remote_src_file | ||
# $2 - local_src_file | ||
# $3 - local_warped_file | ||
# $4 - target_crs | ||
# $5 - remote target file | ||
|
||
if aws s3 ls "$1"; then | ||
echo "Remote target file $1 already exists, skipping..." | ||
exit 0 | ||
fi | ||
|
||
echo "Now downloading $1 to $2" | ||
time gsutil cp "$1" "$2" | ||
echo "Done downloading $1 to $2" | ||
|
||
echo "Now warping $2 to $3" | ||
time gdalwarp "$2" "$3" -t_srs "$4" -co COMPRESS=DEFLATE -co TILED=yes | ||
echo "Done warping $2 to $3" | ||
|
||
echo "Now uploading $3 to $5" | ||
time aws s3 cp "$3" "$5" | ||
echo "Done uploading $3 to $5" | ||
|
||
echo "Finally, deleting local files $2 and $3" | ||
rm "$2" "$3" | ||
echo "Done deleting local files $2 and $3" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters