1

I'm trying a model which did work with QGIS 3.12 but don't in QGIS 3.16. In this model, two vector layers are merged by the algorithm native:mergevectorlayers. In the new version if a field of similar type but with a smaller size is given as first element, an error message appears:

Feature could not be written to Merged_062872d0_f531_40e7_8e55_cd911e6e91f4: Could not store attribute "NATURE": String of length 25 exceeds maximum field length (20)

I can't control which element is given in first during the merge processing. I just know that two vector layers have same fields. I can't select specific fields as is done in this answer Merge Vector Layers fails in QGIS. Has anyone had the same issue?

1 Answer 1

2

You need to match the lenghts of your fields. To achieve that, go to Processing -> Refactor Fields

Select you layer with the too short field as input, map it to your "longer" layer and run it. The resulting layer should be mergeable with your original "long" layer.

1
  • 1
    It works fine. Thanks.
    – Dim-Jones
    Jan 19 at 12:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.