aboutsummaryrefslogtreecommitdiffstats
path: root/import_source.py
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2025-08-14 15:59:29 +0200
committerGuilhem Moulin <guilhem@fripost.org>2025-08-14 16:03:30 +0200
commitf7785f929a4402a98a2d0bd428ba00968be8cf01 (patch)
tree42cfa0b349f6cffc18840f1fae8e1157ea843a92 /import_source.py
parent2c3ee79cb434fc4cf315ee3a6a526156053d76c4 (diff)
Use .UpdateFeature() from gdal ≥3.7.
Diffstat (limited to 'import_source.py')
-rw-r--r--import_source.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/import_source.py b/import_source.py
index 795bf0f..1948f7b 100644
--- a/import_source.py
+++ b/import_source.py
@@ -1052,8 +1052,7 @@ def updateLayerCache(lyr : ogr.Layer, cache : ogr.Layer,
logging.info('Updated layer "%s" has identical fingerprint %s',
layername, fingerprint.hex()[:8])
- # TODO with gdal 3.7 and OLCUpdateFeature capability, use UpdateFeature() instead
- if cache.SetFeature(feature) != ogr.OGRERR_NONE:
+ if cache.UpdateFeature(feature, [1,2], [], False) != ogr.OGRERR_NONE:
raise RuntimeError('Could not update feature in layer cache')
else:
if cache.CreateFeature(feature) != ogr.OGRERR_NONE: