Skip to content
Prev 8888 / 12125 Next

[R-pkg-devel] Problem with package containing spatial data

Hi Igor,
I?ve a couple packages that have spatial data in them that I maintain. I?ve opted to package up the data as a geopackage file and import it as an {sf} object. Edzer Pebesma suggests this to circumvent changes in the {sf} package from affecting native {sf} objects that are distributed as part of a package. Maybe this is an option for you?

In https://github.com/adamhsparks/extractOz, see /inst/extdata for the geopackage file and https://github.com/adamhsparks/extractOz/blob/main/R/data.R for handling the data importing and making available in the R session on package load.

Best,
Adam