rotate split polylines python arcpy

2215
10
Jump to solution
02-24-2020 12:36 PM
AdebayoIshola
New Contributor II

I have converted polygon edges into polylines which I have also split at vertices. I am trying to rotate the polygon edges (segments) at angles which I have stored in a field in an attribute table.

The angles I have are for the polygon vertices. How do I proceed with rotating the segments -- preferably by scripting?

For instance, in the above image with a polygon, I need to move those 2 line segments until the angle between them are at right-angle and repeat same for all vertex/corners of the polygon. 

EDIT: Providing additional context

0 Kudos
10 Replies
AdebayoIshola
New Contributor II

Hi Dan,

Thank you for your previous help and the tips you have provided but I need further help. Below is what I have:

  • A function that returns the maximum length of each of the rectangular polygons as a list. To be used as a reference edge/segment.
  • A function that returns the minimum length of each of the rectangular polygons as a list. To be used to construct length of a perpendicular edge.
  • A function that gets the coordinates of the endpoints of a polyline.

 

What would be an ideal approach to calculate the perpendicular offset points? Would I need to export/copy the longest edge of the polygon to a new FeatureClass before proceeding?

Any leads on a possible workflow would be very helpful.

0 Kudos