<div dir="auto">Roland and liat<br><br><div class="gmail_quote gmail_quote_container" dir="auto"><div dir="ltr" class="gmail_attr">On Wed, Jul 9, 2025, 01:33 Roland Spielhofer via QGIS-User <<a href="mailto:qgis-user@lists.osgeo.org">qgis-user@lists.osgeo.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="font-family:'verdana';font-size:12px;color:#000"><span style="background-color:#ffffff">Hi,</span></div>
<div style="font-family:'verdana';font-size:12px;color:#000"><span style="background-color:#ffffff">I am trying to get mean values from points lying inside polygons - that would be easy with "join attributes by location (summary)".</span></div>
<div style="font-family:'verdana';font-size:12px;color:#000"><span style="background-color:#ffffff"> </span></div>
<div style="font-family:'verdana';font-size:12px;color:#000"><span style="background-color:#ffffff">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) .</span></div>
<div style="font-family:'verdana';font-size:12px;color:#000"><span style="background-color:#ffffff"> </span></div>
<div style="font-family:'verdana';font-size:12px;color:#000"><span style="background-color:#ffffff">I want to summarize the points of one direction that are lying inside the polygon of the same direction.</span></div>
<div style="font-family:'verdana';font-size:12px;color:#000"> </div>
<div style="font-family:'verdana';font-size:12px;color:#000"><span style="background-color:#ffffff">Is there a way to achieve this?</span></div></blockquote></div><div dir="auto"><br></div><div dir="auto">Are you able to use SQL?</div><div dir="auto"><br></div><div dir="auto">This is a straightforward query in (for example) PostGIS, which offers spatial comparison operations such as "within"</div><div dir="auto"><br></div><div dir="auto"><a href="https://postgis.net/docs/ST_Within.html">https://postgis.net/docs/ST_Within.html</a></div><div dir="auto"><br></div><div dir="auto">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.</div><div dir="auto"><br></div><div dir="auto">Is this the kind of thing you are looking for?</div><div class="gmail_quote gmail_quote_container" dir="auto"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote></div></div>