Bug report #11523

Intersecting three layers messed up attribute table if identical field names in all three layers.

Added by Evangelos Rozos about 8 years ago. Updated about 8 years ago.

Category:Attribute table
Affected QGIS version:master Regression?:No
Operating System:Windows Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:19793


The error happens when trying to intersect three layers, say A with B and then AB with C to get ABC. If same field names exist in all three layers the fields in the attribute table of ABC that correspond to C are messed up.

For example, I am trying to intersect the following three layers: Layer-A, Layer-B and Layer-C, of which the attribute tables have the fields displayed below. First, I am performing the intersection Layer-A + Layer-B (Vector -> Geoprocessing Tools -> Intersect) and then the Layer-A_Layer-B + Layer-C. The resulting Layer-A_Layer-B_Layer-C has some fields that came from the Layer-C messed up. I think this is caused because there is a field with the same name in all three layers (AREA). If I remove the field AREA from just Layer-C, then no problem.

Field 1: AREA
Field 2: HRU_CODE
Field 3: RNF_CF

Field 1: INI_LEVEL
Field 2: AREA
Field 3: GROUND_ID
Field 4: INI_LEV

Field 1: SUB_ID
Field 2: AREA
Field 3: NODE_ID

IntersectTest.zip - File with layers A,B and C. (372 KB) Evangelos Rozos, 2014-10-30 02:03 AM

Associated revisions

Revision f0970800
Added by Jürgen Fischer about 8 years ago

ftools: field uniqueness fix (fixes #11523)


#1 Updated by Jürgen Fischer about 8 years ago

  • Priority changed from High to Normal

#2 Updated by Jürgen Fischer about 8 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF