1 / 41
文档名称:

Python MdelBuilder.ppt

格式:ppt   页数:41页
下载后只包含 1 个 PPT 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

Python MdelBuilder.ppt

上传人:rongyue482 2015/4/27 文件大小:0 KB

下载得到文件列表

Python MdelBuilder.ppt

相关文档

文档介绍

文档介绍:Python & ModelBuilder
Overview
Python/ModelBuilder Concepts
The Geoprocessor
Checking some environment variables
Providing feedback from your model/script
Starting a script with a model
Bringing pleted script into ArcToolbox
Exercises
Why model or write scripts?
Automate workflows
Test hypotheses
Reproducibility
Extend Functionality
Simplification
Quality Control
The Geoprocessing Object
Also known as the "geoprocessor"
Has many methods
Manages layers and selections
Provides access to all of ArcGIS's tools
Provides status of ArcGIS licensing
Handles errors and warning messages
The Geoprocessing Object
("Roads_2007", "Counties", "")
Check Data Existence
() returns a boolean depending on whether or not the feature class exists
Check most user-submitted data for existence
if (data): # continue working else: # warn user about missing data
ArcToolbox will check, but scripts run from mand line will not
Defining a Workspace
When the geoprocessor has a workspace defined, all processing results will be stored in that folder, geodatabase, or SDE gdb
= "C:\\Student\\"
Once defined, we do not need to specify absolute paths to datasets or outputs located in that workspace
Describe Method
returns an object with numerous properties based on the type of data passed
Feature Classes (shapefiles, geodatabase layers)
Feature Datasets
Workspaces
Raster Data
provides you with GIS-specific information about your data
Using the Describe Method
Use Describe to ensure that data passed to your model fits certain criteria
Prevent line or point features being used as Clip Features
Add an area and perimeter field to shapefiles if not present
Convert rasters to 8-bit unsigned if not already
Use Python to get a list of .shp files, then process only the polygon shapefiles
Check License Availability
Models and scripts might be dependent on the level of ArcGIS available
The ("lev