Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Iss12 #13

Merged
merged 3 commits into from
Nov 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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