Writing Geoprocessing Scripts With ArcGIS Lecture 9.
-
Upload
alvin-miles -
Category
Documents
-
view
229 -
download
3
Transcript of Writing Geoprocessing Scripts With ArcGIS Lecture 9.
![Page 1: Writing Geoprocessing Scripts With ArcGIS Lecture 9.](https://reader031.fdocuments.in/reader031/viewer/2022012922/56649e495503460f94b3cfc3/html5/thumbnails/1.jpg)
Writing Geoprocessing ScriptsWith ArcGIS
Lecture 9
![Page 2: Writing Geoprocessing Scripts With ArcGIS Lecture 9.](https://reader031.fdocuments.in/reader031/viewer/2022012922/56649e495503460f94b3cfc3/html5/thumbnails/2.jpg)
GIS System
![Page 3: Writing Geoprocessing Scripts With ArcGIS Lecture 9.](https://reader031.fdocuments.in/reader031/viewer/2022012922/56649e495503460f94b3cfc3/html5/thumbnails/3.jpg)
ArcObjects ArcObjects are the building blocks of ArcGIS. With
ArcObjects, you can create your own menus, tools, workflows, applications, and custom feature classes for use with ArcGIS.
ESRI ArcObjects is the development platform for the ArcGIS family of applications, such as ArcMap, ArcCatalog, ArcScene, ArcGIS Engine, and ArcGIS Server. The ArcObjects software components expose the full range of functionality available in ArcInfo, ArcEditor, and ArcView to software developers
Can use VBA, Python, C++, Java to program
![Page 4: Writing Geoprocessing Scripts With ArcGIS Lecture 9.](https://reader031.fdocuments.in/reader031/viewer/2022012922/56649e495503460f94b3cfc3/html5/thumbnails/4.jpg)
![Page 5: Writing Geoprocessing Scripts With ArcGIS Lecture 9.](https://reader031.fdocuments.in/reader031/viewer/2022012922/56649e495503460f94b3cfc3/html5/thumbnails/5.jpg)
![Page 6: Writing Geoprocessing Scripts With ArcGIS Lecture 9.](https://reader031.fdocuments.in/reader031/viewer/2022012922/56649e495503460f94b3cfc3/html5/thumbnails/6.jpg)
![Page 7: Writing Geoprocessing Scripts With ArcGIS Lecture 9.](https://reader031.fdocuments.in/reader031/viewer/2022012922/56649e495503460f94b3cfc3/html5/thumbnails/7.jpg)
![Page 8: Writing Geoprocessing Scripts With ArcGIS Lecture 9.](https://reader031.fdocuments.in/reader031/viewer/2022012922/56649e495503460f94b3cfc3/html5/thumbnails/8.jpg)
COM (Component Object Model) is an interface standard for software componentry introduced by Microsoft in 1993. It is used to enable interprocess communication and dynamic object creation in a large range of programming languages Python 2.5: import sys, string, os, arcgisscripting
Python 2.5: gp = arcgisscripting.create()
![Page 9: Writing Geoprocessing Scripts With ArcGIS Lecture 9.](https://reader031.fdocuments.in/reader031/viewer/2022012922/56649e495503460f94b3cfc3/html5/thumbnails/9.jpg)
![Page 10: Writing Geoprocessing Scripts With ArcGIS Lecture 9.](https://reader031.fdocuments.in/reader031/viewer/2022012922/56649e495503460f94b3cfc3/html5/thumbnails/10.jpg)
![Page 11: Writing Geoprocessing Scripts With ArcGIS Lecture 9.](https://reader031.fdocuments.in/reader031/viewer/2022012922/56649e495503460f94b3cfc3/html5/thumbnails/11.jpg)
![Page 12: Writing Geoprocessing Scripts With ArcGIS Lecture 9.](https://reader031.fdocuments.in/reader031/viewer/2022012922/56649e495503460f94b3cfc3/html5/thumbnails/12.jpg)
![Page 13: Writing Geoprocessing Scripts With ArcGIS Lecture 9.](https://reader031.fdocuments.in/reader031/viewer/2022012922/56649e495503460f94b3cfc3/html5/thumbnails/13.jpg)
Python Basics
![Page 14: Writing Geoprocessing Scripts With ArcGIS Lecture 9.](https://reader031.fdocuments.in/reader031/viewer/2022012922/56649e495503460f94b3cfc3/html5/thumbnails/14.jpg)
![Page 15: Writing Geoprocessing Scripts With ArcGIS Lecture 9.](https://reader031.fdocuments.in/reader031/viewer/2022012922/56649e495503460f94b3cfc3/html5/thumbnails/15.jpg)
![Page 16: Writing Geoprocessing Scripts With ArcGIS Lecture 9.](https://reader031.fdocuments.in/reader031/viewer/2022012922/56649e495503460f94b3cfc3/html5/thumbnails/16.jpg)
![Page 17: Writing Geoprocessing Scripts With ArcGIS Lecture 9.](https://reader031.fdocuments.in/reader031/viewer/2022012922/56649e495503460f94b3cfc3/html5/thumbnails/17.jpg)
Variable index
Word =
Word[0]=‘H’ Word[2:4]=‘lp’ Word[:3]=‘Hel’ Word[-2:-4]=‘el’ Word[-3:]=‘lpA’
![Page 18: Writing Geoprocessing Scripts With ArcGIS Lecture 9.](https://reader031.fdocuments.in/reader031/viewer/2022012922/56649e495503460f94b3cfc3/html5/thumbnails/18.jpg)
![Page 19: Writing Geoprocessing Scripts With ArcGIS Lecture 9.](https://reader031.fdocuments.in/reader031/viewer/2022012922/56649e495503460f94b3cfc3/html5/thumbnails/19.jpg)
![Page 20: Writing Geoprocessing Scripts With ArcGIS Lecture 9.](https://reader031.fdocuments.in/reader031/viewer/2022012922/56649e495503460f94b3cfc3/html5/thumbnails/20.jpg)
![Page 21: Writing Geoprocessing Scripts With ArcGIS Lecture 9.](https://reader031.fdocuments.in/reader031/viewer/2022012922/56649e495503460f94b3cfc3/html5/thumbnails/21.jpg)
![Page 22: Writing Geoprocessing Scripts With ArcGIS Lecture 9.](https://reader031.fdocuments.in/reader031/viewer/2022012922/56649e495503460f94b3cfc3/html5/thumbnails/22.jpg)
![Page 23: Writing Geoprocessing Scripts With ArcGIS Lecture 9.](https://reader031.fdocuments.in/reader031/viewer/2022012922/56649e495503460f94b3cfc3/html5/thumbnails/23.jpg)
![Page 24: Writing Geoprocessing Scripts With ArcGIS Lecture 9.](https://reader031.fdocuments.in/reader031/viewer/2022012922/56649e495503460f94b3cfc3/html5/thumbnails/24.jpg)
![Page 25: Writing Geoprocessing Scripts With ArcGIS Lecture 9.](https://reader031.fdocuments.in/reader031/viewer/2022012922/56649e495503460f94b3cfc3/html5/thumbnails/25.jpg)
![Page 26: Writing Geoprocessing Scripts With ArcGIS Lecture 9.](https://reader031.fdocuments.in/reader031/viewer/2022012922/56649e495503460f94b3cfc3/html5/thumbnails/26.jpg)
Scripts Examples
![Page 27: Writing Geoprocessing Scripts With ArcGIS Lecture 9.](https://reader031.fdocuments.in/reader031/viewer/2022012922/56649e495503460f94b3cfc3/html5/thumbnails/27.jpg)
Does not work in your new version 2.5
![Page 28: Writing Geoprocessing Scripts With ArcGIS Lecture 9.](https://reader031.fdocuments.in/reader031/viewer/2022012922/56649e495503460f94b3cfc3/html5/thumbnails/28.jpg)
Add the toolbox
Create a new geoprocessor
![Page 29: Writing Geoprocessing Scripts With ArcGIS Lecture 9.](https://reader031.fdocuments.in/reader031/viewer/2022012922/56649e495503460f94b3cfc3/html5/thumbnails/29.jpg)
How to run a python script You can run a script as a standalone operation or you
can add a script to a toolbox and then run the script from its dialog box or incorporate it into a model.
Running a script as a standalone operation means that you can accomplish geoprocessing without ever opening an ArcGIS Desktop application. For example, you can run scripts from within a script editor, like Pythonwin, or from the command prompt.
![Page 30: Writing Geoprocessing Scripts With ArcGIS Lecture 9.](https://reader031.fdocuments.in/reader031/viewer/2022012922/56649e495503460f94b3cfc3/html5/thumbnails/30.jpg)
Example: Extract the radar rainfall using raingauges location.
Objective: compare the radar and rain gauge rainfall measurements
Data source: Polygon-feature class of radar rainfall (>10k files); Point-feature of rain gauge locations (50 gauges);
Method: interception Final format: all values are stored at one *.txt file.
![Page 31: Writing Geoprocessing Scripts With ArcGIS Lecture 9.](https://reader031.fdocuments.in/reader031/viewer/2022012922/56649e495503460f94b3cfc3/html5/thumbnails/31.jpg)
Study Area
![Page 32: Writing Geoprocessing Scripts With ArcGIS Lecture 9.](https://reader031.fdocuments.in/reader031/viewer/2022012922/56649e495503460f94b3cfc3/html5/thumbnails/32.jpg)
![Page 33: Writing Geoprocessing Scripts With ArcGIS Lecture 9.](https://reader031.fdocuments.in/reader031/viewer/2022012922/56649e495503460f94b3cfc3/html5/thumbnails/33.jpg)
![Page 34: Writing Geoprocessing Scripts With ArcGIS Lecture 9.](https://reader031.fdocuments.in/reader031/viewer/2022012922/56649e495503460f94b3cfc3/html5/thumbnails/34.jpg)