ArcPro Polygon to Centerline Assistance Needed

98
2
01-08-2021 09:34 AM
Labels (2)
JohnMossing
New Contributor II

Problem: I am developing a .pyt to perform automated geoprocessing, using ArcPro 2.7. The Polygon to Centerline tool is part of that pyt workflow and it is failing to output a complete dataset. It completes successfully, but gives a warning: WARNING 000072: Cannot process feature with OID 1.  Reviewing error documentation reveials that OID such and such could not be processed, run repair geometry. It returns only centerlines from smaller disjointed polygons or segments and not the entire polyline for the polygon.

The buffer that is created around the multiple datasets passes the check geometry tool. When I run the repair geometry tool on the buffer featureclass, as the warning error suggests, it finds no errors and repairs nothing.

Here is a small quick snip image sample of the problem. The polygon to centerline output is in red 3pt. The polygon is in black. So it failed to draw the centerline in the polygon from rest of the polyline network.

Problem.PNG

Questions:

Is there a limit to how large or complex the polygon can be for polygon to centerline to work completely? Seems like it is only drawing the centerline on smaller multipart features that are not part of the whole network polygon.

If polygon to centerline cannot handle very large complex polygons does anyone have any other suggestions for a automated way of creating a centerline from a polygon? Or another similar solution?

 

Problem Set Description: I have two similar near like polyline datasets. The polyline datasets that I have are very very large 500k+ features some in the millions. Easiest example to think of is two different road datasets of the same road network. Each dataset has been mapped slightly different from disparate sources. The idea is to merge them into a single dataset using merge. Then generate a 5-20meter buffer around the polylines using the dissolve all option. Dissolve all is important because ultimately i want to use the buffer created around them all to then generate a single centerline polyline (multipart) feature. A successful center polyline then replaces the two disparate datasets.

Thank you,

 

Any advice or assistance would be appreciated.

J

2 Replies
DanPatterson
MVP Honored Contributor

Polygon To Centerline (Topographic Production)—ArcGIS Pro | Documentation

The recommended steps are listed, as you are aware, but dissolve seems to be at the top of the list for sure.  Following that by a check/repair geometry would seem more than appropriate.

There are particular notes in the help topic regarding IDs, geometry inputs (eg circular arcs) that should be addressed prior to running the tool.  It isn't clear whether you have done these prior steps.  Medial axis/skeleton calculations can take a long time and can introduce "issues" during their construction so don't be surprised when you get warnings


... sort of retired...
0 Kudos
JohnMossing
New Contributor II

Dan thank you for the quick response. Quicker than I had expected to be honest. I have read through this https://pro.arcgis.com/en/pro-app/latest/tool-reference/topographic-production/polygon-to-centerline... several times. I do not believe those things about circular arcs are affecting me. I am essentially trying to exactly what is done here: https://support.esri.com/en/technical-article/000022240

Just on much larger datasets.

I have two simple problems so far:

I have a small sample dataset in WGS84, about 10k features or so. That one seems to work fine. However when I project it in say UTM that same dataset fails to render a centerline on the entire buffered polygon.

 

The next problem when I bump up the testing to very large datasets say 300K features, it fails to draw a centerline on the primary polygon feature. It admittedly takes an hour or more to complete on the 300k feature input.

I am attaching my pyt code and my small sample dataset if anyone would like to take a look.

 

Thank you all for your time and assistance.

0 Kudos