<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Is it possible to configure SA in a Python script? in ArcGIS Spatial Analyst Questions</title>
    <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/is-it-possible-to-configure-sa-in-a-python-script/m-p/243943#M3419</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;Dear all,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I have to perform map algebra operations on rasters that have different extents, and I want to obtain an output on the union of the extents. I am doing this in a Python script; is there a way to configure Spatial Analyst output extent to "Union of Inputs" by calling a geoprocessor method from my script?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you and best regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Cedric&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;ArcGIS Desktop 9.3.1, ArcInfo license.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 26 Nov 2010 20:12:09 GMT</pubDate>
    <dc:creator>CedricWannaz</dc:creator>
    <dc:date>2010-11-26T20:12:09Z</dc:date>
    <item>
      <title>Is it possible to configure SA in a Python script?</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/is-it-possible-to-configure-sa-in-a-python-script/m-p/243943#M3419</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;Dear all,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I have to perform map algebra operations on rasters that have different extents, and I want to obtain an output on the union of the extents. I am doing this in a Python script; is there a way to configure Spatial Analyst output extent to "Union of Inputs" by calling a geoprocessor method from my script?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you and best regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Cedric&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;ArcGIS Desktop 9.3.1, ArcInfo license.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Nov 2010 20:12:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/is-it-possible-to-configure-sa-in-a-python-script/m-p/243943#M3419</guid>
      <dc:creator>CedricWannaz</dc:creator>
      <dc:date>2010-11-26T20:12:09Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to configure SA in a Python script?</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/is-it-possible-to-configure-sa-in-a-python-script/m-p/243944#M3420</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Cedric&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I haven't had much time to explore all the intricacies of arcpy but you could begin by exploring sa&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&amp;gt; from arcpy import sa&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&amp;gt; help(sa.Extent)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;provides some clues, if you know the extent that you need, then you can set it&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Nov 2010 20:19:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/is-it-possible-to-configure-sa-in-a-python-script/m-p/243944#M3420</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2010-11-26T20:19:56Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to configure SA in a Python script?</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/is-it-possible-to-configure-sa-in-a-python-script/m-p/243945#M3421</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Dan,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thank you for your answer. Do you know how to do it with the 9.3.1 geoprocessor? I don't have ArcGIS 10 yet, and I am not sure how to access spatial analyst (dedicated-) properties when using the arcgisscripting pyd.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cedric&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Nov 2010 21:13:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/is-it-possible-to-configure-sa-in-a-python-script/m-p/243945#M3421</guid>
      <dc:creator>CedricWannaz</dc:creator>
      <dc:date>2010-11-26T21:13:58Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to configure SA in a Python script?</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/is-it-possible-to-configure-sa-in-a-python-script/m-p/243946#M3422</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Sorry Cedric, don't have a 9.3.x installation here, acrpy does open up a whole new world which didn't exist in previous versions.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Nov 2010 22:07:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/is-it-possible-to-configure-sa-in-a-python-script/m-p/243946#M3422</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2010-11-26T22:07:25Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to configure SA in a Python script?</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/is-it-possible-to-configure-sa-in-a-python-script/m-p/243947#M3423</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;You may need to review the environement settings for extent.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?id=2237&amp;amp;pid=2229&amp;amp;topicname=Output_extent" rel="nofollow noopener noreferrer" target="_blank"&gt;http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?id=2237&amp;amp;pid=2229&amp;amp;topicname=Output_extent&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;also for Map Algebra in 9.3&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?id=6311&amp;amp;pid=6308&amp;amp;topicname=Single_Output_Map_Algebra" rel="nofollow noopener noreferrer" target="_blank"&gt;http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?id=6311&amp;amp;pid=6308&amp;amp;topicname=Single_Output_Map_Algebra&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;for example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN&gt;gp = arcgisscripting.create(9.3)&lt;/SPAN&gt;
&lt;SPAN&gt;gp.workspace = "C:/workspace"&lt;/SPAN&gt;
&lt;SPAN&gt;gp.Extent = "MAXOF"&lt;/SPAN&gt;
&lt;SPAN&gt;inExpresson = "C:\data\rasterA + C:\data\rasterB"&lt;/SPAN&gt;
&lt;SPAN&gt;gp.SingleOutPutMapalgebra_sa(inExpression,"outRaster")&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Good luck&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Ryan&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:11:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/is-it-possible-to-configure-sa-in-a-python-script/m-p/243947#M3423</guid>
      <dc:creator>RyanDeBruyn</dc:creator>
      <dc:date>2021-12-11T12:11:08Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to configure SA in a Python script?</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/is-it-possible-to-configure-sa-in-a-python-script/m-p/243948#M3424</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's the 10.x flavor of this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
from arcpy.sa import *
arcpy.env.workspace = r"C:\Workspace"
&lt;SPAN style="font-size: 9pt; line-height: 12pt;"&gt;arcpy.env.extent = "MAXOF"&lt;/SPAN&gt;
outRaster =&amp;nbsp; Raster(r"C:\data\rasterA") + Raster(r"C:\data\rasterB" )
outRaster.save("outRaster")&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://desktop.arcgis.com/en/arcmap/latest/tools/environments/output-extent.htm" title="http://desktop.arcgis.com/en/arcmap/latest/tools/environments/output-extent.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;Output Extent (Environment setting)—Help | ArcGIS for Desktop&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:11:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/is-it-possible-to-configure-sa-in-a-python-script/m-p/243948#M3424</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2021-12-11T12:11:10Z</dc:date>
    </item>
  </channel>
</rss>

