<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Michalis Avraam &#187; 9.3</title>
	<atom:link href="http://michalisavraam.org/tag/9-3/feed/" rel="self" type="application/rss+xml" />
	<link>http://michalisavraam.org</link>
	<description>intersecting space and time through gis endeavors</description>
	<lastBuildDate>Wed, 08 Sep 2010 20:03:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.3</generator>
		<item>
		<title>Python Geoprocessing in ArcGIS 9.2 vs. 9.3</title>
		<link>http://michalisavraam.org/2009/07/python-geoprocessing-in-arcgis-9-2-vs-9-3/</link>
		<comments>http://michalisavraam.org/2009/07/python-geoprocessing-in-arcgis-9-2-vs-9-3/#comments</comments>
		<pubDate>Fri, 17 Jul 2009 07:20:39 +0000</pubDate>
		<dc:creator>Michalis Avraam</dc:creator>
				<category><![CDATA[GIS* Points]]></category>
		<category><![CDATA[Python Geoprocessing]]></category>
		<category><![CDATA[Python Points]]></category>
		<category><![CDATA[9.2]]></category>
		<category><![CDATA[9.2 vs. 9.3]]></category>
		<category><![CDATA[9.3]]></category>
		<category><![CDATA[ArcGIS]]></category>
		<category><![CDATA[arcgisscripting]]></category>
		<category><![CDATA[geoprocessing]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://michalisavraam.org/?p=86</guid>
		<description><![CDATA[There are some fundamental differences between geoprocessing performed in ArcGIS version 9.2 and 9.3. While I will not cover them all in this post, I will attempt to show the most fundamental differences that people seem to encounter more often. The fundamental differences are as follows: The method of invoking the geoprocessor is very similar <a href='http://michalisavraam.org/2009/07/python-geoprocessing-in-arcgis-9-2-vs-9-3/'>[...]</a>


Related posts:<ol><li><a href='http://michalisavraam.org/2009/06/geoprocessing-iteration-with-python/' rel='bookmark' title='Permanent Link: Geoprocessing Iteration with Python'>Geoprocessing Iteration with Python</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>There are some fundamental differences between geoprocessing performed in ArcGIS version 9.2 and 9.3. While I will not cover them all in this post, I will attempt to show the most fundamental differences that people seem to encounter more often.<br />
<span id="more-86"></span><br />
The fundamental differences are as follows:</p>
<ol>
<li>The method of invoking the geoprocessor is very similar for both, with the exception of an optional parameters when creating the object.</li>
<li>Geoprocessing methods do not return Python built-in data types but rather ESRI iterable objects.</li>
<li>Methods that used to return True/False values now return the Python True or False object rather than a string or 0/1.</li>
</ol>
<p>The following table illustrates the differences:</p>
<table border="0">
<tbody>
<tr>
<th> ArcGIS version 9.2</th>
<th> ArcGIS version 9.3</th>
</tr>
<tr>
<td>
<pre class="brush: python; title: ;">
gp = arcgisscripting.create()
</pre>
</td>
<td valign="top">
<pre class="brush: python; title: ;">
gp = arcgisscripting.create(9.3)
</pre>
</td>
</tr>
<tr>
<td>
<pre class="brush: python; title: ;">
# Create a list of available feature classes
fcs = gp.ListFeatureClasses()
# Iterate through said feature classes
fcs.Reset()
fc = fcs.Next()
while fc:
    # Do work here
    fc = fcs.Next()
</pre>
</td>
<td valign="top">
<pre class="brush: python; title: ;">
# Create a list of available feature classes
fcs = gp.ListFeatureClasses()
# Iterate through said feature classes
for fc in fcs:
    # Do work here
</pre>
</td>
</tr>
<tr>
<td>
<pre class="brush: python; title: ;">
# Identify the fields of a feature class
dsc = gp.describe(fc)
# Get the fields from the description
flds = dsc.Fields
# Iterate through the fields
flds.Reset()
field = flds.Next()
while field:
    # Do work here
    field = flds.Next()
</pre>
</td>
<td valign="top">
<pre class="brush: python; title: ;">
# Identify the files of a feature class
dsc = gp.describe(fc)
# Get the fields from the description
flds = dsc.Fields
# Iterate through the fields
for field in flds:
    # Do work here
</pre>
</td>
</tr>
<tr>
<td>
<pre class="brush: python; title: ;">
# Tell the geoprocessor to overwrite output by default.
gp.OverWriteOutput = 1
</pre>
</td>
<td>
<pre class="brush: python; title: ;">
# Tell the geoprocessor to overwrite output by default
gp.OverWriteOutput = True
</pre>
</td>
</tr>
</tbody>
</table>
<p>There is not list of commands that need the changes to the best of my knowledge. But a quick look through the <a href="http://webhelp.esri.com/arcgisdesktop/9.2/pdf/Geoprocessor.pdf">Geoprocessor Programming Model for ArcGIS 9.2</a> can show which methods return an enumeration unit. In brief, ListDatasets, ListFeatureClasses, ListRasters, ListTables, ListWorkspaces, ListEnvironments, ListToolboxes, ListTools and all other methods that return an Array Object. For a complete listing of the changes, please read the ESRI document for <a href="http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=Differences_between_geoprocessor_versions">Geoprocessor changes in 9.3</a>.</p>
Note: There is a rating embedded within this post, please visit this post to rate it.


<p>Related posts:<ol><li><a href='http://michalisavraam.org/2009/06/geoprocessing-iteration-with-python/' rel='bookmark' title='Permanent Link: Geoprocessing Iteration with Python'>Geoprocessing Iteration with Python</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://michalisavraam.org/2009/07/python-geoprocessing-in-arcgis-9-2-vs-9-3/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

