Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
EmileSonneveld committed Feb 11, 2025
1 parent 6b0492f commit 9bb6a92
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions sentinel1_burst_extractor_spatiotemporal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,12 @@ OPTIONS:
-s Start date
-v sentinel1_burst_extractor_spatiotemporal version
-x Longitude of a point
-y Latitude of a point
-y Latitude of a point
-S SwathIdentifier
EOF
}
s3_endpoint='eodata.dataspace.copernicus.eu'
while getopts “he:o:p:s:x:y:v” OPTION; do
while getopts “he:o:p:s:S:x:y:v” OPTION; do
case $OPTION in
e)
end_date=$OPTARG
Expand All @@ -56,6 +57,9 @@ while getopts “he:o:p:s:x:y:v” OPTION; do
s)
start_date=$OPTARG
;;
S)
sub_swath=$OPTARG
;;
x)
lon=$OPTARG
;;
Expand Down Expand Up @@ -94,6 +98,9 @@ fi
if [ -z $start_date ]; then
echo "Start date not defined" && exit 3
fi
if [ -z $sub_swath ]; then
echo "sub_swath not defined" && exit 3
fi
if [ -z $end_date ]; then
echo "End date not defined" && exit 3
fi
Expand All @@ -107,5 +114,7 @@ if [ -z $lat ]; then
echo "Latitude (y) not defined" && exit 3
fi

wget -qO - 'https://catalogue.dataspace.copernicus.eu/odata/v1/Bursts?$filter=((PolarisationChannels%20eq%20%27'$(echo $polarization | tr a-z A-Z)'%27)%20and%20(ContentDate/Start%20ge%20'$start_date'T00:00:00.000Z%20and%20ContentDate/Start%20le%20'$end_date'T23:59:59.999Z)%20and%20(OData.CSC.Intersects(Footprint=geography%27SRID=4326;POINT%20('$lon'%20'$lat')%27)))&$top=1000' | jq -r '.value[] | "sentinel1_burst_extractor.sh -p '$polarization' -o /home/ubuntu -n " + .ParentProductName + " -s " + (.SwathIdentifier|ascii_downcase) + " -r " + (.BurstId|tostring)' | xargs -i bash -c "{}"
set -x
wget -qO - 'https://catalogue.dataspace.copernicus.eu/odata/v1/Bursts?$filter=((SwathIdentifier%20eq%20%27'$sub_swath'%27)%20and%20(PolarisationChannels%20eq%20%27'$(echo $polarization | tr a-z A-Z)'%27)%20and%20(ContentDate/Start%20ge%20'$start_date'T00:00:00.000Z%20and%20ContentDate/Start%20le%20'$end_date'T23:59:59.999Z)%20and%20(OData.CSC.Intersects(Footprint=geography%27SRID=4326;POINT%20('$lon'%20'$lat')%27)))&$top=1000' | jq -r '.value[] | "sentinel1_burst_extractor.sh -p '$polarization' -o '$HOME' -n " + .ParentProductName + " -s " + (.SwathIdentifier|ascii_downcase) + " -r " + (.BurstId|tostring)' | xargs -i bash -c "{}"
set +x
exit 0

0 comments on commit 9bb6a92

Please sign in to comment.