MerginMaps / MerginMaps/geodiff

Change the string length in metadata

Open
#160 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
183
Forks
21
Avg merge
9d 11h
Merged PRs (30d)
2

Description

Note about data types and strings: for geopackage/sqlite the change in the string length is just different value in the metatable, but the actually it both stored same way. Since in reality it is same data type, this metatable difference is ignored by geodiff.

robot@gis:~$ ogrinfo gis/point.gpkg -al -so |grep WorkZone
WorkZone: String (10.0)
robot@gis:~$ ogrinfo other_point.gpkg -al -so |grep WorkZ
WorkZone: String (5.0)
robot@gis:~$ geodiff diff --json point.gpkg other_point.gpkg a-to-b.diff
(returns no diff)

On the contrary, if the type changes to int from string, the difference should be caught by geodiff

It would be good if this particular case the geodiff can change the metadata entry:

If this value is set to a non-zero value, then certain QGIS operations fail such as when the layer is exported. So we now have a situation where, when using Mergin, certain QGIS operations fail due to this not syncing properly

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 reproducing the ogrinfo and geodiff commands shown in the issue, then inspect the metadata comparison and synchronization entry points. Done means differing string-length metadata is handled without reporting a data diff, while string-to-int changes remain detected and the resulting metadata no longer breaks QGIS export operations.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, sqlite
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.