I have two sets of data that I'm using. Points extracted from a .csv file and a road network from an ESRI .shp file (both of which I've included here: https://send.firefox.com/download/6f08f9e4938fb389/#Kl20O__Px_D9NP6KcqLu5Q | Password: qgis123). I need to snap each point to its nearest road segment and get the result as a separate point layer.

I am using QGIS 3.8.1 Zanzibar and for the above task I've decided to use the SAGA GIS Snap Points to Lines tool available in the QGIS processing toolbox.

However, after running the algorithm, as an output I get the same point layer that I started off with without any snapping as the result. I'm not exactly sure what I'm doing wrong here and would be grateful for any help or insight into this matter.

In addition to this, If anyone could advise me as to where I might find the source file for the SAGA Snap Points to Lines tool it would be very helpful.

  • 1
    You need to reproject your points (Colombo_Samples) to the matching CRS with the lines (edges), ie EPSG:32644. – Kazuhito Jul 25 '19 at 14:06
  • 1
    If the SAGA tool still doesn't work after following @Kazuhito's advice, try the similar native QGIS tool Snap geometries to layer. In my experience, sometimes the SAGA tools just don't work as expected. – csk Jul 25 '19 at 15:17
  • Thank you so much @Kazuhito. I did exactly as you said and was able to get the desired output. – Nandula Jul 26 '19 at 3:14
  • And thank you @csk for your suggestion. Very helpful. – Nandula Jul 26 '19 at 3:14
  • That's great! And it is probably faster using the native QGIS tool suggested by @csk. Please give it a try. – Kazuhito Jul 27 '19 at 23:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.