Overview Cursors arcpy.da module Geometrys Arrays SpatialReferences

Slides:



Advertisements
Similar presentations
* Simple Editing * Feature Creation Tools * Labels & Annotation
Advertisements

JTX Overview Overview of Job Tracking for ArcGIS (JTX)
NSF DUE ; Module 4.3. NSF DUE ; GeoTEd Partners Module name and number.
Why python? Automate processes Batch programming Faster Open source Easy recognition of errors Good for data management What is python? Scripting programming.
ESRM 250 & CFR 520: Introduction to GIS © Phil Hurvitz, KEEP THIS TEXT BOX this slide includes some ESRI fonts. when you save this presentation,
NR 322: Editing Spatial Data Jim Graham Fall 2008 Chapter 6.
Learning ArcGIS Desktop Topics Covered in Module 1 CVEN 2012 – Geomatics University of Colorado – Boulder April 2006 Alyssa McCluskey.
NR 322: Single Layer Analysis Jim Graham Fall 2008 Chapter 8 & 9.
Creating and Editing Feature Data Francisco Olivera, Ph.D., P.E. Srikanth Koka Department of Civil Engineering Texas A&M University.
ArcView Documents Francisco Olivera, Ph.D., P.E. Department of Civil Engineering Texas A&M University.
Unit Eleven: Develop New Data In this unit… ► Overview ► Using ArcGIS Components ► On-Screen Digitizing.
Introduction to ArcGIS Add-Ins Exercises GIS/LIS Conference, 2014 Rochester, MN.
Advance Model Builder Features. Advance Features Using Lists (also Batching) Iteration Feedback Model Only Tools Inline Variable Substitution Preconditions.
Esri UC2013. Technical Workshop. Technical Workshop 2013 Esri International User Conference July 8–12, 2013 | San Diego, California Editing in ArcMap:
Using ESRI ArcGIS 9.3 Arc Tool Box 1 Data Management
Introduction to ArcGIS for Environmental Sciences Day 2 – Fundamentals Module 8 Creating & Editing Data Creating Metadata.
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,
Esri International User Conference | San Diego, CA Technical Workshops | Python – Getting Started Drew Flater, Ghislain Prince July 12 - July 14, 2011.
Working with cursors in Python GISDE Python Workshop Qiao Li.
1/29 Former leader of the “free” world … “I know what I believe. I will continue to articulate what I believe and what I believe.
Esri UC2013. Technical Workshop. Technical Workshop 2013 Esri International User Conference July 8–12, 2013 | San Diego, California Efficient Data Management.
Introduction to Spatial Analysis and Spatial Modeling
Geographic Information Systems Using ESRI ArcGIS 9.3 Advanced Editing: Attribute Table.
Analysis in 9.2: Overlay. Analysis Usually starts with selection but selection can be used throughout an analysis The main tools for analysis are, however,
Introduction to ArcPy. Topics What is ArcPy? Accessing geoprocessing tools using ArcPy Writing scripts using ArcPy.
Python: An Introduction
Introduction to ArcGIS for Environmental Scientists Module 1 – Data Visualization Chapter 1 – GIS Basics.
Using Describe. Topics How to use describe? Retrieving Descriptive Information about data.
ArcGIS Network Analyst: Automating Workflows with Geoprocessing
Attributes in ArcGIS. ArcGIS Attributes FID – ESRI’s internal identifier Shape – Actual spatial data.
Copyright © 2006 by Maribeth H. Price 8-1 Chapter 8 Geoprocessing.
Converting workflows from ArcSDE Command line in ArcGIS 10.3.x
Technical Workshops | Esri International User Conference San Diego, California Creating Geoprocessing Services Kevin Hibma, Scott Murray July 25, 2012.
Geo-processing tools Tools: Buffer Geo-processing tools allow you to work with your data bases on spatial relations.... at a specified distance... with.
Python Beyond the Basics …. Ghislain Prince Jeff Bigos.
Data Creation and Editing Based in part on notes by Prof. Joseph Ferreira and Michael Flaxman Lulu Xue | Nov. 3, :A Workshop on Geographical.
Advanced ArcGIS Yafang Su Academic Technology Services Geocoding Geoprocessing.
Intro to GIS | Summer 2012 Attribute Tables – Part 1.
Geographic Information Systems Using ESRI ArcGIS 9.3 Arc Catalog File Management.
CMap Version 0.16 Ben Faga. CMap CMap Version 0.16 Bug fixes and code optimizations More intuitive menu system Asynchronous loading of comparative map.
Extensible and Usable Testing for Geographic Information System Automation GEOG 596A Capstone Proposal Josie Holmes Advisor: James O’Brien.
Juanita Cano City of Sacramento Spring 2014 Geography 375.
Creating and Editing Feature Data Francisco Olivera, Ph.D., P.E. Srikanth Koka Department of Civil Engineering Texas A&M University.
CE 525. REGRESSION VIDEO Return Quiz Why regression? Re-watch video as it will be on the midterm! 1. This is the difference between actual observed values.
Esri UC 2014 | Technical Workshop | Editing in ArcMap: An Introduction Lisa Stanners, Phil Sanchez.
Intro. To GIS Pre-Lab Spatial Analysis April 1 st, 2013.
William Perry U.S. Geological Survey Western Ecological Research Center Geography 375 Final Project May 22, 2013.
Lecture 10: Geoprocessing with Python (II) Dr. Taysir Hassan Abdel Hamid Associate Professor, Information Systems Dept., Faculty of Computers and Information.
Differential Leveling Conversion and Analysis Toolset Lisa Berry University of Redlands, MS GIS Program.
Introduction to GIS Programming Final Project Submitted by Todd Lenkin Geography 375 Spring of 2011 American River College.
Overlay Operations. Overlay Operations involve combining spatial and attribute data from two or more spatial data layers. “Stacking data” – Very powerful.
ArcGIS Workflow Manager: Advanced Workflows and Concepts
DRAWING LINES To draw lines click View in the Main Menu Toolbar -> Toolbars and check the Editor option. The Editor toolbar will appear amongst the toobars.
GIS Institute Center for Geographic Analysis
Python – Beyond the Basics
Improving Georeferencing Workflow with Python
PYTHON: AN INTRODUCTION
GEOG 375 Final Project Robert Abbotts Spring 2013.
ArcMap: Geoprocessing
Final Project: Read from a csv file and write to a database table
Automating and Validating Edits
Learning Common GIS Workflows
Distance Calculations Geodesic and Cartesian
Module 4 - Analysis Module 4: Basic Analysis Tools
Network Analyst – Automating Workflows with Geoprocessing
Python – Beyond the Basics
Virginia Lenvik Geography 375 Spring 2013
Your Data and ESRI’s Local Government Model
Desktop Mapping: Building Map Books
Presentation transcript:

Overview Cursors arcpy.da module Geometrys Arrays SpatialReferences Licensing and Installation

arcpy.*Cursor functions

SearchCursor Syntax

SearchCursor Example

Update Cursor Syntax

Update cursor example

Insert Cursor Syntax

InsertCursor Example

Insert/Update and Locked data Can not Insert/Update if data is locked Feature class or table can be locked if it is: Part of a map in an MXD that is open in ArcMap Part of a workspace being viewed by ArcCatalog Best practices include: Exit ArcGIS applications when running scripts that create or modify tables or feature classes Delete cursor objects when you have finished using them …

The Data Access (da) module New at 10.1 arcpy.da.Walk( ) – an ArcGIS-aware version of os.path.walk ( )

SearchCursor Function and Class arcpy Function arcpy.da Class

SearchCursor Function and Class Example arcpy.SearchCursor Function syntax SearchCursor (dataset, {where_clause}, {spatial_reference}, {fields}, {sort_fields}) 262 sec for Function 0.66 sec for Class ~ 400 times faster in this case arcpy.da.SearchCursor Class syntax SearchCursor (in_table, field_names, {where_clause}, {spatial_reference}, {explode_to_points}, {sql_clause}) Output:

The Geometry Class

Geometry Properties

Geometry Methods … and clip contains convexHull crosses difference disjoint distanceTo equals getArea getLength getPart intersect overlaps positionAlongLine projectAs symmetricDifference touches union within

Reading geometries

Writing geometries using Python Problem: We have a text file containing a line identifier and x,y coordinates that we would like to use to create polylines in an new feature class similar to an existing feature class Solution: Create a script tool that has two inputs (text file name and template feature class) and one output feature class. The script will - Create a new feature class based on the template feature class - Read the ID and coords for each line from the text file - Use an insert cursor to add each line to the new feature class

Before writing polylines to a feature class … … need some other background Polylines are created from an array of points How is a point created? How is an array points created?

Point and PointGeometry Classes

PointGeometry Class

Array Class

Polyline

Writing geometries using Python Input file structure: For Update/InsertCursor objects, test your scripts on a copy of the dataset. It is sometimes hard to undo modifications to data!

Spatial reference and cursors

Creating a spatial reference

Licensing and Installation

Licensing and Installation Check to see if a license is available Returns license to license manager Check out license from license manager See if requested product is available Information about installation Install types that used with GetInstallInfo Current product license Legacy … replaced by