Closed JJFoest closed 7 months ago
If you turn s2 off, does it help?
Hi! Thanks for the suggestions.
This runs ok:
sf_use_s2(FALSE) worldshape <- rnaturalearth::ne_countries(returnclass = "sf") %>% sf::st_union() worldshape
I only get a message: "although coordinates are longitude/latitude, st_union assumes that they are planar".
Thank you!
Dear rnaturalearth developers,
Firstly, thank you for making an awesome package (I'm using v. 0.3.4). I've been running into some problems with invalid geometry.
If I run:
worldshape <- rnaturalearth::ne_countries(returnclass = "sf") %>% sf::st_union()
I receive the error message: "Error in wk_handle.wk_wkb(wkb, s2_geography_writer(oriented = oriented, : Loop 0 is not valid: Edge 0 crosses edge 78".
Now, if I try to force the geometry to be valid:
worldshape <- rnaturalearth::ne_countries(returnclass = "sf") %>% sf::st_make_valid() %>%
sf::st_union()
I receive the same error message.
If it helps, I am running v. 1.0-13 of sf in R 4.3.1.
Thank you for your consideration.