ArcGIS 9.2 notes (5): georocessing and Python

Source: Internet
Author: User
ArcGIS 9.0 Introduction Python , As its Georocessing Of
Preferred script Programming LanguageAnd use pythoncom to directly call the GP (main object of georocessing) object of the COM Object. This method is the easiest way to implement it.
Many questions. In addition, python uses a shell-like call method, which is equivalent to a virtual one in ArcGIS 9.0. The preceding blog has been described many times.

Python of ArcGIS 9.2 supports the pythoncom method and C/C ++ to extend a python object (GP). In this way, python can directly call this object, no need to start ArcGIS (called by gp ao or ArcGIS), and the architecture has taken a step forward.

This
GP objects exist in the bin directory of ArcGIS and are named arcgisscr using pting. dll. Different from other DLL objects, the lower-case names are also C-style. Use
Dependency: This object references python24.dll. To be used in Python, you also need to add the pythonpath variable whose value points
Bin directory of ArcGIS, so that the object can be directly imported in the Python script:

Import arcgisscr implements pting

Then you can use this object to create a GP object:

Gp = arcgisscr using pting. Create ()

With GP, it is similar to the Application Object of office, and everything is under control.

There are many advantages to use this method. At the very least, the bridge between ArcGIS and python is built through arcgisscr using pting.Others It has nothing to do with things. It is more free to use Python or ArcGIS. Furthermore, geoprocessing should be stable in this way.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.