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

Upcoming changes to R spatial packages #44

Open
nfahlgren opened this issue Jun 19, 2023 · 0 comments
Open

Upcoming changes to R spatial packages #44

nfahlgren opened this issue Jun 19, 2023 · 0 comments

Comments

@nfahlgren
Copy link
Collaborator

nfahlgren commented Jun 19, 2023

Article: https://geocompx.org/post/2023/rgdal-retirement/

The packages rgdal, rgeos, and maptools are being removed from CRAN October 2023.

FIELDimageR does not use these directly (except for maptools, which can be removed after merging #43), but it uses sp, which has all of these as dependencies.

The article discusses the need to shift from sp to modern alternatives sf or terra.

FIELDimageR imports the following from sp:

sp::Polygon --> sf::st_polygon

sp::Polygons --> sf:: st_multipolygon

sp::SpatialPointsDataFrame --> sf:: st_sf

sp::SpatialPolygons --> sf:: st_sfc

sp::SpatialPolygonsDataFrame --> sf:: st_sf

sp::bbox --> sf:: st_bbox

sp::over --> sapply(sf::st_intersects(x, y), function(z) if (length(z) == 0) NA_integer_ else z[1])

sp::proj4string --> sf::st_crs

sp::spsample --> sf:: st_sample

sp::elide --> ?

Resources:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant