[Qgis-user] Nearest point on line
Christoph Jung
jagodki.cj at gmail.com
Tue Oct 22 04:26:41 PDT 2019
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
>
>
More information about the Qgis-user
mailing list