Adapting to the recent changes in R spatial packages (sf, terra, PROJ library) (PROJ03)

oliver-hookerOliver Hooker
  • 17 Oct

Adapting to the recent changes in R spatial packages (sf, terra, PROJ library) (PROJ03)

https://www.prstatistics.com/course/adapting-to-the-recent-changes-in-r-spatial-packages-sf-terra-proj-library-proj03/

Please feel free to share!

R statistical software is becoming increasingly popular for spatial analysis and mapping. This is partially due to a large number of R packages devoted to applying various spatial methods. These packages, however, are being revised, updated, or even superseded to allow for better performance, simpler user interface, or expanded capabilities. Substantial recent changes in R spatial packages include developing the ‘sf’ package as a successor of ‘sp’, creation of terra as a successor of raster, and establishing the stars package. Additionally, all of these packages were affected by the recent major updates of the PROJ library. In this course, we will learn to use key packages for the analysis of spatial data, both vector (‘sf’) and raster (‘terra’), and see how they differ from their older counterparts, ‘sp’ and ‘raster’. Another important aspect of the course will be to understand spatial projections and coordinate systems, how the recent PROJ changes affect R users, and how to adjust to them.
By the end of the course, participants should:

Understand the basic concepts behind spatial analysis ecosystem in R
Know how packages such as sp/rgeos/rgdal/raster differ from their successors sf/terra/star
Be able to switch from using packages such as sp/rgeos/rgdal/raster to sf/terra/stars
Understand the basic concepts behind spatial projections, and how PROJ.7 differs from PROJ4
Know how to deal with coordinate reference systems in R
Have the confidence to switch from PROJ4 to PROJ7 (i.e., for instance, adjusting old scripts based on PROJ4)?

Day 1
Overview of spatial analysis ecosystem in R
• available R packages for spatial analysis in R
• how do R packages represent spatial objects, and how are they connected with each other
• importance of using the more recent R spatial packages, such as ‘sf’ or ‘terra’
• main concepts behind map projections (geoids, datums, geographic/projected coordinates, types of projections, etc.)
• implementation of these concepts in the PROJ library (used by most R spatial packages)
• differences between PROJ.4 and its newer versions (e.g. PROJ.7)
Spatial vector data analysis in R
• spatial vector data processing & analysis in R
• read/write/and visualize spatial vector data
• differences between ‘sp’/’rgdal’/’rgeos’ and ‘sf’
• moving from ‘sp’ to ‘sf’ for spatial vector data processing & analysis
• spherical geometry: how this concept was recently implemented in sf, and what is an impact of this implementation

Day 2
Spatial raster data analysis in R
• spatial raster data processing & analysis in R
• read/write/and visualize spatial raster data
• differences between ‘raster’ and ‘stars’/’terra’
• moving from ‘raster’ to ‘terra’ for spatial raster data processing & analysis
• short overview of package ‘stars’
Coordinate reference systems
• how to switch from PROJ.4 to PROJ.7 in R
• open session: questions from the participants

If you have any questions please email oliverhooker@prstatistics.com