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

Simon Dietmann simon.dietmann at pgnu.de
Mon Jan 31 00:06:58 PST 2022


Hello Krishna,
 
the reason für all the ‘1’ values is obviously that the algorithm seeking for the nearest points always finds the original point itself. When I first used the expression that I had suggested as a solution for your problem, this didn´t happen and the original point wasn´t taken into accont, but when I later tried it with another point layer, I got the same result as you with ‘1’ for every point feature.
 
When I tried to set up a filter expression by retrieving a list of closest neighbours and then skip the first element (the original point), I realized that the algorithm does not return the neighbour points in the order of their distance. This seems to be a bug, and it means that you can´t solve this task in that way.
 
So I suggest you create a second layer, for example the buffer polygon Harrissou s. suggested.
 
Regards,
 
Simon
 
 
Von: krishna Ayyala <ayyalakrishna at gmail.com> 
Gesendet: Samstag, 29. Januar 2022 18:36
An: Simon Dietmann <simon.dietmann at pgnu.de>
Cc: qgis-user <qgis-user at lists.osgeo.org>
Betreff: Re: [Qgis-user] Drop the points and show only clusters
 
Dear Simon,
Thanks for your reply. 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. My map units are set to meters.
 
Regards.
 
 
On Fri, Jan 28, 2022 at 1:53 AM Simon Dietmann <simon.dietmann at pgnu.de> wrote:
Hi Krishna,
 
you could also use the field calculator to create a Boolean field with the overlay_nearest function, like:
 
overlay_nearest( '<name_of_same_point_layer>' ,  max_distance:= 1000)
 
This will generate a field that contains a ‘1’ if the point has a neighbour within the given distance and a ‘0’ if not. Then show only points that have a ‘1’ in this field.
 
Greetings,
 
Simon
 
Von: Qgis-user <qgis-user-bounces at lists.osgeo.org> Im Auftrag von krishna Ayyala
Gesendet: Freitag, 28. Januar 2022 05:12
An: qgis-user <qgis-user at lists.osgeo.org>
Betreff: Re: [Qgis-user] Drop the points and show only clusters
 
Helo
I watched the video in the weblink below. I was able to get up to the layer styling step. But,I am unable to figure out how to accomplish this task. I am herewith attaching the sample data of 1000 points.  Can anyone  please guide me the steps so that  I will have  only those points that are within 1000ft of each other and drop the rest of the points?
 
Regards.
 
https://anitagraser.com/2017/06/13/even-more-aggregations-qgis-point-cluster-renderer/


On 28/01/22 09:25, krishna Ayyala wrote:
> Hello,
> I have a point shape with about 10,000 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. All I am trying to see is only the clusters. 
> Can anyone help please?
>
> Regards.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20220131/ff8970cb/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 20745 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20220131/ff8970cb/attachment-0001.png>


More information about the Qgis-user mailing list