python: map automation in arcgis pro€¦ · arcpy.mp cim module – time map series demo. complete...

13
Python: Map Automation in ArcGIS Pro Jeff Barrette Jeff Moulds

Upload: others

Post on 07-Aug-2020

57 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Python: Map Automation in ArcGIS Pro€¦ · arcpy.mp cim module – Time Map Series Demo. Complete answers. and select “Submit

Python: Map Automation in ArcGIS ProJeff BarretteJeff Moulds

Page 2: Python: Map Automation in ArcGIS Pro€¦ · arcpy.mp cim module – Time Map Series Demo. Complete answers. and select “Submit

arcpy.(m)a(p)ping samples

http://esriurl.com/8899

Page 3: Python: Map Automation in ArcGIS Pro€¦ · arcpy.mp cim module – Time Map Series Demo. Complete answers. and select “Submit

Migrating to ArcGIS Pro

http://esriurl.com/9785

Page 4: Python: Map Automation in ArcGIS Pro€¦ · arcpy.mp cim module – Time Map Series Demo. Complete answers. and select “Submit

arcpy.mp.MapSeries class layout = aprx.listLayouts()[0]

ms = layout.MapSeries

PDF functionality Create and manage PDFs. E.g.

Insert and delete PDF pages pdf = arcpy.mp.PDFDocumentCreate(path)

pdf.appendPages(TitlePagePdf)pdf.appendPages(MapSeriesPdf)

Reports (new at 2.3) arcpy.mp.Report class aprx = arcpy.mp.ArcGISProject(“CURRENT”)

rpt = aprx.listReports(“Locations Report")[0] Or: aprx.importDocument(ReportTemplatePath) Export Report: rpt.exportToPDF(output_pdf)

Creating Map Books with arcpy.mp - James Bond Demo

Page 5: Python: Map Automation in ArcGIS Pro€¦ · arcpy.mp cim module – Time Map Series Demo. Complete answers. and select “Submit

Creating Map Books with arcpy.mp - James Bond Demo

Utilize dynamic layout elements: Extent Indicators Dynamic Grids Dynamic Legends Dynamic Tables Dynamic Charts Dynamic Text

Dynamic Table Attributes Dynamic Table Statistics Map Series Dynamic Text

E.g. Page 5 of 100 Etc.

Page 6: Python: Map Automation in ArcGIS Pro€¦ · arcpy.mp cim module – Time Map Series Demo. Complete answers. and select “Submit

• Web map printing with arcpy.mp help topic - http://esriurl.com/14382• Related Session:

- Enabling High-Quality Printing in Web Applications (Wednesday @ 1:30, Demo Theater 2: Oasis 1-2)

Advanced web map printing with arcpy.mp

• “What is a web tool” help topic - http://esriurl.com/15259 • Related Sessions:

- Building Geoprocessing Tools with Python: Beyond the Basics (Wednesday @ 1:00pm, Primrose B)- Creating Geoprocessing Services with Python Script Tools (Thursday @ 2:30pm, Demo Theater 2: Oasis 1-2)

Share python scripts as web tools

Additional Resources – using arcpy.mp with Server and Portal

Page 7: Python: Map Automation in ArcGIS Pro€¦ · arcpy.mp cim module – Time Map Series Demo. Complete answers. and select “Submit

• Introduction to arcpy.sharing online help: http://esriurl.com/14394• New at 2.3 is the ability to publish map services to a stand-alone ArcGIS Server.

Publishing web layers with arcpy

Additional Resources – using arcpy.mp with Server and Portal

Page 8: Python: Map Automation in ArcGIS Pro€¦ · arcpy.mp cim module – Time Map Series Demo. Complete answers. and select “Submit

Arcpy.mp CIM access

• arcpy.mp- Courser grained Python module for map automation

• CIM – Cartographic Information Model- Finer grained access to ArcGIS Pro documents

1

1

2

2

3

3

4

4

5

5

6

6

Level 1

Level 2

Page 9: Python: Map Automation in ArcGIS Pro€¦ · arcpy.mp cim module – Time Map Series Demo. Complete answers. and select “Submit

CIM - it is not just “Cartography”

p = arcpy.mp.ArcGISProject('current’)

m = p.listMaps('Map')[0]

lyr = m.listLayers('GreatLakes')[0]

cim_lyr = lyr.getCIM()

for fd in cim_lyr.FeatureTable.FieldDescriptions:

if fd.FieldName == “OBJECTID”:

fd.Visible = False

if fd.FieldName == "Shape_Area":

fd.Alias = “AREA”

lyr.setCIM(cim_lyr)

Page 10: Python: Map Automation in ArcGIS Pro€¦ · arcpy.mp cim module – Time Map Series Demo. Complete answers. and select “Submit

CIM repo

• Getting started with the CIM- Newly publish repo: https://developers.arcgis.com/documentation/

Page 11: Python: Map Automation in ArcGIS Pro€¦ · arcpy.mp cim module – Time Map Series Demo. Complete answers. and select “Submit

arcpy.mp cim module – Time Map Series Demo

Page 12: Python: Map Automation in ArcGIS Pro€¦ · arcpy.mp cim module – Time Map Series Demo. Complete answers. and select “Submit
Page 13: Python: Map Automation in ArcGIS Pro€¦ · arcpy.mp cim module – Time Map Series Demo. Complete answers. and select “Submit

Complete answersand select “Submit”

Scroll down to find the feedback section

Select the session you attended

Download the Esri Events app and find your event

Please Take Our Survey on the App