sf
sf copied to clipboard
Evaluation error: Found 13 features with invalid spherical geometry. Loop 37 is not valid: Edge 0 has duplicate vertex with edge 8
Hi, I am using the flicker API to get the photo, and I faced some problems with the code in R. Here is my code and the error. Thanks, if anyone could help, I will appreciate it a lot.
If you need any datasets from me, please feel free to ask.
Try to turn off the spherical geometry engine as workaround: sf_use_s2(FALSE); or transform the coordinate system to plannar: st_transform().
sf_use_s2(FALSE) worked for me, but I expect it is annoying a lot of people. I found any map that included Russia, like https://geodata.lib.utexas.edu/catalog/stanford-tf388jt3160 would not work.
Could you specify "would not work"? I downloaded the map you point to, which obviously is not valid on S2, but st_make_valid() makes it valid without issue.