[Qgis-user] HELP highlights points
Charles Dixon-Paver
charles at kartoza.com
Thu Dec 24 06:31:43 PST 2020
I was very interested to see if this was possible with qgis expressions and
symbology, and I got it to work with surprisingly little effort, albeit
with some issues [1].
I simply used the rule based symbology to highlight the relevant features
using an expression [2].
The expression I used was as follows:
if(
distance($geometry,
geometry(
get_feature('Lines','fid','1')
)
) < 500
,true,false)
One caveat is that the view does not automatically update when digitizing a
new vertice. As a result I needed to zoom in and out constantly to update
the symbol styles. This could probably be modified by using a layer action
though.
Secondly, this expression is limited to a single feature in it's
current state. I'm not sure if anyone has a clever workaround for including
all geometries from another layer in an expression.
Lastly, this only tracks actual features, not the cursor.
There could be many other ways to achieve your result though, but I was
interested to see how well this would function so others might find the
result quite interesting. It's probably also quite usable for static styles
if the objective is just for mapmaking rather than a digitizing tool.
[1] https://imgur.com/a/5J0dSt3
[2] https://imgur.com/a/E043vO7
On Thu, 24 Dec 2020 at 15:31, Raffaele Ceretto <cerettoraffaele at gmail.com>
wrote:
> I need a tool that allows me to draw a line and that at the same time
> highlights points within a certain distance (for example 40 meters).
> I have a map with hundreds of points, I would like when I draw a line what
> is nearby will light up.
> There is a specific tool to do this or a simple "magnet" function?
> Thank you for your help
>
> waiting for a reply
>
> regards
>
> Raffaele
> _______________________________________________
> 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/20201224/3fbe7c5e/attachment.html>
More information about the Qgis-user
mailing list