I have two vector shapefiles: One file is points representing manholes and the other is a polyline file representing pipes leading to and from the manholes. I need to snap the lines within a specified distance to the closest manhole(centroid of point manhole).
How can i do it in qgis using python. I have found the solution in sqlite or postgis but i want to do it in qgis.
SELECT
f.gid as gid,
ST_Snap(f.Geometry, g.Geometry, 2) as geom
FROM
pipe as f,
(SELECT ST_Collect(Geometry) as Geometry
FROM mh) as g