MXD, Maps, Layers arcpy.mapping Classes.

Slides:



Advertisements
Similar presentations
Symbology Tricks Standardizing your basedata so you can focus on your maps main purpose.
Advertisements

Creating Map Books ArcMap 10 Data Driven Pages
Providing Info & Maps to Non-GIS Users & Tips, Tricks in ArcGIS with Gary Moody.
ETT 229 Fall 2004 Web Design Basics II. Agenda 11:00-11:05 – Quiz 14 11:05-11:50 – Web Design Lecture 11:50-12:15 – Web Design Practice 2.
Unit Thirteen: Advanced Layout In this unit… ► Review ► Layers and Layout ► Advanced Layout Features.
@2007 Austin Troy Lecture 4: An Introduction to the Vector Data Model and Map Layout Techniques Introduction to GIS By Brian Voigt University of Vermont.
Internet Publishing / Dreamweaver Luke E. Reese CARRS
Start -> All Programs -> Classes -> Web Expressions -> Dreamweaver.
@2007 Austin Troy Lecture 4: An Introduction to the Vector Data Model and Map Layout Techniques Introduction to GIS By Brian Voigt University of Vermont.
School of Geography FACULTY OF ENVIRONMENT Using ArcMap 1.
Layouts: Creating maps and figures using ArcMap 1 GIS for Planetary Mappers June 2012, Planetary Mappers Meeting.
Introduction To ArcMap ArcMa p. ArcMap is a Map-centric GUI tool used to perform map-based tasks Mapping –Create maps by working geographically and interactively.
Introduction to ArcGIS Add-Ins Exercises GIS/LIS Conference, 2014 Rochester, MN.
Esri UC2013. Technical Workshop. Technical Workshop 2013 Esri International User Conference July 8–12, 2013 | San Diego, California Editing in ArcMap:
Microsoft Expression Web - Illustrated Unit B: Creating a Web Site.
Web Design Dreamweaver Semester 2 ATBs. ATB #1 What is a web site?
Website Design CLA – Transportation. Defining a Site Select: Site – New - Site Click Next.
1/36. 2/36 Something cool …
Mapping The Michigan Geographic Framework Tony Olkowski & Jim Shively Center for Geographic Information Michigan Department of Information Technology.
Python Map Automation: Introduction to arcpy.mapping / arcpy.mp
Tutorial: Using ArcGIS Server and ESRI ArcGIS API for Javascript Peter Sforza March 7, 2013.
Enabling High-Quality Printing in Web Applications
ArcGIS Pro: Mapping and Visualization Craig Williams, Edie Punt, &
ATN GIS Support ArcGIS: ArcMap Layout View.
Advance Map Automation With Python
Data Visualization Francisco Olivera, Ph.D., P.E. Srikanth Koka Department of Civil Engineering Texas A&M University.
Introduction to ArcGIS for Environmental Scientists Module 1 – Data Visualization Chapter 4 - Layouts.
Introduction to ArcGIS for Environmental Scientists Module 1 – Data Visualization Chapter 3 – Symbology and Labeling.
Esri UC 2014 | Demo Theater | Troubleshooting Printing and Exporting from ArcMap Michael Grossman.
Distributed Multimedia Programming Week - 1. Document Window  The Document Window is divided in to six main components Timeline – The Timeline is where.
Chapter 5 Quick Links Slide 2 Performance Objectives Understanding Framesets and Frames Creating Framesets and Frames Selecting Framesets and Frames Using.
Esri UC 2014 | Technical Workshop | Python Map Automation – Beyond the Basics of arcpy.mapping Jeff Barrette Jeff Moulds.
IT: Web Technologies: Web Animation 1 Copyright © Texas Education Agency, All rights reserved. 1 Web Technologies Designing Web Site Layout Using.
Return to Outline Copyright © 2011 by Maribeth H. Price 3-1 Labeling and annotation.
Esri UC2013. Technical Workshop. Technical Workshop 2013 Esri International User Conference July 8–12, 2013 | San Diego, California Building Map Books.
PLACING AND LINKING GRAPHICS
ArcGIS: ArcCatalog. Agenda The ArcCatalog Interface General ArcCatalog ▫Navigating directories ▫Preview data ▫View metadata Advanced ArcCatalog ▫Modifying.
Map Books & Dynamic Tables
Geographic Information Systems Using ESRI ArcGIS 9.3 Layout View.
Desktop Mapping: Building Map Books Jeff Barrette Michael Grossman.
Esri UC 2014 | Demo Theater | Ten ArcMap Tips and Tricks Michael Grossman.
Esri UC2013. Technical Workshop. Technical Workshop 2013 Esri International User Conference July 8–12, 2013 | San Diego, California Python Map Automation.
Esri UC 2014 | Technical Workshop | Python Map Automation – Introduction to arcpy.mapping Michael Grossman Jeff Barrette.
Esri UC 2014 | Technical Workshop | Editing in ArcMap: An Introduction Lisa Stanners, Phil Sanchez.
Brief Comparison of ArcView 3.x and ArcView 8.x Paige Baldassaro Geospatial Applications Designer Geospatial Extension Program Sunday, March 20, 2016
UPLOADING DOCUMENTS IN MURA. Two Options 1.Upload as a “page” in your navigation (preferred)  Easier to find, delete and maintain  Can upload revisions.
Jeff Barrette Jeff Moulds
Lecture 3 Interacting with Data.
ArcGIS Pro Mapping and Visualization
The View Figure Module The View Figure and Figure modules are for FactSage like Notepad and Word for Windows. Use the View Figure module for simple graphical.
Desktop Mapping: Building Map Books
Inserting and Working with Images
Key Terms Label Annotation.
On each booth you will find 4 to 6 banners
Introduction to ArcGIS Add-Ins
Introduction to ArcGIS
Python Map Automation – Introduction to arcpy.mapping
Electronic Field Study Advanced User Training
Dreamweaver Basics.
Introduction To ArcMap
Python Map Automation – Beyond the Basics of arcpy.mapping
Using the QGIS Layout Manager to create
Building Map Books in ArcGIS
3.00 Understanding the Adobe Dreamweaver interface. (12%)
Python Map Automation – Beyond the Basics of arcpy.mapping
Building Map Books in ArcGIS
Virginia Lenvik Geography 375 Spring 2013
Designing Web Site Layout Using Fireworks
Geog 375 Individual Final Programming Project: Automated Thematic Maps
Desktop Mapping: Building Map Books
Presentation transcript:

MXD, Maps, Layers arcpy.mapping Classes

Without opening ArcMap, wouldn’t it be nice to Get or update MapDocument (MXD) properties e.g. title, keywords, relative path, author, etc DataFrame properties e.g. name, coordinate system, etc. Layer properties e.g. name, visibility, data source, symbology, etc. Layout element properties e.g. size, position, Add, remove, move, and update layers Save MXD or LYR to earlier version for distribution Build PDF map books e.g. Export to PDF or insert into existing PDF

arcpy.mapping module

Arcpy.mapping Classes & Functions

MapDocument Properties

MapDocument – Class / Function … NOTE: Disable background processing when using “CURRENT”

MapDocument Properties & Methods activeDataFrame (ro) activeView (rw) author (rw) credits (rw) dataDrivenPages (ro) dateExported (ro) datePrinted (ro) dateSaved (ro) description (rw) filePath (ro) hyperlinkBase (rw) relativePaths (rw) summary (rw) tags (rw) title (rw) Methods deleteThumbnail() findAndReplaceWorkspacePaths( find_workspace_path, replace_workspace_path, {validate}) makeThumbnail () replaceWorkspaces( old_workspace_path, old_workspace_type, new_workspace_path, new_workspace_type, {validate}) save () saveACopy( file_name, {version}) (ro) = read-only (rw) = read-write

MapDocument.ActiveView

DataFrame Properties

DataFrame Properties & Methods credits (rw) description (rw) displayUnits (rw) elementHeight (rw) elementPositionX (rw) elementPositionY (rw) elementWidth (rw) extent (rw) geographicTransformations (rw) mapUnits (ro) name (rw) referenceScale (rw) rotation (rw) scale (rw) spatialReference (rw) time (ro) type (ro) Methods panToExtent(extent) zoomToSelectedFeatures()

Find DataFrames in MapDocument

Layer Properties

Find Layers in a DataFrame i.e. All layers in all DataFrame’s

Layer Class / Function Layer Class Layer Function

Layer Properties & Methods brightness (rw) contrast (rw) credits (rw) datasetName (rw) dataSource (rw) definitionQuery (rw) description (rw) isFeatureLayer (ro) isGroupLayer (ro) isRasterizingLayer (ro) isRasterLayer (ro) labelClasses (rw) longName (ro) name (rw) serviceProperties (ro) showLabels (rw) transparency (rw) visible (rw) workspacePath (ro) Methods findAndReplaceWorkspacePath( find_workspace_path, replace_workspace_path, {validate}) getExtent( {symbolized_extent}) getSelectedExtent( {symbolized_extent}) replaceDataSource( workspace_path, workspace_type, dataset_name, {validate}) save () saveACopy( file_name, {version}) supports( layer_property) Layer = .lyr file Layer in DataFrame Selected properties

Finding a specific layer in a DataFrame

Working with Layers arcpy.mapping can’t arcpy.mapping can Create new map layers in DataFrame or .lyr files from scratch Change all layer properties in a script arcpy.mapping can Add lyr file to DataFrame & change selected layer properties dataSource, definitionQuery, etc. (see “(rw)” on previous slide) Apply symbology from existing lyr files to existing layers in DataFrame

Adding a Layer to a DataFrame

Managing Layers in a DataFrame Function Description AddLayer Add a layer to a data frame within a map document (.mxd) using simple placement options. AddLayerToGroup Add a layer to a group layer within a map document (.mxd) using simple placement options. InsertLayer Insert a layer at a specific location within a data frame or within a group layer in a map document (.mxd). MoveLayer Move a layer to a specific location within a data frame or group layer in a map document (.mxd). RemoveLayer Remove a single layer or group layer from a specific data frame. If there is more than one layer that meets the criteria, then only the first layer will be removed unless the script iterates through each layer in a returned list. UpdateLayer Update all layer properties or just the symbology for a layer in a map document (.mxd) by extracting the information from a source layer.

Fixing broken data sources

Methods for fixing broken data sources MapDocument.findAndReplaceWorkspacePaths(find_workspace_path, replace_workspace_path, {validate}) MapDocument.replaceWorkspaces(old_workspace_path, old_workspace_type, new_workspace_path, new_workspace_type, {validate}) Layer.findAndReplaceWorkspacePath(find_workspace_path, replace_workspace_path, {validate}) Layer.replaceDataSource(workspace_path, workspace_type, dataset_name, {validate}) TableView.findAndReplaceWorkspacePath(find_workspace_path, replace_workspace_path, {validate}) TableView.replaceDataSource(workspace_path, workspace_type, dataset_name, {validate})

Fixing broken data source examples Update all workspace paths to new folder and save to new mxd. Update all workspace paths for all the mxd’s in a folder from local system to UNC paths

Page Layout elements

Getting Page Layout Elements

MapSurround Element

Text Element

RefreshActiveView() and RefreshTOC() After changing the content of a DataFrame or Page Layout … arcpy.RefreshActiveView() After changing items in the Table of Contents (add, remove, move, update layers) … arcpy.RefreshTOC()

Exporting maps to images (jpg)

Exporting maps to PDF

PDFDocument’s

Creating/Opening PDF Documents

PDFDocument.appendPages Example

Working with arcpy.mapping scripts Python Window has nice help … but pain for defining/calling functions, debugging, etc. Edit in PyScripter and use Load …

Help is not perfect Should be: Find the MAPSURROUND_ELEMENT with the name "ScaleBar" and move it's x position (relative to its anchor point) to the center of the parentDataFrame.  Save this change to the MXD. Update: ESRI listened to me:

MapDocument, DataFrame, Layer MapDocument.ActiveView = “PAGE_LAYOUT” 1:* DataFrame DATAFRAME_ELEMENT MAPSURROUND_ELEMENT * Layer GRAPHIC_ELEMENT PICTURE_ELEMENT GRAPHIC_ELEMENT LEGEND_ELEMENT