Re: [Qgis-user] Slooooow spatial joins
Worked like a charm! and FAST! Thanks all! Don't understand what the overhead is with QGIS and why it is so much slower though but on to other challenges I guess. -- Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Slooooow spatial joins
Hi! How about just execute some SQL in an algorithm or model since you have the data in Postgis? And do the spatial join directly in the database. Like (not tested): UPDATE polygonlayer p SET p.field = pt.field FROM pointlayer pt WHERE st_within(pt.geom,p.geom); Karl-Magnus Jönsson Från: Qgis-user För Ryan Peel Skickat: den 18 maj 2021 12:24 Till: Nyall Dawson Kopia: qgis-user Ämne: Re: [Qgis-user] Slow spatial joins I can appreciate that but it forces to create another layer/file I think. I really don't want to have to re-import my entire table back into postgis just to get this one column. On Mon, May 17, 2021, 10:29 PM Nyall Dawson mailto:nyall.daw...@gmail.com>> wrote: On Tue, 18 May 2021 at 11:59, Ryan Peel mailto:ryanp...@gmail.com>> wrote: > > I have tried using MMQGIS plugin, refFunctions geomwith function and the > aggregate function. I am using 3.18 QGIS > > Despite having spatial indexes on both tables, when I try to use any of these > operations to assign the value of a field in the polygon layer to one in the > point layer, it goes very slow. Like, ridiculously slow and of no value. > And, I only have 600 records in the points layer and just a few thousand > records in the polygon layer. > > What can I do to speed this up? The absolute fastest way to join is to use the Processing tool: Join Attributes by Location -- no plugins necessary :D Nyall ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Slooooow spatial joins
I can appreciate that but it forces to create another layer/file I think. I really don't want to have to re-import my entire table back into postgis just to get this one column. On Mon, May 17, 2021, 10:29 PM Nyall Dawson wrote: > On Tue, 18 May 2021 at 11:59, Ryan Peel wrote: > > > > I have tried using MMQGIS plugin, refFunctions geomwith function and the > aggregate function. I am using 3.18 QGIS > > > > Despite having spatial indexes on both tables, when I try to use any of > these operations to assign the value of a field in the polygon layer to one > in the point layer, it goes very slow. Like, ridiculously slow and of no > value. And, I only have 600 records in the points layer and just a few > thousand records in the polygon layer. > > > > What can I do to speed this up? > > The absolute fastest way to join is to use the Processing tool: Join > Attributes by Location -- no plugins necessary :D > > Nyall > ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Slooooow spatial joins
On Tue, 18 May 2021 at 11:59, Ryan Peel wrote: > > I have tried using MMQGIS plugin, refFunctions geomwith function and the > aggregate function. I am using 3.18 QGIS > > Despite having spatial indexes on both tables, when I try to use any of these > operations to assign the value of a field in the polygon layer to one in the > point layer, it goes very slow. Like, ridiculously slow and of no value. > And, I only have 600 records in the points layer and just a few thousand > records in the polygon layer. > > What can I do to speed this up? The absolute fastest way to join is to use the Processing tool: Join Attributes by Location -- no plugins necessary :D Nyall ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
[Qgis-user] Slooooow spatial joins
I have tried using MMQGIS plugin, refFunctions geomwith function and the aggregate function. I am using 3.18 QGIS Despite having spatial indexes on both tables, when I try to use any of these operations to assign the value of a field in the polygon layer to one in the point layer, it goes very slow. Like, ridiculously slow and of no value. And, I only have 600 records in the points layer and just a few thousand records in the polygon layer. What can I do to speed this up? -- Sincerely, Ryan ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user