Skip to content

Commit b98de29

Browse files
committed
Python bindings: add relatedFieldNameMatch parameter to gdal.VectorTranslate()
1 parent 60543fc commit b98de29

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

swig/include/python/gdal_python.i

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3051,6 +3051,7 @@ def VectorTranslateOptions(options=None, format=None,
30513051
coordinateOperation=None,
30523052
SQLStatement=None, SQLDialect=None, where=None, selectFields=None,
30533053
addFields=False,
3054+
relaxedFieldNameMatch=False,
30543055
forceNullable=False,
30553056
emptyStrAsNull=False,
30563057
spatFilter=None, spatSRS=None,
@@ -3117,6 +3118,8 @@ def VectorTranslateOptions(options=None, format=None,
31173118
addFields:
31183119
whether to add new fields found in source layers (to be used with
31193120
accessMode == 'append' or 'upsert')
3121+
relaxedFieldNameMatch:
3122+
Do field name matching between source and existing target layer in a more relaxed way if the target driver has an implementation for it.
31203123
forceNullable:
31213124
whether to drop NOT NULL constraints on newly created fields
31223125
emptyStrAsNull:
@@ -3263,6 +3266,8 @@ def VectorTranslateOptions(options=None, format=None,
32633266
raise Exception('unhandled accessMode')
32643267
if addFields:
32653268
new_options += ['-addfields']
3269+
if relaxedFieldNameMatch:
3270+
new_options += ['-relaxedFieldNameMatch']
32663271
if forceNullable:
32673272
new_options += ['-forceNullable']
32683273
if emptyStrAsNull:

0 commit comments

Comments
 (0)