2.4 Why simple features, why not using {sp}

Simple features is supported by other GIS applications (QGIS, PostGIS).

{sf} vs {sp}:

  • Fast reading and writing.

  • Enchanced plotting performance

  • sf can be treated as data frames for most operations

  • sf function are consistent and intuitive

  • works with |> and well with tidyverse collection of package

library(sp)
world_sp = as(world, "Spatial") # from an sf object to sp
# sp functions ...
world_sf = st_as_sf(world_sp)           # from sp to sf