We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
world
Thanks to some help over on SO, I discovered some slight offsets between portions of MULTIPOLYGONs that cross the 180th meridian in the world dataset.
It looks like this is an issue for Russia, Fiji, and Antarctica.
library(sf) library(spData) library(dplyr) library(ggplot) meridian_180 <- tibble(lon = c(-180,-180), lat = c(-90, 90)) %>% st_as_sf(coords = c("lon","lat"), crs = "EPSG:4326") %>% summarise(geometry = st_combine(geometry)) %>% st_cast("LINESTRING") %>% smoothr::densify(max_distance = 1) world_180 <- world %>% slice(st_intersects(., meridian_180, sparse = FALSE) %>% as_vector() %>% which()) fiji = world_180$geom[1] russia = world_180$geom[2] antarctica = world_180$geom[3] st_distance(st_cast(fiji, 'POLYGON')[c(1, 3)])
st_distance(st_cast(russia, 'POLYGON')[c(1, 6)])
antarctica <- antarctica %>% st_transform(crs = 'EPSG:3412') ggplot(antarctica) + geom_sf()
The text was updated successfully, but these errors were encountered:
Hi @HRodenhizer that was done on purpose (to avoid some invalid geometry problems with s2).
Sorry, something went wrong.
(Also, importantly datasets from spData are mostly suitable for teaching, benchmarking and testing; I would not suggest using them for research)
Got it - that makes sense. I find that this dataset is extremely useful for low-detail, large extent visualizations, but thanks for the warning!
Good to have this know bug/feature documented for anyone else who happens across this.
Context: r-spatial/sf#1649 (comment)
No branches or pull requests
Thanks to some help over on SO, I discovered some slight offsets between portions of MULTIPOLYGONs that cross the 180th meridian in the
world
dataset.It looks like this is an issue for Russia, Fiji, and Antarctica.
The text was updated successfully, but these errors were encountered: