Select to view content in your preferred language

Data Driven Pages Thematic Map Book

5002
23
08-19-2014 12:46 PM
Status: Implemented
Labels (1)
MichaelGrieco
New Contributor II

 

Request:  Have Data Driven Pages actually produce a thematic map book.

 As discussed in the Esri Desktop help:

From the Ersi ArcGIS Help 10.2, 10.2.1, and 10.2.2

Thematic map book

A thematic map book is similar to a reference series, except that the detail pages show unique thematic maps of a single location.


The ability to display different unique themes (layers) covering a single location  would be invaluable to display the results of a multi phase analysis.  I have many clients that are tired of making a separate mxd for each theme.

 

 

Following is the clever solution supplied by Esri Support for my initial specific request:

 

 

import arcpy, os

 

mxd = arcpy.mapping.MapDocument(r"C; file location ")

mxdDDP = mxd.dataDrivenPages

 

for i in arcpy.mapping.ListLayers(mxd):

    if i in ["geology_geochem","glaciation","Precipitation Regime","geology_sed"]:

        i.visible = False

        arcpy.RefreshActiveView()

 

for i in range(mxdDDP.pageCount + 1):

    mxdDDP.currentPageID = i

    name = mxdDDP.pageRow.getValue(mxdDDP.pageNameField.name)

    print name

    if name == 'GEO':

        for i in arcpy.mapping.ListLayers(mxd):

            if i.name == "geology_geochem":

                i.visible = True

                arcpy.RefreshActiveView()

                mxdDDP.exportToPDF(r"C:\temp\GEO.pdf", "CURRENT")

                i.visible = False

                arcpy.RefreshActiveView()

    if name == 'GEO_sed':

        for i in arcpy.mapping.ListLayers(mxd):

            if i.name == "geology_sed":

                i.visible = True

                arcpy.RefreshActiveView()

                mxdDDP.exportToPDF(r"C:\temp\GEO_sed.pdf", "CURRENT")

                i.visible = False

                arcpy.RefreshActiveView()

    if name == 'GLA':

        for i in arcpy.mapping.ListLayers(mxd):

            if i.name == "glaciation":

                i.visible = True

                arcpy.RefreshActiveView()

                mxdDDP.exportToPDF(r"C:\temp\GLA.pdf", "CURRENT")

                i.visible = False

                arcpy.RefreshActiveView()

    if name == 'PRE':

        for i in arcpy.mapping.ListLayers(mxd):

            if i.name == "Precipitation Regime":

                i.visible = True

                arcpy.RefreshActiveView()

                mxdDDP.exportToPDF(r"C:\temp\PRE.pdf", "CURRENT")

                i.visible = False

                arcpy.RefreshActiveView()

 

 

 

This solution is just a go-by as my actual need is to display 40 different themes over the same extent.

 

23 Comments
FourCornersMapping

I would like to see the ability to dynamically control the visibility of layers and graphics in the Contents pane based on a map series. For instance, say I have a map series with two pages: one with a layer showing antelope habitat and the title graphic "Antelope Habitat"; and one with a layer showing oil and gas well locations and the title graphic "Oil and Gas Wells". After defining a map series, I want to have the habitat layer and Antelope Habitat title toggle on when I am on the antelope map, and off when I move to the oil and gas wells map. Conversely, I'd like to have the well locations layer and Oil and Gas Wells title toggle off when on the antelope map, and on when I am on the oil and gas wells map. I do not want to add a "Page Number" or "Page Name" attribute column to every layer, as is required to dynamically display a layer currently using Page Query. A bonus would be if this functionality could be applied to groups of layers and groups of graphics.

AubriKinghorn
Status changed to: In Product Plan
 
AubriKinghorn
Status changed to: Implemented

Thematic map series is available as a new map series type in ArcGIS Pro 3.2. Please see the What's New documentation for more information and other new features in Pro 3.2.