MerginMaps / MerginMaps/mobile

Changes not detected when using survey GPKG with rasters

Open
#692 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug sync
Dominant language
C++
Stars
388
Forks
87
Avg merge
2d 7h
Merged PRs (30d)
20

Description

A problem that a user was having:
- setup: a geopackage with some survey vector layers + a raster layer with a background map
- when a feature in survey layer was modified, Input claimed no changes

The problem is that changes were not detected because the GPKG was open in WAL mode, and the local .gpkg file was unchanged compared to the basefile, so geodiff was not even run on that file.

The GPKG file was open in WAL mode - which should not happen, because we request OGR to switch to non-WAL mode. However in this case, a raster layer from the same GPKG file was loaded first, opened in WAL mode, and then OGR as the second client was unable to switch to non-WAL mode anymore...

Possible fix: turn all GPKG to non-WAL mode before opening project in Input? Or maybe make GDAL respect OGR_SQLITE_JOURNAL option as well? Or just warn users this is not supported?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing project opening and how raster and survey vector layers access the same GPKG, then inspect the WAL-mode and geodiff comparison behavior described in the issue. Reproduce the case where the raster opens first; done should mean modifications to the survey layer are detected, with the chosen handling documented or implemented.

Written by the indexing model from the issue text.

Assessment

Tech stack
sqlite
Domain
databases, mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.