R functions for working with spatial data.