I am looking for an ArcGIS Pro tool or workflow to create a single straight polyline of the long axis of polygons. I have tried the Polygon to Centerline tool which works, but not for my needs. It creates a curved polyline of the centerline of the polygons, not a single line long axis.
Thanks
I think I understand what you're asking for but could you draw a little picture so I'm sure?
Are all your polygons convex? or concave?
If convex, there should be one long axis, if concave, then segments would be most likely
Would I be off if I thought you were trying to determine the orientation and perhaps length of those yellow areas?
The closest I can think of without testing would be to...
perform a Region Group to provide individual zone ids to the areas
Region Group (Spatial Analyst)—ArcGIS Pro | Documentation
Then determine the spatial geometry
How Zonal Geometry works—ArcGIS Pro | Documentation With the ellipse option which would give the majoraxis length and orientation
also as Zonal Geometry as Table (Spatial Analyst)—ArcGIS Pro | Documentation
of course you will need projected data and you will need to use an appropriate cell size to capture the nature of the zones as best as possible
If you are looking for something like this:
Use the Convex Hull output in the Minimum Bounding Geometry tool with Add geometry characteristics to output checked on. It runs with all license types since at least 3.3. This will add some fields to the output attribute table listing the coordinates of the furthest separated vertexes in the hull. Then run XY To Line on the output identifying fields as follows.
The lines are simply going from coordinate pair to coordinate pair so can fall outside the polygon boundary. There might be other geometry considerations that I am unaware of so check your work:)
I like @BarryNorthey quick method, but more can be asked about your problem. For a start the longest straight line within a polygon is often referred to as the fetch. Do a search on that on this forum/GIS SE and you will discover that your question has been asked many times.
Now do you want your fetch to have a specific property like it must pass through the polygon centroid? I had asked a similar question 15 years ago on GIS SE, the Q/A is here. Have you searched the ESRI Code sharing site, there is an old ArcMap tool that does the job here you should be able to adapt it for ArcPro?