<?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 Focal Statistics, memory issues after multiple calls in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/focal-statistics-memory-issues-after-multiple/m-p/1402254#M81108</link>
    <description>&lt;P&gt;I'm writing some code using python to call arcpy.&amp;nbsp;I found that after I called focalstatistics many times, arcgis pro would just crash and there was no record.&amp;nbsp;&lt;/P&gt;&lt;P&gt;My code is shown as follows, and self.smthc = 7, and factor is 500. Raster is just a DEM downloaded from USGS, and the resolution is 1m.&amp;nbsp;It's about 2,000 rows and 2,000 columns.&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;def &lt;/SPAN&gt;&lt;SPAN&gt;smoothDEM&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;self&lt;/SPAN&gt;, raster, factor&lt;SPAN&gt;)&lt;/SPAN&gt;:&lt;BR /&gt;    &lt;SPAN&gt;"""smooth the raster factor times"""&lt;BR /&gt;&lt;/SPAN&gt;    neighborhood = arcpy.sa.NbrRectangle&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;self&lt;/SPAN&gt;.smthc, &lt;SPAN&gt;self&lt;/SPAN&gt;.smthc, &lt;SPAN&gt;"CELL"&lt;/SPAN&gt;&lt;SPAN&gt;)  &lt;BR /&gt;&lt;/SPAN&gt;    smoothed_dem = raster&lt;BR /&gt;    &lt;SPAN&gt;for &lt;/SPAN&gt;i &lt;SPAN&gt;in &lt;/SPAN&gt;&lt;SPAN&gt;range&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;factor&lt;SPAN&gt;)&lt;/SPAN&gt;:&lt;BR /&gt;        smoothed_dem = arcpy.sa.FocalStatistics&lt;SPAN&gt;(&lt;/SPAN&gt;smoothed_dem, neighborhood, &lt;SPAN&gt;"MEAN"&lt;/SPAN&gt;, &lt;SPAN&gt;"DATA"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;BR /&gt;&lt;/SPAN&gt;    return smoothed_dem&lt;BR /&gt;&lt;BR /&gt;The recode from Windows Event Viewer is shown as follows,&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Faulting application name: ArcGISPro.exe, version: 3.2.2.49743, time stamp: 0x6216d2c0&lt;BR /&gt;Faulting module name: DADFLib.dll, version: 13.2.0.49743, time stamp: 0x652d8ad3&lt;BR /&gt;Exception code: 0xc00000fd&lt;BR /&gt;Fault offset: 0x0000000000027a04&lt;BR /&gt;Faulting process id: 0x7154&lt;BR /&gt;Faulting application start time: 0x01da814aaabdd4ec&lt;BR /&gt;Faulting application path: C:\Program Files\ArcGIS\Pro\bin\ArcGISPro.exe&lt;BR /&gt;Faulting module path: C:\Program Files\ArcGIS\Pro\bin\DADFLib.dll&lt;BR /&gt;Report Id: 03f47e51-7107-4a9f-80c1-ad9fc1f13fc8&lt;BR /&gt;Faulting package full name: &lt;BR /&gt;Faulting package-relative application ID: &lt;/PRE&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 28 Mar 2024 21:46:03 GMT</pubDate>
    <dc:creator>WeiMao</dc:creator>
    <dc:date>2024-03-28T21:46:03Z</dc:date>
    <item>
      <title>Focal Statistics, memory issues after multiple calls</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/focal-statistics-memory-issues-after-multiple/m-p/1402254#M81108</link>
      <description>&lt;P&gt;I'm writing some code using python to call arcpy.&amp;nbsp;I found that after I called focalstatistics many times, arcgis pro would just crash and there was no record.&amp;nbsp;&lt;/P&gt;&lt;P&gt;My code is shown as follows, and self.smthc = 7, and factor is 500. Raster is just a DEM downloaded from USGS, and the resolution is 1m.&amp;nbsp;It's about 2,000 rows and 2,000 columns.&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;def &lt;/SPAN&gt;&lt;SPAN&gt;smoothDEM&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;self&lt;/SPAN&gt;, raster, factor&lt;SPAN&gt;)&lt;/SPAN&gt;:&lt;BR /&gt;    &lt;SPAN&gt;"""smooth the raster factor times"""&lt;BR /&gt;&lt;/SPAN&gt;    neighborhood = arcpy.sa.NbrRectangle&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;self&lt;/SPAN&gt;.smthc, &lt;SPAN&gt;self&lt;/SPAN&gt;.smthc, &lt;SPAN&gt;"CELL"&lt;/SPAN&gt;&lt;SPAN&gt;)  &lt;BR /&gt;&lt;/SPAN&gt;    smoothed_dem = raster&lt;BR /&gt;    &lt;SPAN&gt;for &lt;/SPAN&gt;i &lt;SPAN&gt;in &lt;/SPAN&gt;&lt;SPAN&gt;range&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;factor&lt;SPAN&gt;)&lt;/SPAN&gt;:&lt;BR /&gt;        smoothed_dem = arcpy.sa.FocalStatistics&lt;SPAN&gt;(&lt;/SPAN&gt;smoothed_dem, neighborhood, &lt;SPAN&gt;"MEAN"&lt;/SPAN&gt;, &lt;SPAN&gt;"DATA"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;BR /&gt;&lt;/SPAN&gt;    return smoothed_dem&lt;BR /&gt;&lt;BR /&gt;The recode from Windows Event Viewer is shown as follows,&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Faulting application name: ArcGISPro.exe, version: 3.2.2.49743, time stamp: 0x6216d2c0&lt;BR /&gt;Faulting module name: DADFLib.dll, version: 13.2.0.49743, time stamp: 0x652d8ad3&lt;BR /&gt;Exception code: 0xc00000fd&lt;BR /&gt;Fault offset: 0x0000000000027a04&lt;BR /&gt;Faulting process id: 0x7154&lt;BR /&gt;Faulting application start time: 0x01da814aaabdd4ec&lt;BR /&gt;Faulting application path: C:\Program Files\ArcGIS\Pro\bin\ArcGISPro.exe&lt;BR /&gt;Faulting module path: C:\Program Files\ArcGIS\Pro\bin\DADFLib.dll&lt;BR /&gt;Report Id: 03f47e51-7107-4a9f-80c1-ad9fc1f13fc8&lt;BR /&gt;Faulting package full name: &lt;BR /&gt;Faulting package-relative application ID: &lt;/PRE&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 28 Mar 2024 21:46:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/focal-statistics-memory-issues-after-multiple/m-p/1402254#M81108</guid>
      <dc:creator>WeiMao</dc:creator>
      <dc:date>2024-03-28T21:46:03Z</dc:date>
    </item>
  </channel>
</rss>

