I have river data, which consists of lines (narrow sections of streams) and polygons (wider sections of streams). I would like to have all data in line form.

enter image description here

First, I tried Collapse Dual Lines to Centerline tool. For that I converted river polygons to lines and deleted parts from both ends to form dual lines.

enter image description here

Outcomes were varied a little, depending on settings, but results were not really satisfying.

enter image description here

enter image description here

For second option, I tried Vectorization to Centerline in ArcScan toolbar. For that, I turned polygons to rasters.

enter image description here

This time results were somewhat better.

enter image description here

Next, I would like to connect newly formed lines to existing line network. Data includes 3842 polygons, so manual editing is not practical.

How can I handle this and more unusually shaped sections?

  • If you have the Advanced license of ArcGIS, you can use the Polygon to Line tool. Also, I haven't done it for a while, but I think you can simply paste polygons into a polyline feature class and they will get converted to lines. This may help with your disconnected lines.
    – Fezter
    Aug 20, 2020 at 22:41

2 Answers 2


You were on a right path with collapsing lines. Almost, because it won't handle complex polygons. So, merge streams and polygon outlines into single feature class and dissolve (no multipart) to get unique segments between stream inlets:

enter image description here

Convert polygons into fine resolution raster of 1s and expand it by 1 cell (EXPAND). Select dissolved features that share segment with polygons and run euclidean allocation on them (OID) using EXPAND as mask:

enter image description here

Convert EA into polygons, clip them by original polygons and apply Polygon to Line tool (with default settings). Picture below shows resulting polylines in red where

"LEFT_FID" <> -1

enter image description here

You can snap red lines to ends of blue lines (snap distance of one cell size), however expect completely wrong flow direction, i.e. edges heading upstream. If you are not Ok with this, let me know I'll update solution which will use cost paths and hydrology tools.


There are multiple options to make it easier for ArcGIS:

  • Try greater cell size on a single skinniest polygon
  • Use cost allocation - expanded buffer is your cost surface. By some reason CA performs better than EA
  • Split area of interest into 4 rectangles, making sure their outline do not cross polygons
  • Iterate through each polygon separately. Easy to do in script or even model but looks like overkill.

In any case limit environment extent to buffer of polygons and using extended raster as mask.

  • I'm eager to use this this solution as it would solve problems with both centerlines connectivity. I was able to follow the process until euclidean allocation when I only get messages: ExecuteError: ERROR 999999: Error executing function. Failed to write a pixel block. [Possibly out of disk space] Failed to execute (EucDistance). My settings look like this imgur.com/kxaEI7c
    – Nivaoj
    Sep 1, 2020 at 15:44
  • I afraid this might happen. First try: set parallel processing factor equal number of processors on PC in arc catalog. Restart pc and do ea in catalog. Let me know if won't work, I update post with other options.
    – FelixIP
    Sep 1, 2020 at 19:34
  • Unfortunately I still get the same error message. I would be interested about these other options.
    – Nivaoj
    Sep 6, 2020 at 14:45
  • See updates. Do you have enough disk space?
    – FelixIP
    Sep 6, 2020 at 22:01
  • I'm quite confident that I should have enough disk space for EA as well, but cost allocation work beautifully with my data! These other options might prove useful as well in case I meet problems with capacity later on. I'm really happy about this method as it produces centerline which is continuous, exact, process is easy to automate and doesn't require manual editing.
    – Nivaoj
    Sep 14, 2020 at 10:28

If you are happy with the results of using the ArcScan approach then you could use the SNAP tool to extend the lines to the end vertex of the adjacent stream line.

You would still need to ensure that the centre line is flowing in the correct direction.

You don't discuss the more complex scenarios where polygons are tributary junctions or representing islands. You may find this paper of interest to see how the UK mapping agency appoached it.

  • I did find the paper interesting and it explained why the tools I previously used didn't worked out in a way I was hoping for. Snap tool would be useful but I’m having problems with it. I have points, to which I would like to snap centerlines. When I try to use it as a Snap Environment, I get message: ERROR 00800 The value is not member of END | VERTEX | EDGE. Which type of fields and values should point file include for tool to work?
    – Nivaoj
    Sep 1, 2020 at 16:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.