<?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: Running multiple Spatial Analyst processes in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/running-multiple-spatial-analyst-processes/m-p/737220#M57047</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Dan Patterson:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hmmm some questions&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;where is in_raster defined?&lt;/LI&gt;&lt;LI&gt;where is segments defined?&lt;/LI&gt;&lt;LI&gt;what are you going to call the output file?&lt;/LI&gt;&lt;LI&gt;is your environment location defined somewhere?&lt;/LI&gt;&lt;LI&gt;What do you to call you output files?&lt;/LI&gt;&lt;LI&gt;are you satisfied just to have a changing number appended to a base filename?&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;That's all for now&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in_raster, seg_raster, and the output file (segements) are defined in the script before the three lines I provided. They are simple file locations on the local disk (e.g., D:\\path\\to\\dir\\raster.img)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which environment settings are you referring to?&amp;nbsp; I have experimented with setting arcpy.env.workspace and scratchWorkspace.&amp;nbsp; I assume the scratch workspace should be different for each process?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The output files need to be named based on the input file, not an incrementing number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Sep 2015 15:25:22 GMT</pubDate>
    <dc:creator>EvanBlaisdell</dc:creator>
    <dc:date>2015-09-22T15:25:22Z</dc:date>
    <item>
      <title>Running multiple Spatial Analyst processes</title>
      <link>https://community.esri.com/t5/python-questions/running-multiple-spatial-analyst-processes/m-p/737218#M57045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello.&amp;nbsp; I am using a Python script to run the SegmentMeanShift tool of Spatial Analyst, via arcpy:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;arcpy.CheckOutExtension("Spatial")&lt;/P&gt;&lt;P&gt;seg_raster = SegmentMeanShift(in_raster, "20", "15", "10")&lt;/P&gt;&lt;P&gt;seg_raster.save(segments)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Running one instance of the tool works just fine.&amp;nbsp; However, calling a new instance (on a different dataset) immediately fails.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone know how to successfully kick off multiple processes?&amp;nbsp; It needs to be such that the script is called independently for each dataset (i.e., I can't know ahead of time how many datasets I will need to process; a second, or third, etc., process may be called at any time after the first one).&amp;nbsp; Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Sep 2015 14:47:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/running-multiple-spatial-analyst-processes/m-p/737218#M57045</guid>
      <dc:creator>EvanBlaisdell</dc:creator>
      <dc:date>2015-09-22T14:47:18Z</dc:date>
    </item>
    <item>
      <title>Re: Running multiple Spatial Analyst processes</title>
      <link>https://community.esri.com/t5/python-questions/running-multiple-spatial-analyst-processes/m-p/737219#M57046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hmmm some questions&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;where is in_raster defined?&lt;/LI&gt;&lt;LI&gt;where is segments defined?&lt;/LI&gt;&lt;LI&gt;what are you going to call the output file?&lt;/LI&gt;&lt;LI&gt;is your environment location defined somewhere?&lt;/LI&gt;&lt;LI&gt;What do you to call you output files?&lt;/LI&gt;&lt;LI&gt;are you satisfied just to have a changing number appended to a base filename?&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;That's all for now&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Sep 2015 15:13:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/running-multiple-spatial-analyst-processes/m-p/737219#M57046</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-09-22T15:13:47Z</dc:date>
    </item>
    <item>
      <title>Re: Running multiple Spatial Analyst processes</title>
      <link>https://community.esri.com/t5/python-questions/running-multiple-spatial-analyst-processes/m-p/737220#M57047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Dan Patterson:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hmmm some questions&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;where is in_raster defined?&lt;/LI&gt;&lt;LI&gt;where is segments defined?&lt;/LI&gt;&lt;LI&gt;what are you going to call the output file?&lt;/LI&gt;&lt;LI&gt;is your environment location defined somewhere?&lt;/LI&gt;&lt;LI&gt;What do you to call you output files?&lt;/LI&gt;&lt;LI&gt;are you satisfied just to have a changing number appended to a base filename?&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;That's all for now&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in_raster, seg_raster, and the output file (segements) are defined in the script before the three lines I provided. They are simple file locations on the local disk (e.g., D:\\path\\to\\dir\\raster.img)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which environment settings are you referring to?&amp;nbsp; I have experimented with setting arcpy.env.workspace and scratchWorkspace.&amp;nbsp; I assume the scratch workspace should be different for each process?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The output files need to be named based on the input file, not an incrementing number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Sep 2015 15:25:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/running-multiple-spatial-analyst-processes/m-p/737220#M57047</guid>
      <dc:creator>EvanBlaisdell</dc:creator>
      <dc:date>2015-09-22T15:25:22Z</dc:date>
    </item>
    <item>
      <title>Re: Running multiple Spatial Analyst processes</title>
      <link>https://community.esri.com/t5/python-questions/running-multiple-spatial-analyst-processes/m-p/737221#M57048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok it would be best to provide code sample you are working with so that it can be incorporated within a for loop&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Sep 2015 15:33:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/running-multiple-spatial-analyst-processes/m-p/737221#M57048</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-09-22T15:33:48Z</dc:date>
    </item>
  </channel>
</rss>

