I have a network graph that I need to simplify in the sense of reducing the number of edges. The idea would be to merge nodes that are located close together and remove the connecting short edges.
How could this be achieved in PostGIS or GRASS? Or are there any better approaches to automatically simplify a network like this?
I've already tried ST_SnapToGrid function but I'm not happy with the results (grey = original, black = snapped):
Answer
The closest I've come so far is this:
v.clean input=roads output=snap5rmline tool=snap,rmline thresh=5
It's snapping the roads with a tolerance of 5 meters and removing all zero-length lines. It's not an optimal solution since it seems to snap rather randomly to some vertex.
No comments:
Post a Comment