MerginMaps / MerginMaps/geodiff
Change the string length in metadata
Nobody has claimed this yet.
- 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
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
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