How to create vector roads center lines from raster?

1688
7
Jump to solution
09-02-2017 07:42 AM
SLobodanKomatina
New Contributor

Hello. I need to know how to create roads vector center lines from raster. I have used raster classification tool to classify raster and after that reclassify tool to filter the roads from other values. After that I have used "Raster to polyline" tool and checked the Simplify box, but the results are not really good (see attachment). Does anyone know better way to solve my problem?

Thanks in advance

0 Kudos
1 Solution

Accepted Solutions
DanPatterson_Retired
MVP Esteemed Contributor

Try Thin in the spatial analyst, before converting to polyline.  It isn't going to be perfect.  Even converting to multipoint won't help much since that would have to be followed by a spanning tree, which still isn't guaranteed to connect all the segments.

View solution in original post

7 Replies
XanderBakker
Esri Esteemed Contributor

Can you show a picture of the original raster? The screenshot of the lines look like the outlines of the pixels, but this may be related to your input raster (multiple values for instance).

0 Kudos
DanPatterson_Retired
MVP Esteemed Contributor

Try Thin in the spatial analyst, before converting to polyline.  It isn't going to be perfect.  Even converting to multipoint won't help much since that would have to be followed by a spanning tree, which still isn't guaranteed to connect all the segments.

SLobodanKomatina
New Contributor

Thanks a lot! Great!

0 Kudos
SLobodanKomatina
New Contributor

I also want to connect lines which belongs to roads, because when I have made the raster classification some roads are cuted because of different pixel color that intersect it. How I can connect the roads now?

0 Kudos
XanderBakker
Esri Esteemed Contributor

Can you share a screenshot of what you have after applying the tool suggested by Dan?

0 Kudos
SLobodanKomatina
New Contributor

I got this when I have used Thin:

Now when I use Raster to polyline tool the results are great. Now I just need to connect divided lines.

0 Kudos
curtvprice
MVP Esteemed Contributor

If what you're getting from a simple Thin run is not doing the trick, you may want to look into the part of ArcGIS dedicated to this task: ArcScan. This used to be an separate add-on extension but now the extension it's part of the core software license. ArcScan includes interactive tools that are set up to trace the raster data and jump the gaps for you!