You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
s2_rebuild transforms POLYGON FULL into an empty geometrycollection #262
I'm (finally) implementing support for POLYGON FULL in sf, and ran into s2_rebuild converting an s2 full polygon to a GEOMETRYCOLLECTION EMPTY. I don't think it should! I'll work around it in sf, but it would be nice if it wasn't touched in s2_rebuild: In a debug session in sf::st_make_valid():
That's a great point...the S2Builder doesn't know about full polygons (I seem to remember) and there are some special gymnastics to ensure that it is handled properly in boolean operations. A single full polygon can probably be special-cased...I am not sure what would happen if one tried to rebuild a polygon that contained a FULL loop, though.
Activity
paleolimbot commentedon Sep 20, 2024
That's a great point...the S2Builder doesn't know about full polygons (I seem to remember) and there are some special gymnastics to ensure that it is handled properly in boolean operations. A single full polygon can probably be special-cased...I am not sure what would happen if one tried to rebuild a polygon that contained a FULL loop, though.
paleolimbot commentedon Sep 20, 2024
I don't think we have an
s2_is_full()to special-case this at the R level but that would basically be the workaround.edzer commentedon Sep 21, 2024
s2_is_full()would be great to have!