Amélioration mineure

This commit is contained in:
Djedouas 2021-03-04 11:57:47 +01:00
parent 0dd87feab5
commit 61dfb28087

View File

@ -288,13 +288,15 @@ class Orientation:
else: else:
deleted_fields.append(field_name) deleted_fields.append(field_name)
# On réexplose les champs sans doublons # S'il y a des doublons
layer = processing.run("native:explodehstorefield", if len(deleted_fields) > 0:
parameters={"INPUT": layers[osm_name], # On réexplose les champs sans doublons
"FIELD": "other_tags", layer = processing.run("native:explodehstorefield",
"OUTPUT": "memory:", parameters={"INPUT": layers[osm_name],
"EXPECTED_FIELDS": ",".join(expected_fields)}, "FIELD": "other_tags",
context=context)["OUTPUT"] "OUTPUT": "memory:",
"EXPECTED_FIELDS": ",".join(expected_fields)},
context=context)["OUTPUT"]
# On enregistre le layer dans le gpkg # On enregistre le layer dans le gpkg
options.layerName = layer_name options.layerName = layer_name