Geoprocessing With Python

Geoprocessing operations take geographic data and use it to create more detailed maps, analyze relationships between separate pieces of information or create entirely new information. With geoprocessing programs, geographers can automate many tasks relating to Geographic Information Systems (GIS), such as preparing data, producing maps and verifying information. The Python programming language is one tool for coding such programs.

  1. Databases

    • Geoprocessing operations rely on databases to store information. Using Python, you can write a script -- a self-contained file -- to automate the workflow so that information enters the geodatabase as its collected, or to automatically run geodata sets through an analysis program. Python comes with samples of ArcGIS code -- a program that works with GIS -- so that you have something to model your Python code on. Python code is modular, making it easy to take pieces of one program and reuse the code in other geoprocessing applications.

    Geoprocessing Scripts

    • With ArcGIS's help system, you can look up the usage and command syntax for ArcGIS, as well as finding scripting examples. ArcGIS is also the place to research the usage and syntax of geoprocessing properties and methods. Before coding your script for accessing the geodatabase, you need a good model of the particular database. Learn how information is stored in the database, the applications that access it and the hardware configuration before you start coding.

    Environment

    • To work on Python geoprocessing scripts, set up an integrated development environment, or IDE, a software platform designed for developers to experiment with code. The Eclipse IDE has a plug-in, Pydev, designed specifically for Python, though some versions of Eclipse haven't been tested for compatibility with ArcGIS. Eclipse is open source, but Pydev is a commercial product. Once you've downloaded the IDE, import the GP scripting module from ArcGIS and begin work.

    Scripting

    • To write your Python geoprocessing script, create a geoprocessor software object that can access GIS features. Using the object, access data from GIS maps, such as population density or the range of a particular animal species. Create a data directory to store the data, then access and clip the information from the directory that's relevant to your script. Once you've written the script, test it to make sure the code runs correctly.

Related Searches:

References

Resources

Comments

Related Ads

Featured