Extending Python Doing more than just interfacing with the geoprocessor Free example utility for NZ Projections Kim Ollivier.

Slides:



Advertisements
Similar presentations
Easily retrieve data from the Baan database
Advertisements

Geographic Information Systems Using ESRI ArcGIS 9.3 Join and Relate Tables.
Geo GIS Practicuum Introduction to ArcGIS 8 Exercise 5 - ESRI Virtual Campus Chapters 1-2, ArcGIS Methods …
NW Mapbook Application ftp.esri.com, login: nwmapbook password: nwma1456 ftp.esri.com April 18, 2006.
Using XML for Legends and Map Surround DIGITAL MAPPING TECHNIQUES 2005 By Vic Dohar Natural Resources Canada.
Importing GPS Data Lecture 13. EasyGPS  Free software for downloading waypoints  EasyGPS ( EasyGPS  Free software for downloading.
JTX Overview Overview of Job Tracking for ArcGIS (JTX)
Intro to Python Welcome to the Wonderful world of GIS programing!
Creating Map Books ArcMap 10 Data Driven Pages
Environmental GIS Nicholas A. Procopio, Ph.D, GISP Some slides from Lyna Wiggins (Rutgers University)
Why python? Automate processes Batch programming Faster Open source Easy recognition of errors Good for data management What is python? Scripting programming.
Annotation & Nomenclature By Corey Fortezzo for PG&G GIS Workshop, 2010.
1 And Related Applications: RegTool Carto Tools The Geospatial Interface Version 1.1 in ArcGIS 9.
Getting Started with ArcView GIS Introduction to the Laboratory Exercises.
Unit One: GIS Concepts In this unit… ► What is GIS? ► Types of GIS data ► What can you do with GIS? ► ArcGIS 9 license levels ► Basics of the ArcGIS 9.
Technical Support: (989) GIS and Mapping Procedures in ArcMap 9.x Creating an ArcMap Project Editing an ArcMap Project Printing an ArcMap Project.
ArcView / Avenue / ArcGIS Customization. Basic Customization in ArcView 3.x Sources for scripts and extensions Installing an extension Adding and running.
19 th Advanced Summer School in Regional Science An introduction to GIS using ArcGIS.
Spatial Analysis, Geoprocessing,
Introduction to ESRI Add-Ins
ModelBuilder at ArcGIS 9.2 Lyna Wiggins Rutgers University May 2008.
Creating Stand Maps, Generating Plot Maps, and Upload/Download Plot Points to GPS.
ESRM 250 & CFR 520: Introduction to GIS © Phil Hurvitz, KEEP THIS TEXT BOX this slide includes some ESRI fonts. when you save this presentation,
Introduction to ArcGIS Add-Ins Exercises GIS/LIS Conference, 2014 Rochester, MN.
Arc: Programming Options Dr Andy Evans. Programming ArcGIS ArcGIS: Most popular commercial GIS. Out of the box functionality good, but occasionally: You.
Overview Dennis L. Johnson What is GIS? Geographic Information System Geographic implies of or pertaining to the surface of the earth Information implies.
Technical Workshops | Esri International User Conference San Diego, California ArcMap: Tips and Tricks Miriam Schmidts Jorge Ruiz-Valdepena July 23 – 27,
A Sample Print Web Service Utilizing ArcGIS Server and ArcObjects Cheryl Spencer, IndyGIS Marianne Cardwell, Woolpert.
Lesley Bross, August 29, 2010 ArcGIS 10 add-in glossary.
Introduction to Spatial Analysis and Spatial Modeling
Introduction to ArcGIS for Environmental Scientists Module 1 – Data Visualization Chapter 1 – GIS Basics.
1 GPS data into ARCGIS Brute force DNR Software. 2 Brute force IF data in text file –Load into Excel –Make field labels (x,y in particular) –Save as DB4.
Village of Downers Grove Information Services Department ArcGIS 9.2 Update.
CE 525. ESRI VIDEO Thanks to Flores we get to watch another video!
Programming for Geographical Information Analysis: Advanced Skills Lecture 1: Introduction Programming Arc Dr Andy Evans.
Technical Workshops | Esri International User Conference San Diego, California Creating Geoprocessing Services Kevin Hibma, Scott Murray July 25, 2012.
O LLIVIER & C O New Zealand Projections Projections Workshop 2004 Basic Projection Steps NZ Transverse Mercator Projections in ArcGIS 9.0 Reprojecting.
Intro to GIS | Summer 2012 Attribute Tables – Part 1.
Desktop/Cartography. 9.2 – New Cartography Styles Flowing water legend symbol Right Click in Legend Wizard, Properties, Check ‘Override Default Patch’,
9-Nov-97Tri-Ada '971 TASH An Alternative to the Windows API TRI-Ada ‘97 Terry J. Westley
O LLIVIER & C O New Zealand Projections Projections Workshop Basic Projection Steps NZ Transverse Mercator Projections in ArcGIS 8.2 Reprojecting Images.
Desktop Mapping: Building Map Books Jeff Barrette Michael Grossman.
Natura 2000 System Alberto Telletxea Bilbomática under EEA Contractor.
ArcGIS 9 ch 4 Edited 11/4/05 1 Creating and Editing Data in ArcGIS 9 Data can be created and edited manually in a GIS. Using the imagery provided for your.
William Perry U.S. Geological Survey Western Ecological Research Center Geography 375 Final Project May 22, 2013.
Interactive Web Map of Marcellus and Utica Shale Showing Thickness and Depth within the State of PA Adviser: Dr. Jay Parrish Derege W. Kobre.
SIMULATION COMPONENT AND MODFLOW DATA MODEL. Simulation Component.
Delft-FIAT.
A Look at Creating & Updating Point Files
Introduction to GIS PythonScript CGIS-NURIntroduction to ArcGIS II.
Desktop Mapping: Building Map Books
Improving Georeferencing Workflow with Python
Environmental GIS Nicholas A. Procopio, Ph.D, GISP
WOCAT Mapping methodology
Introduction to ArcGIS Add-Ins
MapServer In its most basic form, MapServer is a CGI program that sits inactive on your Web server. When a request is sent to MapServer, it uses.
Preliminaries: -- vector, raster, shapefiles, feature classes.
Lecture 9 Using Python for Geoprocessing
Writing Geoprocessing Scripts With ArcGIS
Programming for Geographical Information Analysis: Advanced Skills
Writing Geoprocessing Scripts With ArcGIS
NCARPO GIS Committee July 26, 2018
Programming for Geographical Information Analysis: Advanced Skills
Building Map Books in ArcGIS
Python Map Automation – Beyond the Basics of arcpy.mapping
Network Analysis using Python
Building Map Books in ArcGIS
Programming Arc.
The Use of Looping Code in Map Production
Clip & Convert to ASCII Program Kelly Knapp Spring 2010
Presentation transcript:

Extending Python Doing more than just interfacing with the geoprocessor Free example utility for NZ Projections Kim Ollivier

Extending Python Gluing it all together strong -> weak Your own Python modules for utilities Other Python modules eg ODBC, XML Other COM interfaces eg Excel ArcGIS toolbox for forms interface ESRI Geoprocessor COM object VBA for ArcMap graphical interaction

Extending Python Helpers and Hints Good idea to use Python 2.4 Python extensions do anything Early binding for COM (Makepy) Direct Python interfaces are best Samples toolbox in 9.1 are a start Maybe contribute your own?

Extending Python Python Modules import mymodule – that’s all there is to it! Would contain your own pythonic functions and classes, documentation, test code Port your arc-only aml utilities My example module is called corax (etools has gone) Do not depend on toolbox validation

Extending Python Creating an NZ Grid Index 1.Decide on the series scale 2.Get the limits for the index: eg Prime name or coordinates or interactive. For interactive input you have to use VBA, UITool, save results to a file. 3.Repeatedly call a function to get [name,extent]…for each sheet in the list 4.Output polys direct or Create a text file 5.Add as a layer or Create the index

Extending Python Step 1 Make a list of sheets Get limits [xmin,ymin,xmax,ymax] Find the sheets at lower left and top right [name,bound] = corax.nztmsheet(scale,x,y) Create a [list] of [name,x1,y1,x2,y2]… Name has 4 parts: prime-scale_col.row

Extending Python Step 2 Get extents of sheets Use the module with custom functions import corax [name,bounds] = corax.nztmsheet(scale,x,y) Add to [list] of [name,x1,y1,x2,y2]…

Extending Python Step 3 Plan A : Write a text file (If only points, load as XY events, export) For lines and polygons : Two files, sample tool to load generate-like file, add attributes.txt, join tables, export. Watch for extra spaces!!! Easier to code, but risks ms-click RSI For a one-off this is convenient enough

Extending Python Step 3 Plan B : Create directly using gp… Delete the last featureclass! Define a projection object (NZTM or NZMG) Create a featureclass (shapefile) Add fields to hold sheet name parts

Extending Python Step 4 Load the sheet rectangles ESRI sample adds layer, but no names Own module adds names but no layer Note names have “/” replaced with “_” to work with MapBook Don’t forget the projection definition What is a projection definition?

Extending Python Review If you can create a text file, then use samples tool for a one-off project. No graphic interaction which means you will have to stay with ArcPlot amls. Projection definitions are obscure. Could not integrate it with MapBook. Could not call sample from another script.

Extending Python Enhancement Requests Upgrade standard install to Python 2.4+ Fix documentation errors and omissions Performance, usability, functionality Add COM error messages More support for Win32 Python Interaction with a map An ArcMap COM interface

Extending Python References The bible for COM interfaces and Python “Python Programming on Win32” - Mark Hammond, O’Reilly Press