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

Post on 07-Aug-2020

57 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Python: Map Automation in ArcGIS ProJeff BarretteJeff Moulds

arcpy.(m)a(p)ping samples

http://esriurl.com/8899

Migrating to ArcGIS Pro

http://esriurl.com/9785

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

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.

• 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

• 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

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

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)

CIM repo

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

arcpy.mp cim module – Time Map Series Demo

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

top related