MerginMaps / MerginMaps/geodiff
Empty multipolygon geometry has different encoding after conversion from GPKG to PG
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 183
- Forks
- 21
- Avg merge
- 9d 11h
- Merged PRs (30d)
- 2
Description
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.
Contributor guide
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
No source files or tests are named. Start by reproducing the DB sync sanity check with an empty multipolygon converted from GPKG to PostGIS, then trace where the geometry changes between the two encoded forms. Done means the conversion behavior is explained and the comparison or conversion handles the representation consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql, python
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100