Object Model Diagram for ArcPy in ArcGIS David Tenenbaum NGEN13 Lund University

Similar documents
Topology. Shapefile versus Coverage Views

Using ArcGIS ModelBuilder to batch process files

SUMMER SCHOOL ON ADVANCES IN GIS

Exercise 1: Python Language Basics

Data Modeling Basics. John Auel GIS Technician II United Services Group

Analyzing and creating GIS data using Python programming. Josh Foery, JR Franks, Connor McMillan

Basics on Geodatabases

Geodatabase Programming with SQL

Spatial Database Support

Lecture 3: Models of Spatial Information

PARAMETRIC MODELING. David Rosen. December By carefully laying-out datums and geometry, then constraining them with dimensions and constraints,

NetCDF and HDF Data in ArcGIS

ESRI Technical Certification Overview. Amy Daniels Instructor, Greenville Tech

Computational Geometry. Lecture 1: Introduction and Convex Hulls

MicroStrategy Desktop

MAIN_SNP_TOPO.dgm_2m

Oracle 10g PL/SQL Training

Data Integration for ArcGIS Users Data Interoperability. Charmel Menzel, ESRI Don Murray, Safe Software

Raster to Vector Conversion for Overlay Analysis

NATIONAL CLIMATE CHANGE & WILDLIFE SCIENCE CENTER & CLIMATE SCIENCE CENTERS DATA MANAGEMENT PLAN GUIDANCE

Spatial Adjustment Tools: The Tutorial

Using CAD Data in ArcGIS

Sample Table. Columns. Column 1 Column 2 Column 3 Row 1 Cell 1 Cell 2 Cell 3 Row 2 Cell 4 Cell 5 Cell 6 Row 3 Cell 7 Cell 8 Cell 9.

Network Analysis with Python. Deelesh Mandloi

Tutorial 8 Raster Data Analysis

GIS I Business Exr02 (av 9-10) - Expand Market Share (v3b, Jul 2013)

Creating a File Geodatabase

Cookbook 23 September 2013 GIS Analysis Part 1 - A GIS is NOT a Map!

RS/GIS Quick Start Guides Collaborative training materials available from the Biodiversity Informatics & Geospatial Innovation Facilities

INTRODUCTION TO ARCGIS SOFTWARE

Online Digitizing and Editing of GIS Layers (On-Screen or Head s Up Digitizing)

GIS Data in ArcGIS. Pay Attention to Data!!!

ArcGIS Data Models Practical Templates for Implementing GIS Projects

ArcScan Tutorial. Copyright Esri All rights reserved.

The Courses. Covering complete breadth of GIS technology from ESRI including ArcGIS, ArcGIS Server and ArcGIS Engine.

Creating Geospatial Metadata. Kim Durante Geo4Lib Camp

ArcGIS Server and Geodatabase Administration for 10.2

ArcGIS. Tips and Shortcuts. for Desktop

MrSID Plug-in for 3D Analyst

NIS-Elements Viewer. User's Guide

An Introduction to Open Source Geospatial Tools

Buurten van gemeente Groningen

The GeoMedia Fusion Validate Geometry command provides the GUI for detecting geometric anomalies on a single feature.

TurboNest. What s New. Version Released April Copyright 2014 Hypertherm, Inc. All rights reserved.

Exercise 4 Learning Python language fundamentals

Access 2007 Creating Forms Table of Contents

13/10/2011. Data Integration and Interoperability. Gordon Sumerling & Maree Wilson

Using GIS to Develop a Control Map and Database

Toad for Data Analysts, Tips n Tricks

Working with Geodatabase Topology

G563 Quantitative Paleontology. SQL databases. An introduction. Department of Geological Sciences Indiana University. (c) 2012, P.

Multidimensional Marine Environmental Data Conversion and Visualization Using Python and GIS

Vector analysis - introduction Spatial data management operations - Assembling datasets for analysis. Data management operations

What is GIS? Geographic Information Systems. Introduction to ArcGIS. GIS Maps Contain Layers. What Can You Do With GIS? Layers Can Contain Features

User Guide Installing the 3D Studio plug-ins

GIS: Geographic Information Systems A short introduction

How To Hydrologically Condition A Digital Dam

Choosing the right GIS framework for an informed Enterprise Web GIS Solution

Whisler 1 A Graphical User Interface and Database Management System for Documenting Glacial Landmarks

A GIS helps you answer questions and solve problems by looking at your data in a way that is quickly understood and easily shared.

Raster: The Other GIS Data

How To Write An Nccwsc/Csc Data Management Plan

Using Excel to find Perimeter, Area & Volume

GIS Analysis for Applied Economists 1

Lecture 2 Mathcad Basics

Using ArcObjects in Python. Mark Cederholm UniSource Energy Services

Vector storage and access; algorithms in GIS. This is lecture 6

Welcome to CorelDRAW, a comprehensive vector-based drawing and graphic-design program for the graphics professional.

Relational Algebra. Module 3, Lecture 1. Database Management Systems, R. Ramakrishnan 1

SolidWorks Implementation Guides. Sketching Concepts

PART 1. Representations of atmospheric phenomena

Visualization of LODES/OnTheMap Work Destination Data Using GIS and Statistical applications

ALGEBRA. sequence, term, nth term, consecutive, rule, relationship, generate, predict, continue increase, decrease finite, infinite

Quickstart for Desktop Version

Tessellating with Regular Polygons

Data Interoperability Extension Tutorial

CREATE A 3D MOVIE IN DIRECTOR

New York City Neighborhood Tabulation Areas

Create a folder on your network drive called DEM. This is where data for the first part of this lesson will be stored.

Raster Operations. Local, Neighborhood, and Zonal Approaches. Rebecca McLain Geography 575 Fall Raster Operations Overview

A Method Using ArcMap to Create a Hydrologically conditioned Digital Elevation Model

Team Members: Christopher Copper Philip Eittreim Jeremiah Jekich Andrew Reisdorph. Client: Brian Krzys

ModelBuilder - Creating Tools Tutorial

JOURNAL OF OBJECT TECHNOLOGY

Introduction to the TI-Nspire CX

Geocortex HTML 5 Viewer Manual

Analysing Big Data in ArcGIS

Grade Level: High School

Mississippi Private Schools 2015

What's new in gvsig Desktop 2.0

Under GIS Data select Hydrography This will show all of the state-wide options for hydrography data. For this project, we want the seventh entry in

An Application in GIS for a Sanitary Sewer Overflow Emergency Response Program

LNG Terminals. File Geodatabase Feature Class. Tags natural gas, lng, liquid natural gas, terminals

The development of a flood damage assessment tool for urban areas

Pre-processing in openfoam, mesh generation. OpenFOAM kurs 2013 Håkan Nilsson Olivier Petit

1. Relational database accesses data in a sequential form. (Figures 7.1, 7.2)

Year 9 set 1 Mathematics notes, to accompany the 9H book.

WHO STEPS Surveillance Support Materials. STEPS Epi Info Training Guide

ArcFuels Supplemental Material: GIS 9.x Tips and Tricks

Importing and Opening an Alignment

Transcription:

Object Model Diagram for ArcPy in ArcGIS 10.2.1

Getting and Setting Values in a Table ArcGIS implementation of the vector spatial data model uses a database-style method of storing data It is a spatial version of a relational database management system (RDBMS) Any given vector dataset is stored in a table, using database terminology Within a table, there is a set of rows, one for each record There is also a set of fields, one for each attribute The characteristics of the spatial part of the data are stored in a special kind of field, where the needed x-y coordinate pair(s) are stored The intersection of a row and a field is a cell, which contains a value, which can be one of many data types

Getting and Setting Values in a Table - Cursors To work with the rows in a table, a cursor is used A cursor is a database technology term for a way of accessing a set of records in a table and can be used to iterate over the set of records in a table to read values, or to insert new records, or to write values in records There are three types of cursors: 1. A search cursor is used to retrieve rows 2. An insert cursor is used to insert rows 3. An update cursor is used to update and delete rows Each type of cursor is created by a function in arcpy.da (the data access module): SearchCursor, InsertCursor, and UpdateCursor

Object Model Diagram for ArcPy in ArcGIS 10.2.1 Data Access Module (arcpy.da) Note: There are functions to create the cursors, and the cursor classes themselves

Methods Supported by Cursor Type ArcGIS 10.2.1 arcpy.da Cursor Type Method Descrip2on Search next reset Gets the next row Returns the cursor to its star2ng posi2on Insert insertrow Inserts a new row into the table deleterow Removes a row from the table Update next reset Retrieves the next row from the table Returns the cursor to its star2ng posi2on updaterow Updates the current row

Getting and Setting Values in a Table - Cursors Cursors move through a table from the 0 th record to the n th record in a forward direction: They cannot go backwards to a previous record If you need to return to a record that is before the cursor s current position, you need to make another pass

Getting and Setting Values in a Table - Cursors A for loop can be used with search and update cursors to iterate through the set of rows in a table Alternatively, a while loop can be used in conjunction with the next method to move from record to record A call to the next method once the last row has been reached will return an exception that lets you know you just asked for a row that does not exist Exceptions result in a fairly specific error message being passed to you in the Results window, which is very useful because this is a case where ArcGIS tells you exactly what went wrong, which makes it a lot easier to figure out, and fix the problem!

Geometries The Spatial Part of the Data Amongst the data types you can manipulate in a table is the spatial data itself, via geometry objects Recall that the set of vertices that defines any given feature in a vector dataset is stored in a particular field in its associated table, and this information can be accessed via a cursor By reading the set of vertices into an appropriate geometry object, one can then manipulate them in any number of ways Likewise, a geometry object can be constructed, and then written into a particular record in an appropriate database table

Object Model Diagram for ArcPy in ArcGIS 10.2.1 Geometry and Spatial Classes Point Geometry Extent Polyline Spatial Reference Point Multipoint Geometry Polygon Functions There is a geometry class for all of the usual geographic primitives that we see represented in ArcGIS vector spatial data model You probably can recognize point, polyline and polygon classes, but may not be familiar with the multipoint class and some of the others

Object Model Diagram for ArcPy in ArcGIS 10.2.1 Geometry and Spatial Classes The Geometry class has methods and properties that the other geometries inherit Most of the functionality you need for points is found in the PointGeometry Class; there are just a few methods and properties in the Point class

Object Model Diagram for ArcPy in ArcGIS 10.2.1 Geometry and Spatial Classes The higher dimension Geometry classes all have very similar methods and properties

Object Model Diagram for ArcPy in ArcGIS 10.2.1 Geometry and Spatial Classes The SpatialReference class is used to deal with coordinate system issues, so ArcGIS knows how to project an x-y pair The Extent class is used to describe the minimum bounding rectangle of a geometry object, and to make comparisons between Extents

Creating Custom Geoprocessing Tools Once you have a useful script, at some point you may want to share it with other ArcGIS users Those other users might not be Python coders You need a way to give them your script without them ever having to see your code; they just want to run it! This is actually fairly easy to do in ArcGIS: 1. Create a new Toolbox where you can save your Script 2. Create a new Tool in your Toolbox using Add Script 3. Set up your Tool, importing your code and setting up Parameters, which users set using the Tool s interface You will need to modify your code a little to pass Parameters properly between the interface and the script

Creating Custom Geoprocessing Tools 1. Create a new Toolbox where you can save your Script

Creating Custom Geoprocessing Tools 2. Create a new Tool in your Toolbox using Add Script

Creating Custom Geoprocessing Tools 3. Set up your Tool, importing your code and setting up Parameters, which users set using the Tool s interface

Creating Custom Geoprocessing Tools 3. Continued: You will need to modify your code a little to pass Parameters properly between the interface and the script

Creating Custom Geoprocessing Tools You can then share the Toolbox file (.tbx) with others, and they will be able to make use of the script / tool you have made (provided they have the right version of ArcGIS so Python versions match!) Through the use of Parameters, and building a little interface for your Tool, it will work and look just like any other Geoprocessing Tool in ArcGIS: Users will be able to set up the input and output (as necessary) for your Tool, and any other required Parameters You have the option of encrypting your code so others cannot see it, or you can leave it available to export so they can access it, and if necessary modify it / improve it!