gis customization i. binaural recording + reconstructing performances holophonics - virtual barber...

30
GIS Customization I

Post on 21-Dec-2015

220 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: GIS Customization I. Binaural recording + reconstructing performances Holophonics - Virtual Barber Shop John Q. Walker: Re-creating great performances

GIS Customization I

Page 2: GIS Customization I. Binaural recording + reconstructing performances Holophonics - Virtual Barber Shop John Q. Walker: Re-creating great performances

Binaural recording + reconstructing performances

Holophonics - Virtual Barber ShopJohn Q. Walker: Re-creating great performances

Page 3: GIS Customization I. Binaural recording + reconstructing performances Holophonics - Virtual Barber Shop John Q. Walker: Re-creating great performances

Algonquin ArcGIS Customization Courses

GIS Customization I = ArcPy (Python Package for ArcGIS)+ .NET, Visual Studio, C# Essentials+ Intro to ArcObjects

GIS Customzation II = ArcGIS .NET templates+ Extending ArcGIS+ Add-ins

Page 4: GIS Customization I. Binaural recording + reconstructing performances Holophonics - Virtual Barber Shop John Q. Walker: Re-creating great performances

GIS Customization I Course overview

Before study breakPython & ArcGIS 10 (ArcPy)arcpy.mapping

After study breakIntro to .NET, Visual Studio, & C#Code modules, functions, strings, file I/O, OOPClass libraries, console & Windows appsIntro to ArcObjects

Page 5: GIS Customization I. Binaural recording + reconstructing performances Holophonics - Virtual Barber Shop John Q. Walker: Re-creating great performances

Marking

Quizzes – 4 x 20%Exercises/participation

50% for working during lab period & providing zip of progress

Submitting “completed” exercises before next class+25% if not completed but progress was made since lab period +25% for completing exercises (working code)

Page 6: GIS Customization I. Binaural recording + reconstructing performances Holophonics - Virtual Barber Shop John Q. Walker: Re-creating great performances

Working in pairs, or not

Benefits of working in pairs to you1 + 1 = 3One brain working on details (syntax) + Other brain working on solution and next steps Ability to work in pairs or groups is an essential attribute for the work force – standard question for reference calls, letters of support, etcMarks-based pairs (highest with highest, lowest with lowest)Easier for me/better for you to help/mark 10 pairs vs 20 singlesI am asked to be a reference for students (even if the student doesn’t ask me)FYI, I don’t lie.

Send me an e-mail if you want to opt out

Page 7: GIS Customization I. Binaural recording + reconstructing performances Holophonics - Virtual Barber Shop John Q. Walker: Re-creating great performances

References

What would you want someone to say about you?

Page 8: GIS Customization I. Binaural recording + reconstructing performances Holophonics - Virtual Barber Shop John Q. Walker: Re-creating great performances

Why customize ArcGIS? Avoid repetition.

Software does exactly what you want but you don’t want to do it manually dozens or thousands of times.

Example: Clip 30 feature classes with 6 AOI’s

180 times OR < 20 lines of Python code.

Page 9: GIS Customization I. Binaural recording + reconstructing performances Holophonics - Virtual Barber Shop John Q. Walker: Re-creating great performances

Python, ArcGIS, ArcPy, & Geoprocessing

ArcPy is a site-package that builds on (and is a successor to) the successful 9.3 arcgisscripting moduleProvides access to Geoprocessing tools in ArcGIS

InputDataset(s)

OutputDataset(s)

Custom toolboxes

Page 10: GIS Customization I. Binaural recording + reconstructing performances Holophonics - Virtual Barber Shop John Q. Walker: Re-creating great performances

Why customize ArcGIS ? Workflow.

Software does not do EXACTLY what you want to do “out-of-the-box” but has the programming infrastructure required to allow you to customize it to do exactly what you want

Page 11: GIS Customization I. Binaural recording + reconstructing performances Holophonics - Virtual Barber Shop John Q. Walker: Re-creating great performances

Extending ArcGIS, Add-ins, C#, & ArcObjects

Adding toolbars, buttons, tools, etc.Python could not do this until ArcGIS 10.1 … Python will never be able to extend ArcGIS like C# and C# may never be able to extend it like C++GIS Customization II (GIS4307) will cover extending ArcGIS with C#

Page 12: GIS Customization I. Binaural recording + reconstructing performances Holophonics - Virtual Barber Shop John Q. Walker: Re-creating great performances

Dev options with ArcGIS

Page 13: GIS Customization I. Binaural recording + reconstructing performances Holophonics - Virtual Barber Shop John Q. Walker: Re-creating great performances

Open Source GIS components

Page 14: GIS Customization I. Binaural recording + reconstructing performances Holophonics - Virtual Barber Shop John Q. Walker: Re-creating great performances

GIS Customization Business

Page 15: GIS Customization I. Binaural recording + reconstructing performances Holophonics - Virtual Barber Shop John Q. Walker: Re-creating great performances

esriDC R&D Center

Page 16: GIS Customization I. Binaural recording + reconstructing performances Holophonics - Virtual Barber Shop John Q. Walker: Re-creating great performances

What can you do with customization?

Page 17: GIS Customization I. Binaural recording + reconstructing performances Holophonics - Virtual Barber Shop John Q. Walker: Re-creating great performances

Python at 2014 Dev Summit

Page 18: GIS Customization I. Binaural recording + reconstructing performances Holophonics - Virtual Barber Shop John Q. Walker: Re-creating great performances

Good talk from 2011 …

2 hrs

Page 19: GIS Customization I. Binaural recording + reconstructing performances Holophonics - Virtual Barber Shop John Q. Walker: Re-creating great performances

GIS Customization I starts here …

Brief intro to ArcPy & the Geoprocessing Framework

Page 20: GIS Customization I. Binaural recording + reconstructing performances Holophonics - Virtual Barber Shop John Q. Walker: Re-creating great performances

ArcGIS – Python integration

ArcGIS 8.x – 9.x ArcGIS 10.x

Python interpreter/interactive window IN ArcGIS

Python ? – 2.5 Python 2.6 - ?

Page 21: GIS Customization I. Binaural recording + reconstructing performances Holophonics - Virtual Barber Shop John Q. Walker: Re-creating great performances

Python in ArcGIS 9.x vs 10.x

ArcGIS 10

ArcGIS 9.3

Page 22: GIS Customization I. Binaural recording + reconstructing performances Holophonics - Virtual Barber Shop John Q. Walker: Re-creating great performances

Python Interactive window in ArcGIS

Options to Save As … / LoadClear All / Clear selected

Page 23: GIS Customization I. Binaural recording + reconstructing performances Holophonics - Virtual Barber Shop John Q. Walker: Re-creating great performances

Python, ArcGIS, ArcPy, & Geoprocessing

ArcPy introduced at ArcGIS 10

Page 24: GIS Customization I. Binaural recording + reconstructing performances Holophonics - Virtual Barber Shop John Q. Walker: Re-creating great performances

ArcPy site-packageA Python package is a folder containing Python modules, e.g. mapping, ga (Geostatistical

Analyst) & possibly sub-packages, e.g. sa – (Spatial Analyst)

Page 25: GIS Customization I. Binaural recording + reconstructing performances Holophonics - Virtual Barber Shop John Q. Walker: Re-creating great performances

Quick tour of ArcPy

Geoprocessing tool accessarcpy.Clip_analysis(…*)

arcpy.Buffer_analysis(…*)

Functionsarcpy.ListFeatureClasses()

arcpy.Describe(…*)

Classesarcpy.SpatialReference(prjFile)

arcpy.Point({X},{Y},{Z},{M},{ID})

Modules & Packagesarcpy.mapping

arcpy.sa

* “…” used instead multiple parameters

Page 26: GIS Customization I. Binaural recording + reconstructing performances Holophonics - Virtual Barber Shop John Q. Walker: Re-creating great performances

Tools vs Functions

Tools Functions

DocumentationTool documentation

ArcPy documentation

Returns result object Lists, numbers, etc.

Messaging

Tools produce messages …arcpy.GetMessages()

No messaging

Availability

Availability depends on licensing (ArcView, ArcEditor, ArcInfo)

Availability does not depend on license level

CaSe SeNsiTive in ArcGIS 10

Page 27: GIS Customization I. Binaural recording + reconstructing performances Holophonics - Virtual Barber Shop John Q. Walker: Re-creating great performances

result returned from a Tool

Page 28: GIS Customization I. Binaural recording + reconstructing performances Holophonics - Virtual Barber Shop John Q. Walker: Re-creating great performances

Environment settings in ArcGIS 10 / ArcPy

Environment settings affect analysis performed by tools (workspace, extent, cell size, etc.)

Page 29: GIS Customization I. Binaural recording + reconstructing performances Holophonics - Virtual Barber Shop John Q. Walker: Re-creating great performances

Environment settings in Python using ArcPy

import arcpyfrom arcpy import env

# Print the passed-down current workspace environment setting # arcpy.AddMessage("The passed-down current workspace is: %s" % env.workspace)

# Set a new workspace, overriding the passed-down workspace # env.workspace = "e:/data/script.gdb" arcpy.AddMessage("The new current workspace is: %s" % env.workspace)

Page 30: GIS Customization I. Binaural recording + reconstructing performances Holophonics - Virtual Barber Shop John Q. Walker: Re-creating great performances

Done