Bug report #15072
Join Attributes by Location doesn't process integer attributes
|Affected QGIS version:||2.14.3||Regression?:||No|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||fixed/implemented|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||23015|
When executing "Join Attributes by Location" with option "Take summary of intersecting features", output shapefile doesn't include any summary of an integer attribute.
Test example from Alaska dataset: join target layer "alaska" with "airports". Missing are summaries of integer attributes "ID" and "fk_region", present is summary of float attribute "ELEV".
Function "Join Attributes by Location" works correctly in version 2.12.3, doesn't work in all versions 2.14 and current LTR 2.8.9. All tested versions are x64 releases on Windows 10.
#7 Updated by Alexander Bruy over 4 years ago
- File spatial-join.png added
Andrzej Popowski wrote:
I see you have rejected ticket for processing as a duplicate. I'm confused.
It was exactly the same as this one.
I don't know how to install fTools in master, while I can confirm that problem exist in master and processing procedure. Do you need more information?
You can't install fTools, it was a core plugin and now it removed from QGIS.
I can't reproduce your issue with master and 2.14.3. Joining using alaska.shp as "target layer" and airports.shp as "join" layer with "intersects" predicate I get correct result, see attached screenshot.
Please check that you use Processing shipped with QGIS, not from your ~/.qgis2/python/plugins directory. If you have Processing installed in ~/.qgis2/python/plugins — remove it.
#8 Updated by Andrzej Popowski over 4 years ago
I guess problem is the same in both tickets, only this one deals with outdated feature. Maybe better reject this one and continue in processing?
Are you testing Linux version? See comment at #15121, probably only Windows version is affected.
I'm not sure, which processing is executed. If I remove qgis-dev\\python\\plugins\\processing then no processing is available in QGIS 2.15, so I think the executed plugin is there.
#11 Updated by Andrzej Popowski over 4 years ago
I confirm, that your patch corrects the problem. Thanks for your work!
Similar patch for doSpatialJoin.py form fTools in 2.14 works too.
A note: isn't it a more general problem?
I mean test for "QVariant.Int" can lead to many similar problems. For example look at processing "Convex hull". If you use option "Create convex hull based on field", then QGIS 2.13 creates new layer with numeric attribute "value" while master creates string attribute, which could be unexpected.
#12 Updated by Andrzej Popowski almost 4 years ago
- Status changed from Closed to Reopened
- Target version set to Version 2.14
While problem is corrected in "processing" algorithms, it still exist in fwTools in LTR version 2.14.10. File doSpatialJoin.py should be corrected at line 153, probably doMeanCoords.py at line 77 and maybe more.