Presentation is loading. Please wait.

Presentation is loading. Please wait.

Writing Geoprocessing Scripts With ArcGIS

Similar presentations


Presentation on theme: "Writing Geoprocessing Scripts With ArcGIS"— Presentation transcript:

1 Writing Geoprocessing Scripts With ArcGIS
Lecture 10 04/1/2008 ArcGIS 9 introduces scripting support for many of today’s most popular scripting environments, such as Python, VBScript, JScript™, and Perl. Python is an easy-tolearn language similar to C. Python has the ease of use of a scripting language, along with the programming capabilities of a complete developer language. Moreover, Python is platform independent and can operate on a variety of operating systems including UNIX®, Linux®, and Windows.

2 GIS System

3 Development tool The ArcGIS system is built and extended using ArcObjects software components. ArcObjects includes a wide variety of programmable components. Developers work with ArcObjects using standard programming frameworks to extend ArcGIS Desktop, build custom applications with ArcGIS Engine, and implement server GIS applications for various enterprise purposes using ArcGIS sever. The ArcGIS system is built and extended using ArcObjects software components. ArcObjects includes a wide variety of programmable components, ranging from fine-grained objects (for example, individual geometry objects) to coarse-grained objects (for example, a map object to interact with existing ArcMap documents), which aggregate comprehensive GIS functionality for developers. Developers work with ArcObjects using standard programming frameworks to extend ArcGIS Desktop, build custom applications with ArcGIS Engine, and implement server GIS applications for various enterprise purposes using ArcGIS sever.

4 VBA and Python

5

6

7

8

9

10 ArcMap Objects Link

11

12 A new ArcObjects™ component, the geoprocessor, manages all the geoprocessing functions available within ArcGIS. It is an object that provides a single access point and environment for the execution of any geoprocessing tool in ArcGIS, including extensions. The geoprocessor implements automation using the COM IDispatch interface, making it possible for interpretative and macro languages to access the more than 400 available tools. GpDispatch is the COM name for the geoprocessor IDispatch object. In Python, the Dispatch method on the win32com module’s client object is used to create the geoprocessor, while Visual Basic and VBScript use the CreateObject function.

13

14

15

16

17 Python Basics

18

19

20 Variable index Word[0]=‘H’ Word[2:4]=‘lp’ Word[:3]=‘Hel’
Word[-2:-4]=‘el’ Word[-3:]=‘lpA’

21

22

23

24

25

26 Scripts Examples

27 Does not work in your computer

28 Create a new geoprocessor
Add the toolbox

29 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.

30 Study Area

31

32

33

34 Exploring more ArcGIS Teaching yourself.


Download ppt "Writing Geoprocessing Scripts With ArcGIS"

Similar presentations


Ads by Google