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

krishna Ayyala ayyalakrishna at gmail.com
Mon Feb 14 06:50:40 PST 2022


Sorry for the delay in reply Andrea. Yes, it did work. Thank you for your
help.

Regards.

On Mon, Jan 31, 2022 at 3:55 AM Andrea Giudiceandrea <andreaerdna at libero.it>
wrote:

> Simon Dietmann
> <https://www.mail-archive.com/search?l=qgis-user@lists.osgeo.org&q=from:%22Simon+Dietmann%22>
>  Mon, 31 Jan 2022 00:07:19 -0800
> <https://www.mail-archive.com/search?l=qgis-user@lists.osgeo.org&q=date:20220131>
>
> 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.
>
>
> Hi Simon,
> as I've written in a previous message, I think a bug occurs when the
> overlay_nearest function is used with a Shapefile layer, while the bug
> doesn't occur with a Memory or GeoPackage or Spatialite layer.
>
> Could you please try this:
>
> - create a new scratch (Memory) point layer
> - add a single point to the memory layer
> - use the expression overlay_nearest(@layer,$geometry) in the field
> calculator for such layer: the preview will show [] (i.e. no nearest
> geometry returned)
>
> - export the memory layer with a single point to a Shapefile layer
> - import the Shapefile layer with a single point
> - use the expression overlay_nearest(@layer,$geometry) in the field
> calculator for such layer: the preview will show [ <geometry: Point> ]
> (i.e. the expression incorrectly returns the very some point as the nearest
> point)
>
> - export the memory layer with a single point to a GeoPackage or a
> Spatialite layer
> - import the GeoPackage or a Spatialite layer with a single point
> - use the expression overlay_nearest(@layer,$geometry) in the field
> calculator for such layer: the preview will show [] (i.e. no nearest
> geometry returned)
>
> Best regards.
>
> Andrea Giudiceandrea
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20220214/05d4d63f/attachment.html>


More information about the Qgis-user mailing list