Jan 17, 2019

The good news

  • we've seen a strong uptake of sf, by both users and developers
  • we improved interoperability with spatial databases, geojson etc., also of coordinate reference system handling (PROJ)
  • spatial indexes are computed on-the-fly e.g. by st_intersects, st_intersection etc.
  • geom_sf is now in ggplot2, and takes care of (re)projecting incompatible layers
  • attribute-geometry relationships:

suppressPackageStartupMessages(library(tidyverse))
suppressPackageStartupMessages(library(sf))
system.file("gpkg/nc.gpkg", package="sf") %>% read_sf -> nc
nc2 <- nc %>% select(SID74, SID79) %>% gather(VAR, SID, -geom)
ggplot() + geom_sf(data = nc2, aes(fill = SID)) + facet_wrap(~VAR, ncol = 1)

What about time, and raster?

  • if we have time-dependent data, do we put it over multiple columns? or recycle feature geometries in a long ("tidy") table?
  • (gg)plotting multiple attributes in facets requires recycling of geometries (tidyr::gather)
  • sf has no raster support, no solid vector \(\leftrightarrow\) raster integration
  • you could emulate them, but that won't bring you far
  • Why raster data?
  • variables that vary continuously over space (time) can be represented more naturally, by regular sampling (think: images)
  • Earth Observation data (visible: land, ocean; temperature; radar; atmospheric composition) come down, freely, in Copernicus now with 150 Tb/day
  • Climate model data, also free, is large; CMIP6 will generate 15-30 Pb
  • (numerous other sources)