s2_intersection creates invalid geometries
Open
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 81
- Forks
- 19
- Avg merge
- 20h 25m
- Merged PRs (30d)
- 3
Description
See https://github.com/r-spatial/sf/issues/1810 ; reprex through sf:
library(sf)
library(giscoR)
library(dplyr)
lander <- gisco_get_nuts(country = "DE",
nuts_level = 1) %>%
mutate(value = runif(n(), min = 100, max = 500)) # some data to interpolate ...
grid <- st_make_grid(st_bbox(lander),
n = c(10, 10),
square = F) %>%
st_as_sf() %>%
mutate(id = 1:n()) # polygon ids
all(st_is_valid(st_intersection(lander, grid)))
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Run the provided R reprex using sf, giscoR, and dplyr, beginning with st_intersection and the final st_is_valid check. Trace the s2 intersection path used by sf and determine why it produces invalid geometries; done means the reported reproduction no longer returns invalid results.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100