Simple Features for R
open sourceGPL-2.0-only OR MITfree
sf is the R package for spatial vector data in the Simple Features standard. It keeps features as rows of a data.frame or tibble with a geometry list-column, supports all 17 simple feature types in every dimension, reads and writes data through GDAL (including spatial databases such as PostGIS via DBI), runs geometry operations through GEOS on projected coordinates and s2geometry on ellipsoidal ones, and transforms coordinate reference systems with PROJ. It replaces the older sp package, and stars, lwgeom and sfnetworks build on it.
Problems it solves
- read a shapefile or GeoPackage into R and work with it like a data frame
- do spatial joins and buffers on map data in R
- reproject my spatial data to another coordinate system in R
Features
- simple features as data.frame or tibble rows with a geometry column
- all 17 simple feature types, XY to XYZM
- read and write spatial files and PostGIS through GDAL
- geometry operations with GEOS and s2geometry
- coordinate reference system transformation with PROJ
Alternatives
The same job
These do what sf does.
- GDAL Translator library for raster and vector geospatial data formats
- PostGIS Spatial extension for PostgreSQL: geometry, geography and raster data in SQL
- PROJ Cartographic projections and coordinate transformations library
- QGIS Free and open source geographic information system for Linux, Windows and macOS
- terra R package for spatial data analysis with vector and raster data, the successor of raster
- sp R classes and methods for spatial data
