Skip to content

Commit

Permalink
Python bindings: add relatedFieldNameMatch parameter to gdal.VectorTr…
Browse files Browse the repository at this point in the history
…anslate()
  • Loading branch information
rouault committed Oct 29, 2024
1 parent 60543fc commit b98de29
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions swig/include/python/gdal_python.i
Original file line number Diff line number Diff line change
Expand Up @@ -3051,6 +3051,7 @@ def VectorTranslateOptions(options=None, format=None,
coordinateOperation=None,
SQLStatement=None, SQLDialect=None, where=None, selectFields=None,
addFields=False,
relaxedFieldNameMatch=False,
forceNullable=False,
emptyStrAsNull=False,
spatFilter=None, spatSRS=None,
Expand Down Expand Up @@ -3117,6 +3118,8 @@ def VectorTranslateOptions(options=None, format=None,
addFields:
whether to add new fields found in source layers (to be used with
accessMode == 'append' or 'upsert')
relaxedFieldNameMatch:
Do field name matching between source and existing target layer in a more relaxed way if the target driver has an implementation for it.
forceNullable:
whether to drop NOT NULL constraints on newly created fields
emptyStrAsNull:
Expand Down Expand Up @@ -3263,6 +3266,8 @@ def VectorTranslateOptions(options=None, format=None,
raise Exception('unhandled accessMode')
if addFields:
new_options += ['-addfields']
if relaxedFieldNameMatch:
new_options += ['-relaxedFieldNameMatch']
if forceNullable:
new_options += ['-forceNullable']
if emptyStrAsNull:
Expand Down

0 comments on commit b98de29

Please sign in to comment.