Tuesday 27 December 2016

How to simplify streets such that seperate driving tracks are reduced?


Streets in Openstreetmap have more detail than I need. For instance I do not need seperate street tracks for each driving direction, instead I just want to show the general path of the street. Example:


OSM linestrings for a street



OSM linestrings for a street


Simplified


Simpified linestring(s) (here it is just one, but in case of sidearms would be > 1)


input:  collection of linestrings
output: collection of linestrings
simplified lines = f(osm lines)
f = ?

the output is a collection as well, since sidearms should remain available.


How do I programatically simplify such linestring collections?



Would like to use JTS, NTS, GEOS but not PostGIS if possible.



Answer



Hard to imagine how you can reach what you want automatically. Perhaps by deleting one of the oneway tagged streets if there exist two of them with the same name and close enough?


Often used workflow starts from unioned linestrings followed by buffering and skeletonizing. This PhD thesis is good reading http://paduaresearch.cab.unipd.it/4077/1/Tesi-Savino-2011.pdf I also tried the workflow with OpenJUMP 1.7.0 and the Skeletonizer plugin http://kent.dl.sourceforge.net/project/jump-pilot/OpenJUMP_plugins/More%20Plugins/JUMP%20Skeletonizer%20Plugin/skeletonizer-1.0.zip The plugin works but the result is one long street, not a reduced number of short ones. I found it necessary to read the manual before using the plugin. It is inside the zip in the doc folder.


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...