3

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.)

underdark
84.9k22 gold badges237 silver badges418 bronze badges
asked May 15, 2015 at 18:01
2
  • 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) Commented 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. Commented Jun 7, 2015 at 11:09

1 Answer 1

0

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.

answered Jun 7, 2015 at 13:32
5
  • 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? Commented 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) Commented Jun 8, 2015 at 16:08
  • the real issue seems that the data is not intersecting correctly Commented 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...... Commented Jun 8, 2015 at 21:01
  • @mike Please open a bug report with data to reproduce the issue. Downgrading is not a long-term solution Commented Jun 9, 2015 at 17:55

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.