9

Is it possible to utilise the Data Driven Pages (DDP) tool in ArcMap or ArcPy to create a set of maps with the same extent but showing different layers?

To clarify I regularly make large sets of maps for projects all in the same location often with the same baselayers but modified to focus on different aspects for the relevant section of a report such as monitoring locations, land-use, key features etc. which all require separate .mxds to be created and maintained.

A DDP type system would allow me to utilise the dynamic text and ensure a standard template / output throughout, it would also make life a lot easier when updating a general figure number or comment as a report is written in one .mxd rather than multiple for a client.

I'm using ArcMap 10.1, but having read through the ArcGIS DDP online help I assume this would have to be done with ArcPy as I've been unable to figure out how to do it within ArcMap. I'm aware that QGIS has the Atlas Plugin, although I'm not as familiar with its capabilities but would happily use it as an alternative.

PolyGeo
65.5k29 gold badges115 silver badges349 bronze badges
asked Apr 23, 2013 at 13:11
1
  • 1
    I think what you are looking for is scripting your map document changes in Python by using the arcpy.mapping toolset. See the reference to building complete map books, and more specifically within the document, "Simple reference series map book". Commented Apr 23, 2013 at 15:52

2 Answers 2

5

A code free method

When you turn on data driven pages you can specify a definition query that is dependant on the page number. Simply use that query to hide all features from layers that you do not want to show.

  1. Setup your map frames to be in the same location, but with a field for page number. Setup Data driven pages with the page number as the name field.
  2. If you want a layer to be turned on for a particular page, add a "page" attribute to its table, and set to the relevant page number.
  3. Add a Page Definition Query to the particular layer with your newly created field.

When the page is selected the desired layers will become visible based on the page definition query.

answered Apr 23, 2013 at 18:59
1
  • 2
    I think that page definition queries work well in some cases, but the issue is that you have to add the relevant page number to each attribute in the data table and you can't show the same feature on multiple pages as you can only reference one page at a time Commented Apr 23, 2013 at 21:31
4

Here's my thinking in pseudocode: you'd get your MapDocument, then ListDataFrames, then ListLayers. Then you should be able to iterate through the Layers, toggle the Layer's Visibility property on, ExportToPDF (or whatever), then toggle Visibility off again, and move on to the next Layer. If you want to leave certain layers on as base layers, maybe you could group the ones you want to change for each map and only toggle visibility for those by testing for IsGroupLayer=True? Maybe someone else has an actual code example...

answered Apr 23, 2013 at 13:50
1
  • I never did find a built in Arc solution to this, but a colleague has now developed a python script for the process that follows the basic structure you suggest. The script uses groups to create a new page in the pdf and can be combined with DDP to create a mapbook with a set of maps for multiple sites. Commented Mar 19, 2014 at 11:47

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.