MerginMaps / MerginMaps/geodiff
OGR reports wrong feature counts
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 183
- Forks
- 21
- Avg merge
- 9d 11h
- Merged PRs (30d)
- 2
Description
When using geodiff, it may happen that OGR (and therefore also QGIS) would report wrong feature counts. This is caused by the fact that OGR uses its own table gpkg_ogr_contents with feature counts for each table which are auto-updated by triggers. But when applying changesets with geodiff, we temporarily disable triggers and therefore the counts do not get updated.
This does not lead to any harm AFAIK, but it is very confusing for users to see incorrect feature counts in QGIS.
It would be good to handle this nicely - probably by not disabling these particular triggers, or by handling updates of this table in some other way.
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 file or test is named. Start by tracing geodiff's changeset application and the logic that temporarily disables triggers, then inspect how the gpkg_ogr_contents table is maintained. Done means applying changesets leaves OGR and QGIS reporting correct feature counts without causing other trigger-related regressions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100