Sunday 3 June 2018

qgis - How can I merge/collapse nearby and parallel road lines (eg. a dual-carriageway) into one single line?


I have a shapefile from OSM which contains all the roads within a city. Larger roads (like dual-carriageways) seem to have 2 parallel lines. I'd like to collapse / combine those into 1 line so I can export and render them nicely in an external 3D application (2 overlapping roads will be complicated and will look weird in 3D).


How can I achieve this with either QGIS or PostGIS? I am not worried about a slight loss of accuracy (within a few metres) and would like the resulting, single line to be between (ideally the centre of) the current, parallel lines.


Thank you.


(here is an example of the dual road lines that I want to combine)


enter image description here




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...