[Qgis-user] Join attributes by location (summary) with condition
chris hermansen
clhermansen at gmail.com
Wed Jul 9 06:28:53 PDT 2025
Roland and liat
On Wed, Jul 9, 2025, 01:33 Roland Spielhofer via QGIS-User <
qgis-user at lists.osgeo.org> wrote:
> Hi,
> I am trying to get mean values from points lying inside polygons - that
> would be easy with "join attributes by location (summary)".
>
> But: I have overlapping polygons - coming from road segments (motorways
> with separate lines per direction). The points and the polygons have a
> common attribute ("+" or "-" per direction) .
>
> I want to summarize the points of one direction that are lying inside the
> polygon of the same direction.
>
> Is there a way to achieve this?
>
Are you able to use SQL?
This is a straightforward query in (for example) PostGIS, which offers
spatial comparison operations such as "within"
https://postgis.net/docs/ST_Within.html
So if you select polygons and join the points using ST_within you can (for
example) use GROUP BY and (for example) AVERAGE to get the average value of
some attribute for all points within each polygon.
Is this the kind of thing you are looking for?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20250709/ae9c8bdf/attachment.htm>
More information about the QGIS-User
mailing list