# Setting Data Driven Pages rotation when index has extra page polygons edited into it?

I have created an index to use with data drive pages. I used strip map index and then altered the geometry of the index polygons to better fit my project area. I also added additional index polygons. As a result I copied the geometry of the polygons and created a new index shapefile. In this new shapefile I populated the attribute table with labeling along with before and after label (since some of the maps are sequential for match lines).

I now need to add a field which calculates the data frame rotation for each polygon. Strip Map index does this automatically, but under the circumstances, I need to do this semi manually. How do I populate an attribute field with the data frame rotation angle?

• On a basic level if you only have a few polygons to add rotations for, just populate the numeric rotation attribute field by measuring the polygons' rotation from the axis of your page (in degrees out of 360). Or do you have a lot of polygons to populate? Commented Apr 12, 2016 at 15:11
• I have 46 polygons. That could take a bit and be subject to error. Commented Apr 12, 2016 at 15:34
• I don't believe there is a simple solution. If you had a centerline alignment for each page you could use each of those line segments' end points, the line segments' bounding boxes, and some trigonometry in the Field Calculator to get your rotation angles. The time it would take to develop the model would probably be similar to doing 50 angle measurements - your choice if you plan on ever needing to use the model again. Commented Apr 12, 2016 at 18:05
• I ended up measuring the angles and populating the table. Thanks for the input, I just needed to buckle down and do it. Commented Apr 12, 2016 at 20:22
• Calculate minimum bounding geometry of modified rectangles. There is an option to calculate bearing Commented Apr 12, 2016 at 21:41

As commented by @FelixIP:

Calculate minimum bounding geometry of modified rectangles. There is an option to calculate bearing

The Minimum Bounding Geometry tool which:

Creates a feature class containing polygons which represent a specified minimum bounding geometry enclosing each input feature or each group of input features.

has a RECTANGLE_BY_WIDTH option that can set:

MBG_Orientation—The orientation of the longer side of the resulting rectangle.

I have not tested it, and was unaware of this tool until I read @FelixIP's comment, but it looks like it will do what you describe, and at all license levels of ArcGIS for Desktop.