Saturday, 18 January 2020

arcgis desktop - Convert linear polygons to lines


I have some long linear polygons that I'd rather store as lines but I'm not sure how best to do this. Ideally I'd have a line going through the centre of the polygon lengthways. I have two ideas of how to do this but I'm not sure how to implement them or to what extent they're possible. Perhaps there's already a tool out there that does this?


option one: 1. convert polygon to points at vertices 2. identify the two points furthest apart in each feature. I can do this in point distance but I'm not sure how to automate it 3. mask the area outside the polygon 4. run a cost path between the two points


option two: 1. convert polygon to points at vertices 2. Create theissen polygons around the points 3.(somehow) save the line along the middle between the theissen polygons?



Does anyone know how I can make either of these methods work or if there is an easier method. My Python is weak so I was going to try it in model builder but if I needs Python I can give it a go



Answer



Download the ET Geowizards toolbox (Free) and use the createCenterlines tool. I think that should do the trick.


enter image description here


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...