[Qgis-user] Nearest point on line

Falk Huettmann fhuettmann at alaska.edu
Tue Oct 22 09:35:26 PDT 2019


Hi there, Christoph,

generally speaking: I have another perspective about it and would approach
your problem it in a different way:

Instead of pre-defined cut-offs (which are circular reasoning and are often
surprising when checked in real world and GIS)
I would simply run a 'proximity to' points vs line first. And then in the
resulting proximity table set a cut-off, select accordingly and see whether
this achieves the outcome wanted.

For pre-defined cut-offs, we call it usually 'geographic racism'.
Instead, we try to celebrate the gradient theory; when tested it often
works better in real life.
Worth a test.

Just an alternative thought to the problem at hand.

Thanks, best
     Falk Huettmann











On Tue, Oct 22, 2019 at 3:26 AM Christoph Jung <jagodki.cj at gmail.com> wrote:

> Thank you all for your answers. I played a bit with the nnjoins plugin,
> but Andrews‘ answer is exactly what I was looking for :)
>
> Sincerely,
> Christoph
>
> > Am 18.10.2019 um 20:50 schrieb Andrew McAninch <andrew at rabbit-troop.net
> >:
> >
> > You can do this in the field calculator with the refFunctions plugin.
>  It gives you a function, geomnearest(), which will return the WKT geometry
> of the nearest line(or geomdistance() if you want to limit your search
> radius).  Then use the closest_point() function to find the nearest point
> on that line.  something like:
> >
> > closest_point(geom_from_wkt(geomdistance('lines','$geometry',10)) ,
> $geometry)
> >
> >
> > Andrew
> >
> >
> >
> > ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
> >> On Thursday, October 17, 2019 11:51 PM, Christoph Jung <
> jagodki.cj at gmail.com> wrote:
> >>
> >> Hello list,
> >>
> >> Does QGIS has a function to calculate the nearest point on a line layer
> by a given point layer? In PostGIS i could query it with
> min(st_distance(...)) or st_closestpoint(...). But I miss such a function
> directly in QGIS (I just found the plugin Cloest Point, but it has some
> issues...).
> >>
> >> Sincerely,
> >> Christoph
> >>
> >> 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
> >
> >
> _______________________________________________
> 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/20191022/678960a9/attachment.html>


More information about the Qgis-user mailing list