Skip to content
New issue

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

Empty multipolygon geometry has different encoding after conversion from GPKG to PG #213

Open
wonder-sk opened this issue Aug 22, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@wonder-sk
Copy link
Contributor

DB sync was failing on a dataset with some empty multi-polygons when doing doing sanity check after the initial copy from GPKG to PostGIS.

       "old": "R1AAEX5/AAABBgAAAAEAAAABAwAAAAAAAAA="
       "new": "R1AAEX5/AAABBgAAAAAAAAA="

It turns out the original geometry was a multi-polygon with one polygon with zero rings:

01 | 06 00 00 00 | 01 00 00 00 | 01 | 03 00 00 00 | 00 00 00 00
    multipolygon   one child geom      polygon       no rings

And after the import to PostGIS, the geometry was a multi-polygon with no polygons in it:

01 | 06 00 00 00 | 00 00 00 00
    multipolygon   no child geoms

Not sure where/why this conversion happens. A workaround would be to change the representation of empty multi-polygons before doing operations with geodiff.

@wonder-sk wonder-sk added the bug Something isn't working label Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant