If I use "Join attributes by location" from the menu it works fine but if I'm using it within the Processing modeler it's not working.
I want to sum up previously selected records having a field area (calculated by "Export/add geometry columns").
Surprisingly, the sum fields are created but all records contain NULL.
Did I miss something? Any well known bug which I haven't found with Google? Do these two algorithm works differently?
BTW: If I run "Join attributes by location" from the processing toolbox, the algorithm works fine too.
(I'm using QGIS 2.8.1-Wien.)
-
Same exact problem here. QGIS 2.6 - Join attributes by location runs fine from the GUI menu, but not from the python console or as a stand alone plugin. The fields join, but it does not register as actually intersecting. processing.runalg("qgis:joinattributesbylocation", 'Polygons', 'Points', 'intersects',1,'sum',0,savelayer)mike– mike2015年06月05日 22:20:55 +00:00Commented Jun 5, 2015 at 22:20
-
Hi Mike. I haven't found any useful solution BUT I guess it has to do with the CRS. Since I've reprojected the data (to the project CRS) before using "Join attributes by Location" it was working. However, this might be a workaround. BTW I'm using QGIS 2.8.1-Wien.Thomas– Thomas2015年06月07日 11:09:13 +00:00Commented Jun 7, 2015 at 11:09
1 Answer 1
Seems to work fine here using QGIS 2.8.2 and Processing 2.9.3.
Both in a model and directly from the toolbox, join by location computes the same sums. The layers have to be in the same CRS, otherwise Processing displays a warning and the intersections will be empty.
The project CRS does not seem to influence the results which is the correct behavior.
-
Interesting thing is that using this via a custom plugin/console used to work just fine. The for some reason it stopped. Seems the qgis:joinbylocation became qgis:joinattributesbylocation at some point? I tried with the same CRS at that didn't work, using 2.6 or 2.8.1. Is there a way to tell which processing version one is using?mike– mike2015年06月08日 15:47:14 +00:00Commented Jun 8, 2015 at 15:47
-
just upgraded to 2.8.2 and processing to 2.9.3 - still no success. the fields join but NULL/blanks for the SUM. both join layers have the same CRS 4326. <br><br> is this syntax correct? <br><br> processing.runalg("qgis:joinattributesbylocation", 'Polygons', 'Points', 'intersects',1,'SUM',1,savelayer)mike– mike2015年06月08日 16:08:29 +00:00Commented Jun 8, 2015 at 16:08
-
the real issue seems that the data is not intersecting correctlymike– mike2015年06月08日 16:27:35 +00:00Commented Jun 8, 2015 at 16:27
-
downgraded the processing plugin back to 2.2 - everything works again - works in 2.6 and 2.8.2 - hopefully there's not too many unintended consequences......mike– mike2015年06月08日 21:01:01 +00:00Commented Jun 8, 2015 at 21:01
-
@mike Please open a bug report with data to reproduce the issue. Downgrading is not a long-term solutionunderdark– underdark2015年06月09日 17:55:11 +00:00Commented Jun 9, 2015 at 17:55