-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathlandsat.sh
executable file
·63 lines (58 loc) · 2.33 KB
/
landsat.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/bin/bash
# Geospatial Dataset Processing Workflow
# Copyright (C) 2022-2023, University of Saskatchewan
# Copyright (C) 2023-2024, University of Calgary
#
# This file is part of the Geospatial Dataset Processing Workflow
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# This is a simple example to extract common statistics for the extents
# of pfaf 71 - Saskatchewan-Nelson System Shapefiles of MERIT-Basin
#
# If you have a Shapefile containing polygons, you may able to use
# the `--shapefile` argument to provide the Shapefile instead of spatial
# limits.
#
# If you would like to extract zonal statistics out of polygons, you can
# use the following options as an example:
# --stat="mean,min,max,median,quantile" \
# --quantile="0.1,0.5,0.9" \
# Always call the script in the root directory of this repository
cd ..
echo "The current directory is: $(pwd)"
# Example 1: implement subsetting and zonal statistics on 2010 and 2015 landcover datasets
./extract-gis.sh --dataset="landsat" \
--dataset-dir="/project/rpp-kshook/Model_Output/Landsat/" \
--variable="land-cover" \
--lat-lims="44,60" \
--lon-lims="-118,-78" \
--print-geotiff=true \
--output-dir="$HOME/scratch/landsat-test/" \
--prefix="landsat_test_" \
--start-date=2010 \
--end-date=2015 \
-j;
# Example 2: implement zonal statistics for the 2010-2015 differences
# GeoTIFFs (see relevant landsat directory of this repository)
./extract-gis.sh --dataset="landsat" \
--dataset-dir="/project/rpp-kshook/Model_Output/Landsat/" \
--variable="land-cover-change" \
--print-geotiff=false \
--lat-lims="44,60" \
--lon-lims="-118,-78" \
--output-dir="$HOME/scratch/landsat-test/" \
--prefix="landsat_test_" \
-j;