SlideShare a Scribd company logo
Python & ArcGIS Geoprocessing
Presentation Scope Requirements. Python programming language & COM. ArcGIS and Scripting (Geoprocessing). Using the Geoprocessor Object. Some Examples.
Requirements Knowledge of a programming language, preferably python. Some knowledge of ArcObjects / Concept of OO. Knowledge of Object Model Diagrams (not essential). Software Requirements: Python comes installed with ArcGIS. If required can be installed. Win32com client needed if not installed on the machine. (COM) Potential problems associated with Python and ArcGIS installation: http:// support.esri.com/index.cfm?fa = knowledgebase.techarticles.articleShow&d =31900
Python Programming Language Python is platform independent, object Oriented language. It is easy to learn. Two good websites/Python references exists at: http://www.diveintopython.org/ http://www.python.org Before proceeding, do ensure you have considerable knowledge of Python. ArcGIS 9.2 ships with Python 2.4.1.
Component Object Model COM is a protocol that connects one software component with another.  These software components under COM are called objects. Different types of objects exists which are used for variety of purposes. So which object is used for Python/Geoprocessing(Scripting)? Geoprocessor  object exposes ArcGIS toolbox (geoprocessing functions) to Python. This object provides a single access point to the toolbox. It has methods and properties like any other object, using which powerful things can be done. Geoprocessor Object So much can be done
Geoprocessing (What is it?)  In simple words, it is the processing of geographic information to create new useful information (example: used for analysis). The fundamental purpose of geoprocessing is to allow you to automate your GIS tasks So how would you want to process geographic information? Consider the following: Suppose you have few ASCII files and want to convert them all into a single polygon shapefile. You might also be interested in obtaining a polyline shapefile from the generated polygon. Some of you may point out, it can be done manually using the toolboxes in ArcMap .  True . You can process the ASCII files for a specific purpose (like generating the polygon feature). But, it does require you to use number of geoprocessing functions (in a specific sequence) and therefore a number of steps must be performed to obtain the final polygon and polyline shapefile.  See below for all the steps involved
Manual Geoprocessing Steps: Open ArcToolbox. ArcToolbox / Conversion Tools / To Raster / ASCII to Raster. Repeat this process to convert all your ASCII (*.asc) files to Rasters. Merge all these raster files into one raster using ArcToolbox / Data Management Tools / Raster / Mosaic. When the process has completed, one of the rasters will be the merged version of all the rasters.  Remove all but the merged raster from the map. ArcToolbox / Spatial Analyst Tools / Reclass / Reclassify. Click Classify… and set the number of classes to 1. The reclassified raster is added to the map. ArcToolbox / Conversion Tools /  From Raster / Raster To Polygon When the process is complete, the polygon will be added to the map.  Now consider, the above operation needs to be performed on daily or weekly basis on ASCII files corresponding to different areas. Or even better lets say you are going on vacation but want the process explained in the previous slide to be carried out while you are off.  Someone will have to do all of this processing manually…..waste of time ??? It would be great if all this processing can be done automatically or can be scheduled to be carried out while you are away.
Scripting to the rescue This is where scripting plays an important role. A script will need to be programmed once to automate the above mentioned procedure. The script can be run for creating the polygon and polyline shapefile and can be reused whenever such output is required. Imagine the amount of effort and time saved!
Take a break! Make sure you have understood the above scenario and acknowledge the need for scripting. BUT!!!! Scripting is not applicable in all scenarios. Writing scripts can be time consuming process, so if scripting is not necessary don’t do it.
Geoprocessor Object (Recep) Remember Geoprocessor object is an object that provides single access point to ArcGIS tool Box. It has methods and properties. Interation with the Geoprocessor is through these methods and objects.  Example:  createObject() method to create an object.  Important:  Geoprocessor Programming Model list all the properties and methods available.
Geoprocessing Programming Model (Overall View) http://webhelp.esri.com/arcgisdesktop/9.2/pdf/Geoprocessor.pdf

More Related Content

What's hot (18)

PDF
How my visualization tools use little memory: A tale of incrementalization an...
Eugene Kirpichov
 
PDF
Automation in ArcGIS using Arcpy
Geodata AS
 
PPTX
GIS: The Future's So Bright, I Gotta Wear Shades
James Fee
 
PDF
React meets o OCalm
Michał Załęcki
 
PPTX
From Python to smartphones: neural nets @ Saint-Gobain, François Sausset
Pôle Systematic Paris-Region
 
PDF
Apache Airflow
Sumit Maheshwari
 
PDF
Clean code with Java 9
Miro Cupak
 
PPTX
.NET Garbage Collection Performance Tips
Sasha Goldshtein
 
PDF
Cypher for Gremlin
openCypher
 
PDF
AddisDev Meetup ii: Golang and Flow-based Programming
Samuel Lampa
 
PDF
Sheffield_R_ July meeting - Interacting with R - IDEs, Git and workflow
Paul Richards
 
PPT
Qtp testing23
Ramu Palanki
 
PDF
Designing and coding for cloud-native applications using Python, Harjinder Mi...
Pôle Systematic Paris-Region
 
PDF
Swimat - Swift formatter
Jintin Lin
 
PPTX
Helpful into to Rx
Serg Dort
 
PDF
Cakefest 2011 - pecha kucha talk abstraction
Carl Sutton
 
PDF
Building an analytics workflow using Apache Airflow
Yohei Onishi
 
PPTX
Apache Airflow Introduction
Liangjun Jiang
 
How my visualization tools use little memory: A tale of incrementalization an...
Eugene Kirpichov
 
Automation in ArcGIS using Arcpy
Geodata AS
 
GIS: The Future's So Bright, I Gotta Wear Shades
James Fee
 
React meets o OCalm
Michał Załęcki
 
From Python to smartphones: neural nets @ Saint-Gobain, François Sausset
Pôle Systematic Paris-Region
 
Apache Airflow
Sumit Maheshwari
 
Clean code with Java 9
Miro Cupak
 
.NET Garbage Collection Performance Tips
Sasha Goldshtein
 
Cypher for Gremlin
openCypher
 
AddisDev Meetup ii: Golang and Flow-based Programming
Samuel Lampa
 
Sheffield_R_ July meeting - Interacting with R - IDEs, Git and workflow
Paul Richards
 
Qtp testing23
Ramu Palanki
 
Designing and coding for cloud-native applications using Python, Harjinder Mi...
Pôle Systematic Paris-Region
 
Swimat - Swift formatter
Jintin Lin
 
Helpful into to Rx
Serg Dort
 
Cakefest 2011 - pecha kucha talk abstraction
Carl Sutton
 
Building an analytics workflow using Apache Airflow
Yohei Onishi
 
Apache Airflow Introduction
Liangjun Jiang
 

Viewers also liked (20)

PPT
The Python Programming Language and HDF5: H5Py
The HDF-EOS Tools and Information Center
 
PPTX
Python programming - Everyday(ish) Examples
Ashish Sharma
 
PDF
Lets learn Python !
Kiran Gangadharan
 
PPT
Introduction to Python
Nowell Strite
 
PPT
Substituting HDF5 tools with Python/H5py scripts
The HDF-EOS Tools and Information Center
 
PPTX
Introduction To Programming with Python-1
Syed Farjad Zia Zaidi
 
PDF
Logic Over Language
Purple, Rock, Scissors
 
PDF
Python and HDF5: Overview
andrewcollette
 
PPTX
Introduction To Programming with Python-5
Syed Farjad Zia Zaidi
 
PDF
An Introduction to Interactive Programming in Python 2013
Syed Farjad Zia Zaidi
 
PDF
Logic: Language and Information 1
Syed Farjad Zia Zaidi
 
PDF
Introduction to Databases
Syed Farjad Zia Zaidi
 
PPTX
Introduction To Programming with Python-4
Syed Farjad Zia Zaidi
 
PDF
Introduction to UBI
Roy Lee
 
PPTX
Clase 2 estatica
Gerald Moreira Ramírez
 
PPT
Using HDF5 and Python: The H5py module
The HDF-EOS Tools and Information Center
 
PPTX
Python Scripting for ArcGIS
siufu
 
PPT
Python Introduction
Mohammad Javad Beheshtian
 
The Python Programming Language and HDF5: H5Py
The HDF-EOS Tools and Information Center
 
Python programming - Everyday(ish) Examples
Ashish Sharma
 
Lets learn Python !
Kiran Gangadharan
 
Introduction to Python
Nowell Strite
 
Substituting HDF5 tools with Python/H5py scripts
The HDF-EOS Tools and Information Center
 
Introduction To Programming with Python-1
Syed Farjad Zia Zaidi
 
Logic Over Language
Purple, Rock, Scissors
 
Python and HDF5: Overview
andrewcollette
 
Introduction To Programming with Python-5
Syed Farjad Zia Zaidi
 
An Introduction to Interactive Programming in Python 2013
Syed Farjad Zia Zaidi
 
Logic: Language and Information 1
Syed Farjad Zia Zaidi
 
Introduction to Databases
Syed Farjad Zia Zaidi
 
Introduction To Programming with Python-4
Syed Farjad Zia Zaidi
 
Introduction to UBI
Roy Lee
 
Clase 2 estatica
Gerald Moreira Ramírez
 
Using HDF5 and Python: The H5py module
The HDF-EOS Tools and Information Center
 
Python Scripting for ArcGIS
siufu
 
Python Introduction
Mohammad Javad Beheshtian
 
Ad

Similar to Python 4 Arc (20)

PPT
01 ESRI software arcgis article history.ppt
HamzaKhalid267437
 
PPT
principles of gis 2007 Lecture2_BGTD.ppt
ShafiqullahRahmani
 
PPTX
Python and GIS: Improving Your Workflow
John Reiser
 
PDF
Introduction to Apache Beam
Jean-Baptiste Onofré
 
PPTX
Analytics with arcpy package detailing of Mapping Module Properties and Data ...
Soumik Chakraborty
 
DOCX
Arc objects library reference
Kalikumutima Josiane
 
PPTX
carrow - Go bindings to Apache Arrow via C++-API
Yoni Davidson
 
PPTX
GIS Modeling
John Reiser
 
PDF
Minko - Targeting Flash/Stage3D with C++ and GLSL
Minko3D
 
PPT
Sergey Ilinsky Presentation Ample Sdk
Ajax Experience 2009
 
PDF
CocoaConf DC - Automate with Swift - Tony Ingraldi
Tony Ingraldi
 
PDF
Argis manual gratuito
luismate
 
PDF
Argis manual gratuito
juanito gutierrez churqui
 
PPTX
2D graphics
Muhammad Rashid
 
PPT
Rapid, Scalable Web Development with MongoDB, Ming, and Python
Rick Copeland
 
PDF
RS and GIS TW- 1&2.pdf
SatishKhadse3
 
PDF
Realizing the Promise of Portable Data Processing with Apache Beam
DataWorks Summit
 
PPT
PDE2011 pythonOCC project status and plans
Thomas Paviot
 
PPTX
Tech Talk - Overview of Dash framework for building dashboards
Appsilon Data Science
 
PPT
pythonOCC PDE2009 presentation
Thomas Paviot
 
01 ESRI software arcgis article history.ppt
HamzaKhalid267437
 
principles of gis 2007 Lecture2_BGTD.ppt
ShafiqullahRahmani
 
Python and GIS: Improving Your Workflow
John Reiser
 
Introduction to Apache Beam
Jean-Baptiste Onofré
 
Analytics with arcpy package detailing of Mapping Module Properties and Data ...
Soumik Chakraborty
 
Arc objects library reference
Kalikumutima Josiane
 
carrow - Go bindings to Apache Arrow via C++-API
Yoni Davidson
 
GIS Modeling
John Reiser
 
Minko - Targeting Flash/Stage3D with C++ and GLSL
Minko3D
 
Sergey Ilinsky Presentation Ample Sdk
Ajax Experience 2009
 
CocoaConf DC - Automate with Swift - Tony Ingraldi
Tony Ingraldi
 
Argis manual gratuito
luismate
 
Argis manual gratuito
juanito gutierrez churqui
 
2D graphics
Muhammad Rashid
 
Rapid, Scalable Web Development with MongoDB, Ming, and Python
Rick Copeland
 
RS and GIS TW- 1&2.pdf
SatishKhadse3
 
Realizing the Promise of Portable Data Processing with Apache Beam
DataWorks Summit
 
PDE2011 pythonOCC project status and plans
Thomas Paviot
 
Tech Talk - Overview of Dash framework for building dashboards
Appsilon Data Science
 
pythonOCC PDE2009 presentation
Thomas Paviot
 
Ad

Recently uploaded (20)

PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PDF
July Patch Tuesday
Ivanti
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PDF
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
July Patch Tuesday
Ivanti
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 

Python 4 Arc

  • 1. Python & ArcGIS Geoprocessing
  • 2. Presentation Scope Requirements. Python programming language & COM. ArcGIS and Scripting (Geoprocessing). Using the Geoprocessor Object. Some Examples.
  • 3. Requirements Knowledge of a programming language, preferably python. Some knowledge of ArcObjects / Concept of OO. Knowledge of Object Model Diagrams (not essential). Software Requirements: Python comes installed with ArcGIS. If required can be installed. Win32com client needed if not installed on the machine. (COM) Potential problems associated with Python and ArcGIS installation: http:// support.esri.com/index.cfm?fa = knowledgebase.techarticles.articleShow&d =31900
  • 4. Python Programming Language Python is platform independent, object Oriented language. It is easy to learn. Two good websites/Python references exists at: http://www.diveintopython.org/ http://www.python.org Before proceeding, do ensure you have considerable knowledge of Python. ArcGIS 9.2 ships with Python 2.4.1.
  • 5. Component Object Model COM is a protocol that connects one software component with another. These software components under COM are called objects. Different types of objects exists which are used for variety of purposes. So which object is used for Python/Geoprocessing(Scripting)? Geoprocessor object exposes ArcGIS toolbox (geoprocessing functions) to Python. This object provides a single access point to the toolbox. It has methods and properties like any other object, using which powerful things can be done. Geoprocessor Object So much can be done
  • 6. Geoprocessing (What is it?) In simple words, it is the processing of geographic information to create new useful information (example: used for analysis). The fundamental purpose of geoprocessing is to allow you to automate your GIS tasks So how would you want to process geographic information? Consider the following: Suppose you have few ASCII files and want to convert them all into a single polygon shapefile. You might also be interested in obtaining a polyline shapefile from the generated polygon. Some of you may point out, it can be done manually using the toolboxes in ArcMap . True . You can process the ASCII files for a specific purpose (like generating the polygon feature). But, it does require you to use number of geoprocessing functions (in a specific sequence) and therefore a number of steps must be performed to obtain the final polygon and polyline shapefile. See below for all the steps involved
  • 7. Manual Geoprocessing Steps: Open ArcToolbox. ArcToolbox / Conversion Tools / To Raster / ASCII to Raster. Repeat this process to convert all your ASCII (*.asc) files to Rasters. Merge all these raster files into one raster using ArcToolbox / Data Management Tools / Raster / Mosaic. When the process has completed, one of the rasters will be the merged version of all the rasters. Remove all but the merged raster from the map. ArcToolbox / Spatial Analyst Tools / Reclass / Reclassify. Click Classify… and set the number of classes to 1. The reclassified raster is added to the map. ArcToolbox / Conversion Tools / From Raster / Raster To Polygon When the process is complete, the polygon will be added to the map. Now consider, the above operation needs to be performed on daily or weekly basis on ASCII files corresponding to different areas. Or even better lets say you are going on vacation but want the process explained in the previous slide to be carried out while you are off. Someone will have to do all of this processing manually…..waste of time ??? It would be great if all this processing can be done automatically or can be scheduled to be carried out while you are away.
  • 8. Scripting to the rescue This is where scripting plays an important role. A script will need to be programmed once to automate the above mentioned procedure. The script can be run for creating the polygon and polyline shapefile and can be reused whenever such output is required. Imagine the amount of effort and time saved!
  • 9. Take a break! Make sure you have understood the above scenario and acknowledge the need for scripting. BUT!!!! Scripting is not applicable in all scenarios. Writing scripts can be time consuming process, so if scripting is not necessary don’t do it.
  • 10. Geoprocessor Object (Recep) Remember Geoprocessor object is an object that provides single access point to ArcGIS tool Box. It has methods and properties. Interation with the Geoprocessor is through these methods and objects. Example: createObject() method to create an object. Important: Geoprocessor Programming Model list all the properties and methods available.
  • 11. Geoprocessing Programming Model (Overall View) http://webhelp.esri.com/arcgisdesktop/9.2/pdf/Geoprocessor.pdf