So, Darren's script was originally setup for rectangles, but it looks like your version will work with polygons of any number or vertices. Is that correct?
Secondly, I am not an advanced user and have generally always stayed within the confines of the cookie cutter tools in Arcmap. I don't know how to implement a script in Arcmap. Can anyone refer me to a good thread or link on how to do this so I can actually use this thing?
Thanks All - what a great community this is.
Cheers!
John
Just letting you know there is a typo in your script on Line 15, this causes it to fail instantly.
Also, I kept getting an error on Line 22, float division by zero (tan = - dy/dx). I didn't have time to look into it so I used the script posted by Darren in the end. It may be specific to my input, I'm not sure.
Thanks Hayley Hume-Merry pointed out the typo. also John Urbano I just saw your message today. the script only works for 4 point rectangle. However, FYI since then I have been using Minimum Bounding Geometry (by width) tool to work out the rotation angle of polygon of any shape. Just make sure you enabled the Add geometry characteristics as attributes to output option at the bottom of the tool. The output features include a field called MBG_Orientation, which is the orientation of the longer side of the resulting rectangle. I could then derive the rotation angel depends on if the data drive page layout is portrait or landscape.
Still having this issue in July of 2023. Does anyone else have a better solution? The only work around I came up with is after you rotate the strip index polygons, then draw a line snapping to mid point of each polygon, then rerun the strip index tool with 0 overlap, and if necessary do a spatial join with the newly created polygons and field calculate the angle field if you want to update your original strip index polygons.