Skip to content

Commit

Permalink
Iss12 (#13)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
kasra-keshavarz authored Nov 16, 2022
1 parent 6886779 commit faab5cb
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 5 deletions.
8 changes: 4 additions & 4 deletions assets/renv.lock
Original file line number Diff line number Diff line change
Expand Up @@ -110,15 +110,15 @@
},
"exactextractr": {
"Package": "exactextractr",
"Version": "0.9.0",
"Version": "0.9.1",
"Source": "GitHub",
"RemoteType": "github",
"RemoteHost": "api.github.com",
"RemoteUsername": "isciences",
"RemoteRepo": "exactextractr",
"RemoteRef": "6d02446438991c3d6a8017474200aaf23fc7a695",
"RemoteSha": "6d02446438991c3d6a8017474200aaf23fc7a695",
"Hash": "c22e1f368bc1d3083f3ad82ee8134344",
"RemoteRef": "f875cea876f0f9746f741e5559fce0e044fae8b8",
"RemoteSha": "f875cea876f0f9746f741e5559fce0e044fae8b8",
"Hash": "dc114ab271000cfc3e72331d5212f2c2",
"Requirements": [
"Rcpp",
"raster",
Expand Down
44 changes: 44 additions & 0 deletions example/gsde.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/bin/bash

# Geospatial Dataset Processing Workflow
# Copyright (C) 2022, University of Saskatchewan
#
# 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
# pfaf 71 - Saskatchewan-Nelson System Shapefiles of MERIT-Basins -
# from the GSDE rasters.

# Always call the script in the root directory of this repository
cd ..
echo "The current directory is: $(pwd)"

# first download a sample shapefile - could be any shapefile
wget -m -nd -nv -q -A "cat_pfaf_71_MERIT_Hydro_v07_Basins_v01_bugfix1.*" \
"http://hydrology.princeton.edu/data/mpan/MERIT_Basins/MERIT_Hydro_v07_Basins_v01_bugfix1/pfaf_level_02/";

# implement subsetting and zonal statistics
./extract-gis.sh --dataset="GSDE" \
--dataset-dir="/project/rpp-kshook/Model_Output/GSDE/download/gsde-30sec/" \
--variable="BD" \
--shape-file="$(pwd)/cat_pfaf_71_MERIT_Hydro_v07_Basins_v01_bugfix1.shp" \
--print-geotiff=true \
--output-dir="$HOME/scratch/depth-to-bedrock-test/" \
--prefix="dtb_" \
--stat="mean,min,max" \
--email="you@company.ca" \
-j;

2 changes: 1 addition & 1 deletion landsat/landsat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ if [[ "$printGeotiff" == "true" ]]; then
echo "$(logDate)$(basename $0): subsetting GeoTIFFs under $outputDir"
for var in "${variables[@]}"; do
# subset based on lat and lon values
subset_geotiff "${geotiffDir}/${var}.tif" "${outputDir}/${prefix}${var}.tif"
subset_geotiff "${cache}/${var}/${var}.tif" "${outputDir}/${prefix}${var}.tif"
done
fi

Expand Down

0 comments on commit faab5cb

Please sign in to comment.