Introduction to Spatial Libraries in R
The spatial libraries for R are in a major state of change and this can be very confusing. This web site provides a good overview. Below is a general description of the packages and my experiences with them:
- rgdal - old library for reading and writing spatial data (going away in 2023)
- raster - package to read, write and transform raster data. Works well with TIF files
- Requires rgdal to install. Will also install sp and terra
- terra - potential replacement for raster package. Appears to work (intro, )
- stars - provides access to data cubes like NOAAs netCDF files. I could not get the package to read simple TIF files. (intro)
- sf - appears to be working but beware that the documentation is not keeping up with the changes.