Using Python to Automate Map Series Creation · ArcPy sandbox • Start with Esri code samples. ......

Post on 07-Jul-2020

9 views 0 download

Transcript of Using Python to Automate Map Series Creation · ArcPy sandbox • Start with Esri code samples. ......

Using Python to Automate Map Series Creation

at EEC Environmental

8/10/2015 1

EEC Environmental

• Environmental consulting• Wastewater, storm water• Regulatory compliance• Soil and groundwaterAssessmentRemediationLitigation support

• I.T. consulting

8/10/2015 2

EEC Environmental

• Offices:Orange, CAOakland, CAAnnapolis, MDTampa, FL

• Booth: 1610

8/10/2015 3

The Problem

8/10/2015 4

“Can we add a figure here?”

Prior Art

• ArcGIS Data-Driven Pages

• AutoCAD Sheet Sets

• Templating (Django, Jinja)

• Software Build Systems

8/10/2015 5

The Solution

8/10/2015 6

Really. We just used them both.

8/10/2015 7

THE PROCESS

8/10/2015 8

8/10/2015 9

Create first map in ArcMap per usual

8/10/2015 10

Replace map-specific parameters with {{ template_tags }}

8/10/2015 11

Example Definition Query

("Status" Is Null OR "Status" <> 'Excavated') AND "Sampler" = 'EEC' AND "Type" <> 'Soil Boring (EEC) - New' AND "Analyte" = '{{Analyte}}' AND "Depth_Start" >= {{Start_Depth}} AND "Depth_Start" < {{End_Depth}} AND "Result" >= {{Action_Level}} AND "Units" ='{{Units_Lab}}' AND "OperableUnit_Name" = '1'

8/10/2015 12

Example Title Block

8/10/2015 13

Define everything different about each map in Excel (.csv)One row per figure

8/10/2015 14

Run a simple geoprocessing tool

8/10/2015 15

Wait…

(Usually < 1 minute per figure)

8/10/2015 16

Figures are output in .mxd and .pdf!

DEMO

Live demos are the best!

8/10/2015 17

Future

• Additional places {{ tags }} can go

• Integration with data-driven pages

• Parallel processing?

• Integration with ArcGIS Server?

8/10/2015 18

So What?

8/10/2015 19

• ArcPy is cool!

• Think beyond the ArcPy sandbox

• Start with Esri code samples

EEC Environmental

Booth 1610(714) 667-2300www.eecenvironmental.com

• Steve Shaffersshaffer@eecenvironmental.com

8/10/2015 20