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

  • 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 Jun 5 '15 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 Zuberbühler Jun 7 '15 at 11:09
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.

  • 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 Jun 8 '15 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 Jun 8 '15 at 16:08
  • the real issue seems that the data is not intersecting correctly – mike Jun 8 '15 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 Jun 8 '15 at 21:01
  • @mike Please open a bug report with data to reproduce the issue. Downgrading is not a long-term solution – underdark Jun 9 '15 at 17:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.