文档介绍:Gettinggy Started With Python In ArcGIS
Dale Honeycutt
David Wynne
Agenda
• 8:30 – 9:30: Python 101 and ArcPy 101
– Essentials of the language
– UUgsing ArcPy to execute ggpeoprocessing tools
– Python window
• 9:309:30–– 10:00: Script and Script tool basics
– Creating a standalone script
– Creating a script tool
• 10:0010:00–– 10:15: Map automation
• 10:15 ––10:45:10:45: Break
• 10:4510:45–– 11:00: Raster analysis and Map Algebra
• 11:0011:00–– 11:45: Tool Design and Validation
Python 101
Why Python?
• ESRI has embraced Python for ArcGIS 10
• Python is the language that fulfills the needs of our user
community
– Easy to learn
– Excellent for beginners and experts
– SitblfSuitable for l arge proj ect s or small scri itpts
– CrossCross--platformplatform
Python 101
• Clear, easy to read syntax
• Easy to use, makes it simple to get started
• Variety of basic data types
– Including lists and dictionaries
• Comes with a large standard library
• Supports raising and catching exceptions
• Code can be grouped into modules and packages
• SStbjtupports object--ororitdiented programmi ng
ut/
Python at 10 .0
• ESRI has fully embraced Python as its language for
automation
1. ArcPy sitesite--packagepackage
– Includes mapping and Map Algebra support
– essor to the arcgisscripting module
2. Python window
– Python access and interaction from within ArcGIS
3. Python script tool framework
A brief history of Python in ArcGIS
• dispatch–based Geoprocessor
• Python
• arcgisscripting module
• Cross-platform
• Python
• arcgisscripting module, version
•“Pythonic”
• Python
• ArcPy site-ppgackage
• Mapping & Map Algebra support
• Python window
• Python 2 . 6
ArcPy 101
What is ArcPy?
• A cornerstone for automation in ArcGIS
– data analysis
– data conversion
– data management
– map automation
• ArcPy is a native Python site-site-packagepackage
– Access to 800 + geoprocessing tool