Map Series: Page Rotation Based on Polygon Shape

1804
3
02-22-2021 01:55 PM
JessicaJThompson
Occasional Contributor II

Hello,

Thank you in advance for your kind assistance!

I am new to making map series. It may be out there, but I have yet to encounter a way to change a layout from landscape to portrait based on shape of the polygon (what I am currently working with) of the layer selected in the Layer Index. I know there is a rotation setting in Optional Fields, but I do not believe that will accomplish what I need (nor have I gotten it to do anything - feel free to point me to an answer on that).

Is the only solution to make 2 maps series? One as Landscape and one as Portrait? 

 

 

0 Kudos
3 Replies
jcarlson
MVP Esteemed Contributor

I don't think that a single Map Series will do this, but with some clever scripting using arcpy.mp, you could probably make a "map series" of your own.

We have a report we generate here that has a series of locators. We needed the locators to adjust not to the series features, but to the intersected features of several other layers, and none of the built-in options would get it quite right. While we don't touch the rotation attribute, it's easy to imagine adding it to the process.

Of course, if your layout has map surrounds like a title, scalebar, etc, that could get messed up with changing the page orientation on the fly.

I would look into making two separate layouts, and possibly using a script to generate the appropriate layout based on the subject feature geometry.

- Josh Carlson
Kendall County GIS
JessicaJThompson
Occasional Contributor II

Thank you Josh,

My scripting skills are definitely lacking (probably understating the reality of it). I should take some time to learn & practice in the near future. I'm always wanting to do custom/not yet out-of-the-box functions in any of the ESRI platforms, which seems to have scripting involved in the solution. 

Thank you for the advice!

0 Kudos
TomBole
Esri Regular Contributor

Hi Jessica, 

Your instincts are correct. You will need to create 2 separate layouts, one portrait and one landscape, each with it's own map series. You'll probably need to add a field to the index to indicate which layout the particular index feature should be used for and set a definition query based on this field for each layout.

As Josh states above you may want to use ArcPy.mp.  Here are some links to help you get started.

Help topics:

https://pro.arcgis.com/en/pro-app/arcpy/mapping/introduction-to-arcpy-mp.htm

https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/mapseries-class.htm

https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/layout-class.htm

Samples:

List of samples - https://esriurl.com/8899

Specific Map Series sample - http://www.arcgis.com/home/item.html?id=eba53351ceb84b58b505dec5272e526c

The second script should shine light on how to "stitch" your portrait and landscape pages into a single PDF. 

Hopefully, these resources should help you get started.

Tom