datacarpentry / organization-geospatial

Introduction to Geospatial Concepts
https://www.datacarpentry.org/organization-geospatial/
Other
36 stars 31 forks source link

replace rgdal and rgeos with equivalent calls from sf or terra #88

Open zkamvar opened 8 months ago

zkamvar commented 8 months ago

What is the problem?

The introduction episode along with several files in the code/ folder (which is unused in the lesson) still have library(rgdal), which is now causing the lesson to fail building due to the fact that the {rgdal} package is now retired.

This was opened in the r-raster-vector-geospatial lesson in 2021: https://github.com/datacarpentry/r-raster-vector-geospatial/issues/363 and the @datacarpentry/curriculum-advisors-geospatial had made a recommendation to replace rgdal and rgeos with calls from sf or terra:

  • 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.
  • 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.

Location of problem (optional)

https://github.com/search?q=repo%3Adatacarpentry%2Forganization-geospatial+%28rgdal+OR+rgeos%29&type=code