-
Notifications
You must be signed in to change notification settings - Fork 298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sf 0.6-1 (CRAN): plot error #685
Comments
Thanks! > class(st_bbox(nc))
[1] "bbox"
> class(st_bbox(world))
[1] "numeric" so the way bounding boxes are stored in sf objects has changed. And when retrieving, |
Ah, this may also affect |
It probably affects several R packages - I would assume that some of the reverse depends/imports/suggests packages also contains some Is there a way to fix existing data? I've (naively) tried |
Yes, rerunning the script you used to create the object in the first place with 0.6-1, or alternatively, set_bb = function(x) { class(attr(x[[attr(x, "sf_column")]], "bbox")) = "bbox"; x }
(world = set_bb(world)) |
Thanks for the heads up @edzer. This doesn't seem to affect bcmaps/bcmaps.rdata (though why I don't know?) Or maybe it will if I were to recreate the data with the current version of sf?: library(sf)
#> Linking to GEOS 3.6.2, GDAL 2.2.3, proj.4 5.0.0
library(bcmaps)
library(spData)
#> To access larger datasets in this package, install the spDataLarge
#> package with: `install.packages('spDataLarge',
#> repos='https://nowosad.github.io/drat/', type='source'))`
class(st_bbox(world))
#> [1] "numeric"
class(st_bbox(bc_bound()))
#> [1] "bbox" Created on 2018-03-23 by the reprex package (v0.2.0). |
I've checked all the sf data in my packages. It turns out that this issue affects only objects older that ~6 months. |
The new sf version give an error when plotting a simple dataset -
world
(epsg: 4326).The code and session info are attached below:
Session info
The text was updated successfully, but these errors were encountered: