Ignore fid field #984
Replies: 1 comment
-
FWIW, the issue with fid changing definitely on my side and not a |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Kia ora,
Just testing out kart and it seems to work quite well. I have only one small issue that I'm reaching out to see if anyone can help.
I have a python script where I load a geopackage using geopandas, modify it, and then save it to the geopackage again. I've been tracking features using a separate
featureid
column as I've found the way thatfid
is handled in geopandas/ pyogrio a bit confusing as I haven't been able to make the fid value persist across save/loads.I use the following command to commit the changes to my kart repository using subprocess:
kartCmd = [
"kart",
"import",
OutputGeopackagePath,
"--all-tables",
"--replace-existing",
"--primary-key", 'featureId'
]
It wokrs quite well, except that geopandas always writes a fid column when saving to file, and this is picked up kart and correctly marked as a change. This means that a lot of features are marked as changing when it's only the fid that is changing. When looking at the change log, it appears as quite a large change, when only a few actual features have changed.
This is probably more of a
pyogrio
issue , but I was wondering if anyone here at any insight on how to handle this case, as it really only becomes an issue when committing features to repository.Thanks!
Beta Was this translation helpful? Give feedback.
All reactions