[GRASS-user] Merge parallel roads

Markus Neteler neteler at osgeo.org
Sun Jun 9 01:38:49 PDT 2013


On Sun, Jun 9, 2013 at 10:11 AM, Hendrik Hoeth <hoeth at linta.de> wrote:
> Hi,
>
> I need to merge parallel roads, like highway lanes, into one. I've
> looked around a bit and found solutions for ArcGIS ("Collapse Dual Lines
> To Centerline") and for OSM XML files (Skeletron), but nothing that
> works straight in GRASS. What's the best way of doing this in GRASS?

I have an unsubmitted module "v.centerline" which extracts the
centerline from irregular vector polygon(s). Perhaps this approach
could be used here as well. It works like this (I would be pleased to
make this script available to a user who wants to make it "production
ready" as I don't find the time):

- extract vertices from polygon
- triangulate (v.voronoi)
- restrict to polygon of interest (v.overlay, maybe not needed for you)
- TODO: here add remove-boundaries magic (with convex hull?)
- skeletonize (v.net.spanningtree)
- TODO: extract longest line (no idea)

I think that GRASS 7 should get a generic v.centerline which does the
job for both lines as well as polygons.

Markus


More information about the grass-user mailing list