Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Join Attributes by Location doesn't process integer attributes #23015

Closed
qgib opened this issue Jun 18, 2016 · 15 comments
Closed

Join Attributes by Location doesn't process integer attributes #23015

qgib opened this issue Jun 18, 2016 · 15 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Processing Relating to QGIS Processing framework or individual Processing algorithms
Milestone

Comments

@qgib
Copy link
Contributor

qgib commented Jun 18, 2016

Author Name: Andrzej Popowski (Andrzej Popowski)
Original Redmine Issue: 15072
Affected QGIS version: 2.14.3
Redmine category:processing/qgis


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 issue(s): #23062 (duplicates)
Redmine related issue(s): 15121


@qgib
Copy link
Contributor Author

qgib commented Jun 21, 2016

Author Name: Alexander Bruy (@alexbruy)


Note that fTools was removed and now you should use Processing. Works fine in master with Processing.

@qgib
Copy link
Contributor Author

qgib commented Jun 21, 2016

Author Name: Alexander Bruy (@alexbruy)


Also works with 2.14.3 using Processing.

@qgib
Copy link
Contributor Author

qgib commented Jun 21, 2016

Author Name: Alexander Bruy (@alexbruy)


  • status_id was changed from Open to Feedback

@qgib
Copy link
Contributor Author

qgib commented Jun 22, 2016

Author Name: Andrzej Popowski (Andrzej Popowski)


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?

@qgib
Copy link
Contributor Author

qgib commented Jun 23, 2016

Author Name: Alexander Bruy (@alexbruy)


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.

@qgib
Copy link
Contributor Author

qgib commented Jun 24, 2016

Author Name: Andrzej Popowski (Andrzej Popowski)


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?

@qgib
Copy link
Contributor Author

qgib commented Jun 24, 2016

Author Name: Alexander Bruy (@alexbruy)


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.


  • 10086 was configured as spatial-join.png

@qgib
Copy link
Contributor Author

qgib commented Jun 24, 2016

Author Name: Andrzej Popowski (Andrzej Popowski)


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 #23062, 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.

@qgib
Copy link
Contributor Author

qgib commented Jun 24, 2016

Author Name: Andrzej Popowski (Andrzej Popowski)


These are result, that I get in Windows, processing in both versions.


  • 10087 was configured as jabl-v213.png
  • 10088 was configured as jabl-v215.png

@qgib
Copy link
Contributor Author

qgib commented Jun 24, 2016

Author Name: Alexander Bruy (@alexbruy)


Fixed in changeset "a5392fb51d0743458ba84c5a3841cae5b6a67718".


  • status_id was changed from Feedback to Closed

@qgib
Copy link
Contributor Author

qgib commented Jun 24, 2016

Author Name: Andrzej Popowski (Andrzej Popowski)


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.

@qgib
Copy link
Contributor Author

qgib commented Dec 30, 2016

Author Name: Andrzej Popowski (Andrzej Popowski)


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.


  • status_id was changed from Closed to Reopened
  • fixed_version_id was configured as Version 2.14

@qgib
Copy link
Contributor Author

qgib commented Jan 2, 2017

Author Name: Giovanni Manghi (@gioman)


  • category_id was changed from 44 to Processing/QGIS

@qgib
Copy link
Contributor Author

qgib commented Jan 23, 2017

Author Name: Andrzej Popowski (Andrzej Popowski)


Problem still exist in QGIS LTR 2.14.11-1.


  • 10681 was configured as doSpatialJoin.patch

@qgib
Copy link
Contributor Author

qgib commented Feb 7, 2017

Author Name: Alexander Bruy (@alexbruy)


Issue fixed in Processing and fix backported to all relevant branches. fTools is deprecated, use Processing instead.


  • status_id was changed from Reopened to Closed
  • resolution was changed from to fixed/implemented

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Processing Relating to QGIS Processing framework or individual Processing algorithms labels May 25, 2019
@qgib qgib added this to the Version 2.14 milestone May 25, 2019
@qgib qgib closed this as completed May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Processing Relating to QGIS Processing framework or individual Processing algorithms
Projects
None yet
Development

No branches or pull requests

1 participant