Skip to content

Commit faab5cb

Browse files
Iss12 (#13)
* updating exactextractr dependency version as well as updating Graham's local cache files * correcting subsetting address file for the output tif * correcting variables in GSDE's example
1 parent 6886779 commit faab5cb

File tree

3 files changed

+49
-5
lines changed

3 files changed

+49
-5
lines changed

assets/renv.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,15 +110,15 @@
110110
},
111111
"exactextractr": {
112112
"Package": "exactextractr",
113-
"Version": "0.9.0",
113+
"Version": "0.9.1",
114114
"Source": "GitHub",
115115
"RemoteType": "github",
116116
"RemoteHost": "api.github.com",
117117
"RemoteUsername": "isciences",
118118
"RemoteRepo": "exactextractr",
119-
"RemoteRef": "6d02446438991c3d6a8017474200aaf23fc7a695",
120-
"RemoteSha": "6d02446438991c3d6a8017474200aaf23fc7a695",
121-
"Hash": "c22e1f368bc1d3083f3ad82ee8134344",
119+
"RemoteRef": "f875cea876f0f9746f741e5559fce0e044fae8b8",
120+
"RemoteSha": "f875cea876f0f9746f741e5559fce0e044fae8b8",
121+
"Hash": "dc114ab271000cfc3e72331d5212f2c2",
122122
"Requirements": [
123123
"Rcpp",
124124
"raster",

example/gsde.sh

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
#!/bin/bash
2+
3+
# Geospatial Dataset Processing Workflow
4+
# Copyright (C) 2022, University of Saskatchewan
5+
#
6+
# This file is part of the Geospatial Dataset Processing Workflow
7+
#
8+
# This program is free software: you can redistribute it and/or modify
9+
# it under the terms of the GNU General Public License as published by
10+
# the Free Software Foundation, either version 3 of the License, or
11+
# (at your option) any later version.
12+
#
13+
# This program is distributed in the hope that it will be useful,
14+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
15+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16+
# GNU General Public License for more details.
17+
#
18+
# You should have received a copy of the GNU General Public License
19+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
20+
21+
# This is a simple example to extract common statistics for the
22+
# pfaf 71 - Saskatchewan-Nelson System Shapefiles of MERIT-Basins -
23+
# from the GSDE rasters.
24+
25+
# Always call the script in the root directory of this repository
26+
cd ..
27+
echo "The current directory is: $(pwd)"
28+
29+
# first download a sample shapefile - could be any shapefile
30+
wget -m -nd -nv -q -A "cat_pfaf_71_MERIT_Hydro_v07_Basins_v01_bugfix1.*" \
31+
"http://hydrology.princeton.edu/data/mpan/MERIT_Basins/MERIT_Hydro_v07_Basins_v01_bugfix1/pfaf_level_02/";
32+
33+
# implement subsetting and zonal statistics
34+
./extract-gis.sh --dataset="GSDE" \
35+
--dataset-dir="/project/rpp-kshook/Model_Output/GSDE/download/gsde-30sec/" \
36+
--variable="BD" \
37+
--shape-file="$(pwd)/cat_pfaf_71_MERIT_Hydro_v07_Basins_v01_bugfix1.shp" \
38+
--print-geotiff=true \
39+
--output-dir="$HOME/scratch/depth-to-bedrock-test/" \
40+
--prefix="dtb_" \
41+
--stat="mean,min,max" \
42+
--email="[email protected]" \
43+
-j;
44+

landsat/landsat.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ if [[ "$printGeotiff" == "true" ]]; then
243243
echo "$(logDate)$(basename $0): subsetting GeoTIFFs under $outputDir"
244244
for var in "${variables[@]}"; do
245245
# subset based on lat and lon values
246-
subset_geotiff "${geotiffDir}/${var}.tif" "${outputDir}/${prefix}${var}.tif"
246+
subset_geotiff "${cache}/${var}/${var}.tif" "${outputDir}/${prefix}${var}.tif"
247247
done
248248
fi
249249

0 commit comments

Comments
 (0)