Introduction to Spatial Libraries in R
The good news is that there has been quite a bit of shake out for the spatial libraries for R in the past few years. The bad news is that the shake out is not done, may never be done, and there are issues with the libraries including a wide range of pretty terrible documentation. Basically, the library terra appears to be the most general, powerful, and now widely used. Unfortunately, not everything is compatible with it so you'll still need to use sp once in a while. The is a short list:
- terra - potential replacement for sf and raster package. Appears to work pretty well. Here is a quick intro.
- sf - appears to be working but beware that the documentation is not keeping up with the changes
Older libraries (might need to be used with other libraries that don't support objects from terra or sf):
- 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
- stars - provides access to data cubes like NOAAs netCDF files. I could not get the package to read simple TIF files. (intro)