[Qgis-user] Drop the points and show only clusters

Harrissou s. delazj at gmail.com
Sun Jan 30 09:59:17 PST 2022


Hello,

I assume in your expression, you are using the same 'Points' layer as input and target, meaning that feature Id=1 in the layer you are filtering is overlaid with itself in the target layer (hence always 1). The solution would be to add a filter expression that ignores the overlaying feature for each but that function does not do that by default. You may want to see discussion at https://github.com/qgis/QGIS/issues/42071; there's a suggestion of code at the end you can try to adapt.

Another process could be to:
- Create a buffer of 1000m for the points
- Do the overlay_nearest call between the points and the polygon, with an expression returning count of overlapping polygons for each point
- Extract features that have more than 1 buffer overlapping (or the inverse)

Hope that helps,
Harrissou

Le 30 janvier 2022 17:45:05 GMT+01:00, krishna Ayyala <ayyalakrishna at gmail.com> a écrit :
>Hello,
>
>I am re-posting this question. I have a point shape with about 1000 points.
>On the map, I wish to show only those points that are within 1000ft of each
>other and drop the rest of the points.
>
> I have used the "overlay_nearest" formula for my points layer.
>Irrespective of whatever number I assign for "max_distance" I am getting
>the value 1 for the new field for all the 1000 records of the points layer.
>i.e. I am not getting 0 value for any of the records. I tried for various
>distances starting from 1 upto 1000. For ex:1,5,10,100,500,1000 etc. I am
>getting the value only 1 for all the records of the new field. My map units
>are set to meters.
>
>I have used the below formula and changed the max_distance to different
>values as mentioned above. I am herewith attaching the points shapefile
>again.
>
>overlay_nearest('Points',max_distance:=1000)
>
>
>
>Regards.
>
>
>[image: image.png]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20220130/31f9116b/attachment.html>


More information about the Qgis-user mailing list