CSHS-CWRA / CSHShydRology

Main package
GNU Affero General Public License v3.0
35 stars 39 forks source link

updates to spatial functions: switch raster to terra #101

Open jwtrubil opened 10 months ago

jwtrubil commented 10 months ago

updates to spatial functions: switch raster to terra

As requested by Dan Moore, updates to the spatial catchment delineation code

Description

The main thing is removing use of the raster package, putting terra in place of it. Additionally, I took out all use of the magrittr package and switched to the base R pipe.

Related Issue

I also fixed one issue with creation of working directories in the spatial data. It is now possible to use relative file paths for data downloads (ch_get_url_data.R).

The temporary folder creation for the spatial data seems to work well. However, I notice that the map function ( ch_get_map_base.R) uses a different method for creating a map data working directory. I recommend Dan and Paul decide on one route to do the same thing in both cases.