Bug report #15072
Join Attributes by Location doesn't process integer attributes
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | - | ||
Category: | Processing/QGIS | ||
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 |
Description
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.
Related issues
Associated revisions
[processing] add support for longlong fields in spatial join alg (fix #15072)
[processing] add support for longlong fields in spatial join alg (fix #15072)
(cherry picked from commit 87fea73647a2319aaa3c110cb26967f7f217d7f4)
History
#1
Updated by Alexander Bruy about 8 years ago
Note that fTools was removed and now you should use Processing. Works fine in master with Processing.
#2
Updated by Alexander Bruy about 8 years ago
Also works with 2.14.3 using Processing.
#3
Updated by Alexander Bruy about 8 years ago
- Status changed from Open to Feedback
#4
Updated by Andrzej Popowski about 8 years ago
Processing doesn't work correctly either in 2.14.3, when I use csv map as target layer. The same processing procedure works in 2.13.3. I guess it should be other ticket?
#5
Updated by Alexander Bruy about 8 years ago
Andrzej Popowski wrote:
I guess it should be other ticket?
Yes.
Please tests also with master, and if you will create another ticket please provide sample dataset and steps to reproduce issue.
#6
Updated by Andrzej Popowski about 8 years ago
I see you have rejected ticket for processing as a duplicate. I'm confused.
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?
#7
Updated by Alexander Bruy about 8 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 about 8 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.
#9
Updated by Andrzej Popowski about 8 years ago
- File jabl-v213.png added
- File jabl-v215.png added
These are result, that I get in Windows, processing in both versions.
#10
Updated by Alexander Bruy about 8 years ago
- Status changed from Feedback to Closed
Fixed in changeset a5392fb51d0743458ba84c5a3841cae5b6a67718.
#11
Updated by Andrzej Popowski about 8 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 over 7 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.
#13
Updated by Giovanni Manghi over 7 years ago
- Category changed from 44 to Processing/QGIS
#14
Updated by Andrzej Popowski over 7 years ago
- File doSpatialJoin.patch
added
Problem still exist in QGIS LTR 2.14.11-1.
#15
Updated by Alexander Bruy over 7 years ago
- Status changed from Reopened to Closed
- Resolution set to fixed/implemented
Issue fixed in Processing and fix backported to all relevant branches. fTools is deprecated, use Processing instead.