r-raster-vector-geospatial icon indicating copy to clipboard operation
r-raster-vector-geospatial copied to clipboard

Update to the spatial packages lifecycle: migrate to use sf, terra, and stars

Open zkamvar opened this issue 3 years ago • 5 comments

packages like {rgdal} and {rgeos} are going to be replaced in a couple of years, so it would be a good idea to revisit the package ecosystem for this lesson and revamp it.

Relevant section of UseR!2021 keynote: https://youtu.be/cK08bxUJn5A?t=1428 Relevant tweet thread summary from @RLadies: https://twitter.com/WeAreRLadies/status/1469286521874300939

zkamvar avatar Dec 10 '21 17:12 zkamvar

Good idea. Just wanted to note after seeing the issue title, that the materials already use sf.

jsta avatar Dec 10 '21 17:12 jsta

I will take a look at the links provided by @zkamvar above soon and take a look at the effects that these changes to rgdal or rgeos will have on our lesson. I will take a deeper look at terraand star. As @jsta noted, the lesson is already using sf.

drakeasberry avatar Feb 13 '22 00:02 drakeasberry

Just wanted to follow up on this.

The Geospatial Curriculum Advisory Committee has been reconstituted. We have not yet had our first meeting, but the move away raster, the pending end of life from rgdal and rgeos, and replacing Proj.4 strings will very likely be on our first agenda. Digging into the discussion around these is certainly needed and a good first start.

I would expect the Committee to have some guidance on the direction for the lessons in the not too distant future. Pinging my co-chair, @srappel so this is on your radar too!

jhollist avatar Feb 13 '22 01:02 jhollist

Glad the Geospatial Curriculum Advisory Committee is discussing moving on from the raster R package. I have found that re-writing old R scripts to incorporate terra is very straightforward and painless. The terra package is similar to raster (same developers - Hijmans et al.), but faster, more versatile, simpler, and often shares the same function terminology (e.g., writeRaster). Very clear introductory materials for terra here: https://rspatial.org/terra/spatial/index.html. No shade on stars, I'm sure it's awesome too! But, it would likely be easiest to re-write this Lesson using terra.

selmants avatar Feb 25 '22 20:02 selmants

Greetings from the Data Carpentry Geospatial Curriculum Advisory Committee (tagging my co-chair @jhollist),

This issue was discussed at our Q1 meeting on March 30, 2022. Here is an excerpt from the minutes:

  1. Deprecation of the sp, rgeos, and rgdal packages
    • The Committee agreed that the references to rgdal and rgeos be removed or replaced with references to the equivalent sf and terra functions as appropriate. This decision is closely paired with the rationale for choosing terra as the replacement for the raster package and aims to avoid code-breaking deprecations coming some time in 2023.
  2. Transition from raster to terra or stars
    • The terra package appears to be the most direct replacement for raster as it uses language which is similar to raster and common to other GIS. The Committee recommends that terra be adopted as a replacement to raster. Stars should be presented as an alternative to terra that may be faster in some cases or more appropriate for analyses with longitudinal elements.

I've added the "help wanted" label to this issue!

srappel avatar May 17 '22 19:05 srappel

Thank you @albhasan. At this time, the lesson contains to calls to raster or rgdal packages.

drakeasberry avatar Mar 25 '23 15:03 drakeasberry