You’ve built your index layer and it might look something like this.
If you’ve rotated these features manually and want to used them to control page rotation in data driven pages, you’ll need a field containing the page rotation value.
This layer already has an angle field that I’m going to use to demonstrate how to calculate an angle that will play nice with data driven pages.
Search for the Calculate Polygon Main Angle (Cartography) Tool. Drop in the index feature in the input features spot, assign the angle field and choose the rotation method, choose geographic – this is how the data frame is rotated. Here’s a quick illustration of the different rotation methods.
A -45 degree geographic rotation points north 45 degrees toward the east, or rotates north 45 degrees clockwise.
In the illustration below you can see that a -45 degree (or 315 degree) geographic rotation, the blue line on the left when rotated north, points true north 45 degrees clockwise.
When I run the tool, I get negative fractional angles. I don’t want either. I want positive integers. As a rule of thumb your index layer, if controlling data frame rotation through data driven pages, should contain positive integers. When map symbology and labeling gets intricate and detailed, negative fractional rotation values will do very strange things to your map exports.
So, at this point I have these angles.
To convert these to acceptable values, I’ll first calculate the Angle field with the following python expression
Here’s the Field Calculator.
So now I’ve got integers.
Select the negative values, in Select by Attributes select values less than 0.
Now calculate the negative values with this expression (python).
Now your set with an angle that will play nice with data driven pages and complicated symbology and labeling.