wallaceEcoMod / wallace

an interactive, reproducible, expandible, instructional, and open-source GUI-based app for ecological niche modeling
https://wallaceecomod.github.io/
GNU General Public License v3.0
132 stars 46 forks source link

Please remove dependencies on **rgdal**, **rgeos**, and/or **maptools** #391

Closed rsbivand closed 10 months ago

rsbivand commented 1 year ago

This package depends on (depends, imports or suggests) raster and one or more of the retiring packages rgdal, rgeos or maptools (https://r-spatial.org/r/2022/04/12/evolution.html, https://r-spatial.org/r/2022/12/14/evolution2.html). Since raster 3.6.3, all use of external FOSS library functionality has been transferred to terra, making the retiring packages very likely redundant. It would help greatly if you could remove dependencies on the retiring packages as soon as possible.

rsbivand commented 1 year ago

You will be aware, for example from: https://r-spatial.org/r/2022/04/12/evolution.html, https://r-spatial.org/r/2022/12/14/evolution2.html, https://r-spatial.org/r/2023/04/10/evolution3.html and https://rsbivand.github.io/csds_jan23/bivand_csds_ssg_230117.pdf and perhaps view https://www.youtube.com/watch?v=TlpjIqTPMCA&list=PLzREt6r1NenmWEidssmLm-VO_YmAh4pq9&index=1 that rgdal, rgeos and maptools will be retired this year, in October 2023.

wallace imports 'rgdal', 'rgeos' and uses rgdal::readOGR rgeos::gBuffer as found by pkgapi, not in NAMESPACE, in R/penvs_userBgExtent.R, R/xfer_userExtent.R, and others. raster and terra are suggested, and they provide coercion methods and terra::vect and terra::buffer which could replace functions from retiring packages. Please fix best by June, latest October 2023.

rsbivand commented 1 year ago

@gepinillab @jamiemkass @daattali See also https://r-spatial.org/r/2023/05/15/evolution4.html. Please take urgent steps to resolve this issue. No positive changes appear in the repository. Less than three months remain to retain this package on CRAN; you were first warned more than six months ago.

rsbivand commented 11 months ago

@gepinillab : The new version 2.0.6 of wallace does not address https://github.com/wallaceEcoMod/wallace/issues/391. rgeos will be archived in about four weeks' time. You need to act now. You also need to protect against ecospat not meeting the deadline: https://github.com/ecospat/ecospat/issues/41#issuecomment-1708293604.

I see these uses of rgeos::gBuffer:

R/penvs_bgExtent.R:    bgExt <- rgeos::gBuffer(occs.sp, width = bgBuf)
R/penvs_bgExtent.R:    bgExt <- rgeos::gBuffer(bgExt, width = bgBuf)
R/penvs_drawBgExtent.R:    bgExt <- rgeos::gBuffer(newPoly, width = drawBgBuf)
R/penvs_userBgExtent.R:      bgExt <- rgeos::gBuffer(bgExt, width = userBgBuf)
R/xfer_draw.R:  bgExt <- rgeos::gBuffer(newPoly, width = drawXfBuf)
R/xfer_userExtent.R:    bgExt <- rgeos::gBuffer(bgExt, width = userBgBuf)

Please consider coercing to sfc or SpatVector, using methods in sf or terra, and coercing back to sp as described in https://r-spatial.org/r/2023/05/15/evolution4.html.

gepinillab commented 11 months ago

Thanks for the notice, @rsbivand. We are already working on the changes and will submit it to CRAN before the deadline.

rsbivand commented 11 months ago

@gepinillab Less than three weeks remain to fix this.

gepinillab commented 10 months ago

@rsbivand Wallace 2.1.0 (on CRA) is already not using these packages.

Thank you so much for your reminders for this critical transition.

Fixed in #404 and #405