Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
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 GIS Customization I Course overview Before study break Python & ArcGIS 10 (ArcPy) arcpy.mapping After study break Intro to .NET, Visual Studio, & C# Code modules, functions, strings, file I/O, OOP Class libraries, console & Windows apps Intro to ArcObjects 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) Working in pairs, or not Benefits of working in pairs to you 1+1=3 One 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, etc Marks-based pairs (highest with highest, lowest with lowest) Easier for me/better for you to help/mark 10 pairs vs 20 singles I 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 References What would you want someone to say about you? 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. Python, ArcGIS, ArcPy, & Geoprocessing ArcPy is a site-package that builds on (and is a successor to) the successful 9.3 arcgisscripting module Provides access to Geoprocessing tools in ArcGIS Input Dataset(s) Output Dataset(s) Custom toolboxes 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 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# Dev options with ArcGIS Open Source GIS components GIS Customization Business esriDC R&D Center What can you do with customization? Python at 2014 Dev Summit Good talk from 2011 … 2 hrs GIS Customization I starts here … Brief intro to ArcPy & the Geoprocessing Framework ArcGIS – Python integration ArcGIS 8.x – 9.x ArcGIS 10.x Python interpreter/ interactive window IN ArcGIS Python ? – 2.5 Python 2.6 - ? Python in ArcGIS 9.x vs 10.x ArcGIS 10 ArcGIS 9.3 Python Interactive window in ArcGIS Options to Save As … / Load Clear All / Clear selected Python, ArcGIS, ArcPy, & Geoprocessing ArcPy introduced at ArcGIS 10 ArcPy site-package A Python package is a folder containing Python modules, e.g. mapping, ga (Geostatistical Analyst) & possibly sub-packages, e.g. sa – (Spatial Analyst) Quick tour of ArcPy Geoprocessing tool access arcpy.Clip_analysis(…*) arcpy.Buffer_analysis(…*) Functions arcpy.ListFeatureClasses() arcpy.Describe(…*) Classes arcpy.SpatialReference(prjFile) arcpy.Point({X},{Y},{Z},{M},{ID}) Modules & Packages arcpy.mapping arcpy.sa * “…” used instead multiple parameters Tools vs Functions CaSe SeNsiTive in ArcGIS 10 Tools Functions Documentation Tool 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 result returned from a Tool Environment settings in ArcGIS 10 / ArcPy Environment settings affect analysis performed by tools (workspace, extent, cell size, etc.) Environment settings in Python using ArcPy import arcpy from 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) Done