<?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 Re: Python scripting access to SOMA and MOMA from 10.x in ArcGIS Spatial Analyst Questions</title>
    <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/python-scripting-access-to-soma-and-moma-from-10-x/m-p/583438#M8458</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have since discovered that this works. Just adding it here for the good of the thread&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14313042139716860 jive_text_macro" data-renderedposition="50_8_912_16" jivemacro_uid="_14313042139716860"&gt;&lt;P&gt;arcpy.gp.MultiOutputMapAlgebra_sa(cmd)&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 11 May 2015 00:30:18 GMT</pubDate>
    <dc:creator>curtvprice</dc:creator>
    <dc:date>2015-05-11T00:30:18Z</dc:date>
    <item>
      <title>Python scripting access to SOMA and MOMA from 10.x</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/python-scripting-access-to-soma-and-moma-from-10-x/m-p/583435#M8455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have an old script that uses MOMA and want to be able to run it at 10.x until I get around to doing it the new, (better) way.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;import arcpy...
import arcgisscripting
gp = arcgisscripting.create()
gp.MultiOutputMapAlgebra_sa()&amp;nbsp; # error ("&amp;lt;s&amp;gt; not found")&lt;/PRE&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and get an error that the tool does not exist.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The docs talk about legacy access to MOMA inside model tools, but is there a way to get to SOMA and MOMA in python?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 May 2010 18:21:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/python-scripting-access-to-soma-and-moma-from-10-x/m-p/583435#M8455</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2010-05-17T18:21:20Z</dc:date>
    </item>
    <item>
      <title>Re: Python scripting access to SOMA and MOMA from 10.x</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/python-scripting-access-to-soma-and-moma-from-10-x/m-p/583436#M8456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN&gt;Curtis,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The following script worked for me:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN&gt;import arcgisscripting&lt;/SPAN&gt;
&lt;SPAN&gt;gp = arcgisscripting.create()&lt;/SPAN&gt;

&lt;SPAN&gt;gp.checkoutextension("spatial")&lt;/SPAN&gt;

&lt;SPAN&gt;gp.workspace = "c:/temp/work"&lt;/SPAN&gt;
&lt;SPAN&gt;in_raster1 = "C:/sapyexamples/data/inRas1"&lt;/SPAN&gt;
&lt;SPAN&gt;in_raster2 = "C:/sapyexamples/data/inRas2"&lt;/SPAN&gt;

&lt;SPAN&gt;express1 = "out1 = " + in_raster1 + " + " + in_raster2&lt;/SPAN&gt;
&lt;SPAN&gt;gp.MultiOutputMapAlgebra_sa(express1)&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;A few points to consider when you run MOMA with arcgisscripting:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Control output workspace&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Check out spatial analyst license&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3. For MOMA expression, supply the output dataset name on the left side of '='.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Xuguang Wang&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 01:05:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/python-scripting-access-to-soma-and-moma-from-10-x/m-p/583436#M8456</guid>
      <dc:creator>XuguangWang</dc:creator>
      <dc:date>2021-12-12T01:05:06Z</dc:date>
    </item>
    <item>
      <title>Re: Python scripting access to SOMA and MOMA from 10.x</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/python-scripting-access-to-soma-and-moma-from-10-x/m-p/583437#M8457</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks, it looks like I had forgotten to check out the Spatial extension on my 9.3 geoprocessor object. (I had checked it out to my arcpy object in the test script -- and forgot to do the same for my "gp" object.)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It's working fine - good to have that legacy support while we move to the brave new world of arcpy -- just in case we need it!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 May 2010 21:28:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/python-scripting-access-to-soma-and-moma-from-10-x/m-p/583437#M8457</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2010-05-18T21:28:37Z</dc:date>
    </item>
    <item>
      <title>Re: Python scripting access to SOMA and MOMA from 10.x</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/python-scripting-access-to-soma-and-moma-from-10-x/m-p/583438#M8458</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have since discovered that this works. Just adding it here for the good of the thread&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14313042139716860 jive_text_macro" data-renderedposition="50_8_912_16" jivemacro_uid="_14313042139716860"&gt;&lt;P&gt;arcpy.gp.MultiOutputMapAlgebra_sa(cmd)&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 May 2015 00:30:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/python-scripting-access-to-soma-and-moma-from-10-x/m-p/583438#M8458</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2015-05-11T00:30:18Z</dc:date>
    </item>
  </channel>
</rss>

