talira

R classes and methods for spatial data

open sourceGPL-2.0-or-laterfree

An R package of classes and methods for spatial data: points, lines, polygons and grids, in 2D or 3D, with their attributes and coordinate reference systems, plus functions to plot them as maps, select by location, retrieve coordinates, subset and summarise. It's in maintenance mode and is being slowly deprecated in favour of the sf package, which it now uses for coordinate reference system checks and transformations (rgdal, rgeos and maptools are no longer used). By Edzer Pebesma and Roger Bivand; GPL 2 or later.

Problems it solves

  • load and plot points and polygons with their attributes in R
  • work with an older R spatial package that expects SpatialPolygonsDataFrame objects
  • keep legacy R spatial analysis code running

Features

  • classes for spatial points, lines, polygons and grids with attributes
  • coordinate reference systems
  • plotting spatial data as maps
  • spatial selection and subsetting

Limitations

  • In maintenance mode and being slowly deprecated in favour of the sf package1

Alternatives

The same job

These do what sp does.

  1. sf Simple Features for R
  2. terra R package for spatial data analysis with vector and raster data, the successor of raster
  3. raster R package for reading, writing, analysing and modelling raster spatial data, superseded by terra
  4. fields (R) Tools for spatial data: splines, Kriging and spatial statistics in R

Compare sp with the top 3