When using the 'Polygon To Centerline' tool on a river polygon it creates a centerline with a very nice end and a very weird end (see pictures). Any ideas what the problem could be? I would like to have 2 nice ends. I use ArcGIS Pro 2.2.0 with an advanced license.

nice end of centerline

weird end of centerline

  • Are you using a feature class or a shapefile? If the former the smooth tool will create Bezier curves and these might be causing problems but they will only be approximated in a shapefile. It's easy enough to test; run the centerline tool on the shapefile version. – johns Nov 26 '18 at 12:56

The Help page for this tool gives no indication of how the tool runs, i.e. what algorithm it is using. So unless ESRI make an exception just for you and they tell you how their closed source code functions we will never know why exactly the weird end exist!

That being said reading the help file and examining your screenshots I am going to speculate that behind the scenes a medial axis transformation is being run to pull out the centreline. If you search the internet there are many resources on this subject and a simple observation of their figures/images you see that they all generate these spurs, a product of the algorithm. You may be able to improve your output by densifying the polygon and making sure they don't contain Bézier curves but I don't think you'll ever get away from the spurs as they are a product of the algorithm.

  • Densifying the polygon actually solved the problem. Thanks a lot. – Cyrill Nov 27 '18 at 9:04

I suspect you have some bad geometry in your polygon and that is causing ArcGIS to go a bit haywire. Check your polygon for bad geometry, especially self intersections. Try Repair Geometry. ArcGIS has a number of possible tools for this including Clean and Remove Self-intersections but 'Repair Geometry is a bit of a one-stop shop which also removes null geometry which can also through this tool off. Once you have good geometry try the centerline process again.

  • I tried 'repair geometry' and 'repair self-intersections' but nothing changed. I couldnt find the tool 'clean' for ArcGIS Pro, only for Arcmap, which I dont have. Is there an equivalent for ArcGIS Pro? I'm thinking about just using the 'trim line' tool but thats not a very nice solution. – Cyrill Nov 14 '18 at 10:03

The polygon I use to create the centerline is smoothed. I noticed that this weird end doesn't appear when the polygon is not smoothed. Since I needed it to be smoothed I decided to make the polygon pointy (see image). The result is now less accurate but at least I have something to work with.

River with pointy end.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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