Skip to content

s2_rebuild transforms POLYGON FULL into an empty geometrycollection #262

Open
@edzer

Description

@edzer

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():

Browse[1]> s2
<geodesic s2_geography[2] with CRS=OGC:CRS84>
[1] POLYGON ((0 -90, 0 -90))             POLYGON ((0 0, 1 0, 1 1, 0 1, 0 0...
Browse[1]> 
debug: s2 = s2::s2_rebuild(s2, s2_options)
Browse[1]> 
debug: st_as_sfc(s2, crs = crs)
Browse[1]> s2
<geodesic s2_geography[2] with CRS=OGC:CRS84>
[1] GEOMETRYCOLLECTION EMPTY             POLYGON ((0 0, 1 0, 1 1, 0 1, 0 0...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions