Automating Processes with ArcPy to do work so I don’t have to Joe Guzi GIS Systems Analyst Stark County GIS Department 2015 Ohio GIS Conference September.

Slides:



Advertisements
Similar presentations
COMPUTER PROGRAMMING Task 1 LEVEL 6 PROGRAMMING: Be able to use a text based language like Python and JavaScript & correctly use procedures and functions.
Advertisements

How to enter the world of Python Programming for ArcGIS Or, a funny thing happened on the way from an ESRI conference By Katherine Paybins WVAGP Membership.
Intro to Python Welcome to the Wonderful world of GIS programing!
Chapter 3: Editing and Debugging SAS Programs. Some useful tips of using Program Editor Add line number: In the Command Box, type num, enter. Save SAS.
Week 6: Chapter 6 Agenda Automation of SQL Server tasks using: SQL Server Agent Scheduling Scripting Technologies.
Why python? Automate processes Batch programming Faster Open source Easy recognition of errors Good for data management What is python? Scripting programming.
Esri UC 2014 | Technical Workshop | Automating Cache Workflows and Tile Usage Heat Maps Eric J. Rodenberg.
Program Flow Charting How to tackle the beginning stage a program design.
XP 1 Working with JavaScript Creating a Programmable Web Page for North Pole Novelties Tutorial 10.
ModelBuilder In ArcGIS 9.x By Tim Weigel GEOG 407/607 April 3 rd, 2006.
Introduction to ESRI Add-Ins
XP Tutorial 1 New Perspectives on JavaScript, Comprehensive1 Introducing JavaScript Hiding Addresses from Spammers.
Geo 118/318 – Introduction to GIS Programming Dr. Jim Graham.
System Implementation
Arc: Programming Options Dr Andy Evans. Programming ArcGIS ArcGIS: Most popular commercial GIS. Out of the box functionality good, but occasionally: You.
ArcGIS Workflow Manager An Introduction
Enterprise ETL & the Home Again
Technical Workshops | Esri International User Conference San Diego, California ArcMap: Tips and Tricks Miriam Schmidts Jorge Ruiz-Valdepena July 23 – 27,
2006 GIS Jam: ArcGIS Python Scripting
Automated Testing Tips Copyright © 2000 Compuware Corporation Mark Nesslar July 15, 2000.
Network Analysis with Python
Introduction to ArcPy. Topics What is ArcPy? Accessing geoprocessing tools using ArcPy Writing scripts using ArcPy.
Introduction to R Clay Ford, StatLab September 11/12, 2013.
Python: An Introduction
Introduction to Programming Peggy Batchelor.
Lesson 6. GCSE Computing – programming languages Candidates should be able to:  describe common tools and facilities available in an integrated development.
Python Map Automation: Introduction to arcpy.mapping / arcpy.mp
Shell Scripting Introduction. Agenda What is Shell Scripting? Why use Shell Scripting? Writing and Running a Shell Script Basic Commands -ECHO - REM.
ArcGIS Network Analyst: Automating Workflows with Geoprocessing
August 29, 2005ICP: Chapter 1: Introduction to Python Programming 1 Introduction to Computer Programming Chapter 1: Introduction to Python Programming.
Working with Metadata in ArcGIS Aleta Vienneau. Working with metadata in ArcGIS View metadata Edit metadata Set your metadata style Leverage metadata.
Introduction of Geoprocessing Topic 7a 4/10/2007.
ArcGIS Pro: A Quick Tour of Python David Wynne.
Python From the book “Think Python”
Advance Map Automation With Python
Python Programming Using Variables and input. Objectives We’re learning to build functions and to use inputs and outputs. Outcomes Build a function Use.
ArcGIS Online Best Practices from the Trenches
City of Richland Public Works GIS ESRI to CAD Script years experience in GIS industry Helped Launch (6) GIS programs  Civil Engineer Squadron /
Chapter 3 The Visual Basic Editor. Important Features of the VBE Alt-F11 will open the Visual Basic Editor. The Code window is to the right, Project Explorer.
Consolidating multiple resources into one application using Esri's JavaScript API. Brian Hall, John Reese, Joe Guzi Stark County GIS Department 2015 Ohio.
Introduction Presenter: James Zollweg, Ph.D. Associate Professor of Water Resources and GIS The College at Brockport NYS GIS Association – Python Training,
Programming for GCSE 1.0 Beginning with Python T eaching L ondon C omputing Margaret Derrington KCL Easter 2014.
Geo 118/318 – Introduction to GIS Programming Dr. Jim Graham.
GCSE Computing: Programming GCSE Programming Remembering Python.
Introduction to Text Based Coding. We’re learning to explore how text based programming works You will display and enter text into a window You will use.
Python Lesson 1 1. Starter Create the following Excel spreadsheet and complete the calculations using formulae: 2 Add A1 and B1 A2 minus B2 A3 times B3.
Esri UC2013. Technical Workshop. Technical Workshop 2013 Esri International User Conference July 8–12, 2013 | San Diego, California Python Map Automation.
Introduction of Geoprocessing Lecture 9 3/24/2008.
Python: Building Geoprocessing Tools David Wynne, Ghislain Prince.
Linux CSE 1222 CSE1222: Lecture 1BThe Ohio State University1.
Development Environment
what is computer programming?
ArcGIS Workflow Manager: Advanced Workflows and Concepts
PYTHON: AN INTRODUCTION
How to enter the world of Python Programming for ArcGIS
Python Mr. Husch.
Today’s lesson – Python next steps
Exploring the Power of EPDM Tasks - Working with and Developing Tasks in EPDM By: Marc Young XLM Solutions
Automating Geodatabase Administration with Python
Python Lesson’S 1 & 2 Mr. Kalmes.
Network Analysis using Python
ModelBuilder – Getting Started
PYTHON: BUILDING GEOPROCESSING TOOLS
PYTHON LESSON 5 Mr. Kalmes.
Building Map Books in ArcGIS
Network Analyst – Automating Workflows with Geoprocessing
ModelBuilder – Getting Started
Introduction to Python
Presentation transcript:

Automating Processes with ArcPy to do work so I don’t have to Joe Guzi GIS Systems Analyst Stark County GIS Department 2015 Ohio GIS Conference September , 2015 | Hyatt Regency Columbus| Columbus, Ohio

Why Automate processes? Not only to do work so I don’t have to But mainly to Free me up to do more work

Why do more work? Because work leads to Taking Over the world!

Automaton Strategies Walk through Process Test Be prepared Task Scheduler and BAT Files Maintenance Excel Sheet To Maintain Schedule Code Examples

Automaton Strategies: Walk through process

Automaton Strategies: Test

Automaton Strategies: Test Again

Automaton Strategies: Task Scheduler and BAT Files

Bat Files ▫Just Text Files saved with a bat extension ▫Written using DOS Commands ▫Syntax

Automaton Strategies: Task Scheduler and BAT Files

Task Scheduler Parameters: ▫Trigger – Declare when the task will run and how frequently ▫Actions – Declare what the Task will do ▫Conditions – Declare computer setting for power or idle ▫Settings – Determine how the task can be treated  Allow the task to run on demand  Stop the task if it takes forever

Excel Sheet to Maintain Schedule

Code Examples

Code Examples: Layer Update Automation

Code Examples: Feature Update Notification

Code Examples: Automation of Tax Map Updates

Code Examples: Cache Error Detection

Python Tips and Tricks Section your code Comment Comment Comment Use Print Command Error Block Notification Create Logs Time Use Resources

Python Tips and Tricks: Section your code Description Import Section Variables Processes Output Error Reporting

Python Tips and Tricks: Comment Comment Comment Comment everything If you change your code comment the change You never know when you will have to come back to your code and commenting will be the best way to remember why you did something Also commenting is good back up in case something happened to the author (God forbid)

Python Tips and Tricks: Comment Comment Comment

Python Tips and Tricks: Use the print Command

Python Tips and Tricks: Error blocks

Python Tips and Tricks: Notification

Python Tips and Tricks: Create logs

Python Tips and Tricks: Time Time Libraries: ▫Time ▫Datetime Time.gmtime datetime.datetime.utcnow() datetime.timedelta(minutes = 15) str(DayAgo)[0:19] "( LAST_EDITED_DATE >= '" + DayAgoFormat + "' )"

Python Tips and Tricks: Use Resources Python Window in ArcGIS desktop ArcGIS Resources Python Section Geoprocessing Tool References GitHub Friends Python Documentation Site

Questions? Joe Guzi