<?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 How to multithread a single function in arcpy? in Developers Questions</title>
    <link>https://community.esri.com/t5/developers-questions/how-to-multithread-a-single-function-in-arcpy/m-p/1144528#M6175</link>
    <description>&lt;P&gt;I have a huge DEM raster (more than 6 GB in size). I need to Process this raster through Hydrology toolset in ArcGIS (fill, flow direction, flow accumulation..etc).&amp;nbsp;&amp;nbsp;When trying to implement any of these analysis, normally it would take long hours of processing. I'm trying to make use of multithreading capabilities to shorten the analysis time.&lt;/P&gt;&lt;P&gt;After searching through the internet, I found practitioners usually split the raster into smaller chunks and process them in parallel manner which is a good idea. However, in my&lt;A href="https://www.olansipl.com/" target="_self"&gt;&amp;nbsp;&lt;/A&gt;Case that is not possible because hydrology analyses depends on pixel neighborhood and splitting raster would affect the analysis.&lt;/P&gt;&lt;P&gt;Given the function below:&lt;/P&gt;&lt;PRE&gt;import arcpy
from arcpy import env
from arcpy.sa import *


def fill_raster(path_to_input_raster,path_to_output_raster):
    outFill = Fill(path_to_input_raster)
    outFill.save(path_to_output_raster)&lt;/PRE&gt;&lt;P&gt;What is Required?&lt;/P&gt;&lt;P&gt;How can I multithread&amp;nbsp;fill_raster &amp;nbsp;function without splitting input raster into chunks?&lt;/P&gt;</description>
    <pubDate>Thu, 17 Feb 2022 13:50:37 GMT</pubDate>
    <dc:creator>STanveerPSL</dc:creator>
    <dc:date>2022-02-17T13:50:37Z</dc:date>
    <item>
      <title>How to multithread a single function in arcpy?</title>
      <link>https://community.esri.com/t5/developers-questions/how-to-multithread-a-single-function-in-arcpy/m-p/1144528#M6175</link>
      <description>&lt;P&gt;I have a huge DEM raster (more than 6 GB in size). I need to Process this raster through Hydrology toolset in ArcGIS (fill, flow direction, flow accumulation..etc).&amp;nbsp;&amp;nbsp;When trying to implement any of these analysis, normally it would take long hours of processing. I'm trying to make use of multithreading capabilities to shorten the analysis time.&lt;/P&gt;&lt;P&gt;After searching through the internet, I found practitioners usually split the raster into smaller chunks and process them in parallel manner which is a good idea. However, in my&lt;A href="https://www.olansipl.com/" target="_self"&gt;&amp;nbsp;&lt;/A&gt;Case that is not possible because hydrology analyses depends on pixel neighborhood and splitting raster would affect the analysis.&lt;/P&gt;&lt;P&gt;Given the function below:&lt;/P&gt;&lt;PRE&gt;import arcpy
from arcpy import env
from arcpy.sa import *


def fill_raster(path_to_input_raster,path_to_output_raster):
    outFill = Fill(path_to_input_raster)
    outFill.save(path_to_output_raster)&lt;/PRE&gt;&lt;P&gt;What is Required?&lt;/P&gt;&lt;P&gt;How can I multithread&amp;nbsp;fill_raster &amp;nbsp;function without splitting input raster into chunks?&lt;/P&gt;</description>
      <pubDate>Thu, 17 Feb 2022 13:50:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/how-to-multithread-a-single-function-in-arcpy/m-p/1144528#M6175</guid>
      <dc:creator>STanveerPSL</dc:creator>
      <dc:date>2022-02-17T13:50:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to multithread a single function in arcpy?</title>
      <link>https://community.esri.com/t5/developers-questions/how-to-multithread-a-single-function-in-arcpy/m-p/1144581#M6176</link>
      <description>&lt;P&gt;can you exploit in_memory workspace rather than writing to disk?&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/appendices/using-the-in-memory-output-workspace.htm" target="_blank"&gt;Considerations when using the in_memory workspace—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;And to keep watch on, only a few spatial analyst functions support gpu for now&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/spatial-analyst/gpu-processing-with-spatial-analyst.htm" target="_blank"&gt;GPU processing with Spatial Analyst—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Feb 2022 13:37:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/how-to-multithread-a-single-function-in-arcpy/m-p/1144581#M6176</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2022-02-16T13:37:45Z</dc:date>
    </item>
  </channel>
</rss>

