Closed rsbivand closed 2 years ago
Yes, the path I'm suggesting is to deprecate read/write/RAST/VECT without underscore soon, and only use terra leaving r.in/out.bin for sp raster. Coercion to other representation formats would then be up to the user. That will be easier to maintain, I think, but welcome discussion. If for example stars is a better fit for temporal multiband rasters, that could be added later.
@VLucet and @florisvdh Since no negative review, I'll merge tomorrow to rgrass7 and rgrass, and rgrass7 to main shortly thereafter, unless I hear why this should not be done.
@rsbivand sorry, I had missed your review request. I can look at it later today.
@florisvdh I don't think that enabling the initGRASS()
examples when running R in an active GRASS environment is sensible, because GRASS is already running. There is no way to test initGRASS()
(GRASS in R) and regular (R in GRASS) at the same time, I think.
There is no way to test initGRASS() (GRASS in R) and regular (R in GRASS) at the same time, I think.
Could be, depending on the circumstances, although I didn't run into problems so far. Rerunning initGRASS()
in a R-in-GRASS session just resets the needed env variables and seems to work well, using the same GRASS version, although I wouldn't try/recommend to call another GRASS version that way. The examples at the bottom of https://github.com/rsbivand/rgrass/pull/45#pullrequestreview-895402640 were run as R within GRASS and also contain a change of the location. Rerunning some lines, from R within GRASS 8.0.1 (actually RStudio, see GRASS session code):
I think I'd prefer to write a short vignette rather than use examples to demonstrate the different wayss of using the package, as a new PR. I just marked the old functions as deprecated, which may alert users to forthcoming changes. Are we OK to merge?
Yes, a vignette is the best way.
I just marked the old functions as deprecated
Not pushed that commit yet?
Are we OK to merge?
I didn't encounter problems and totally trust you!
Thanks, now pushed! And that's why trusting totally implies trusting collaborative processes!
Thanks, I updated the other deprecation messages.
Thanks, all looks good!
The
rastNG
branch provides re-implementations using the"SpatRaster"
and"SpatVector"
classes from terra, and using terra methods for reading and writing intermediate files (See #42). The additions need checking on (R CMD check rgrass7_0.2-8.tar.gz
innc_basic_spm_grass7
location): rgrass7_0.2-8.tar.gz or this example file: rgrass7-Ex.zipbefore merging (possibly other Linux versions if contributions are possible).