<?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: Terrain to Raster Out of Memory Error in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/terrain-to-raster-out-of-memory-error/m-p/374878#M12859</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: leonardlluz&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks Curt!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can't answer your question regarding the raster size since I'm just converting a terrain dataset to raster and the tool doesn't finish processing. However, it produced an incomplete DEM with this dim 19743 x 38266.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When we try to run it in a different machine (specs is much lower Quad-core, 4 gb mem, 32-bit), it completed successfully. I'm not sure if this is about hardware or memory leaks, etc.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 27 Feb 2014 23:21:30 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2014-02-27T23:21:30Z</dc:date>
    <item>
      <title>Terrain to Raster Out of Memory Error</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/terrain-to-raster-out-of-memory-error/m-p/374876#M12857</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: leonardlluz&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;A little background of my problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a terrain dataset which I want to convert into raster to get the DEM. However, I keep on receiving a generic error which tells me about out of memory problem. I tried it on 2 other machines with the same tech specs and ArcGIS build as mine but I still got the same error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is this a bug in 10.2? I attached a screenshot of the error message and the specs of my workstation. Any help would be greatly appreciated. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-Leonard&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]31810[/ATTACH][ATTACH=CONFIG]31811[/ATTACH]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Feb 2014 01:50:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/terrain-to-raster-out-of-memory-error/m-p/374876#M12857</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2014-02-27T01:50:31Z</dc:date>
    </item>
    <item>
      <title>Re: Terrain to Raster Out of Memory Error</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/terrain-to-raster-out-of-memory-error/m-p/374877#M12858</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I tried it on 2 other machines with the same tech specs and ArcGIS build as mine but I still got the same error.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How big a raster are you trying to create (rows x columns)?&amp;nbsp; I would try setting the environment to a smaller GP extent, and see if it will work if you limit the processing area. You may have to do it in pieces and use the Mosaic tool to build your output (assuming you want it all in one raster, not always the best approach for large rasters).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;An Esri grid of that size would be of the uncompressed size &amp;lt;rows&amp;gt; x &amp;lt;columns&amp;gt; x 4 / (1024 * 1024) megabytes.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Feb 2014 14:39:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/terrain-to-raster-out-of-memory-error/m-p/374877#M12858</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2014-02-27T14:39:40Z</dc:date>
    </item>
    <item>
      <title>Re: Terrain to Raster Out of Memory Error</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/terrain-to-raster-out-of-memory-error/m-p/374878#M12859</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: leonardlluz&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks Curt!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can't answer your question regarding the raster size since I'm just converting a terrain dataset to raster and the tool doesn't finish processing. However, it produced an incomplete DEM with this dim 19743 x 38266.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When we try to run it in a different machine (specs is much lower Quad-core, 4 gb mem, 32-bit), it completed successfully. I'm not sure if this is about hardware or memory leaks, etc.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Feb 2014 23:21:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/terrain-to-raster-out-of-memory-error/m-p/374878#M12859</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2014-02-27T23:21:30Z</dc:date>
    </item>
    <item>
      <title>Re: Terrain to Raster Out of Memory Error</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/terrain-to-raster-out-of-memory-error/m-p/374879#M12860</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I can't answer your question regarding the raster size since I'm just converting a terrain dataset to raster and the tool doesn't finish processing. However, it produced an incomplete DEM with this dim 19743 x 38266&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can calculate the rows and columns from the extent in the python window, for example if your cell size is 30:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
e = arcpy.Describe("myinput").Extent
print e.width / 30, e.height / 30
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I believe you are hitting the 2.1GB wall:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; 19743 * 38266 * 4 / ( 1024. ** 2)
2881.9489974975586&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When you get beyond 2.1G when you try to write this to a single file (.tif) you can hit the 32-bit operating system limit and the tool will fail. (Grids are unlimited in size as they tile into separate &amp;lt;2.1G pieces).&amp;nbsp; There is also sometimes an issue with needing more memory, especially for operations like Terrain to raster. It may help to run this in the background (if 64 bit geoprocessing is installed: 10.1 SP1 or later).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;A neat trick to use when saving to tiff is to integerize the output as it is compressed size that counts toward the 2.1G file size limit -- elevation surfaces often compress well.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Again, the solution is to process in smaller chunks and Mosaic them together. If there is memory swapping involved, it may work faster in smaller pieces anyway (I'm talking 10x or more faster).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 17:20:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/terrain-to-raster-out-of-memory-error/m-p/374879#M12860</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2021-12-11T17:20:51Z</dc:date>
    </item>
    <item>
      <title>Re: Terrain to Raster Out of Memory Error</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/terrain-to-raster-out-of-memory-error/m-p/374880#M12861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: leonardlluz&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;A neat trick to use when saving to tiff is to integerize the output as it is compressed size that counts toward the 2.1G file size limit -- elevation surfaces often compress well.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This is very helpful Curt! Thank you so much. When you say integerize the output, is there a way to do this trick using ArcMap/ArcCatalog? Pardon me but I'm not really familiar with this method.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Mar 2014 23:00:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/terrain-to-raster-out-of-memory-error/m-p/374880#M12861</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2014-03-03T23:00:30Z</dc:date>
    </item>
    <item>
      <title>Re: Terrain to Raster Out of Memory Error</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/terrain-to-raster-out-of-memory-error/m-p/374881#M12862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;When you say integerize the output, is there a way to do this trick using ArcMap/ArcCatalog? &lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There is a tool to integerize rasters: Int. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can round the data by using that tool inside the Raster Calculator. Integerizing the data (and thus improving the compression) may be the only way you can create a .tif file that is less tha 2.1G so that ArcMap (32-bit) can read it. Again, tiling your data should be considered when pass that 2.1G "wall."&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-family:Courier New;"&gt;Int("floatgrid" + 0.5)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you need more detail (say, hundredths in the Z) a trick is to scale your data so you can store it as integer, as long as you remember to use a Z factor of .01 (assuming your XY units are the same as Z) for tools that need it like the Slope tool.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-family:Courier New;"&gt;Int("floatgrid" * 100 + 0.5)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Mar 2014 13:36:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/terrain-to-raster-out-of-memory-error/m-p/374881#M12862</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2014-03-04T13:36:00Z</dc:date>
    </item>
    <item>
      <title>Re: Terrain to Raster Out of Memory Error</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/terrain-to-raster-out-of-memory-error/m-p/374882#M12863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: swalbridge&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This doesn't help with the question at hand, but I just wanted to mention that the problem probably isn't the size of the TIFF -- ArcGIS &lt;/SPAN&gt;&lt;A href="http://support.esri.com/en/knowledgebase/techarticles/detail/26315"&gt;has supported BIGTIFF&lt;/A&gt;&lt;SPAN&gt; since ArcGIS 10.0, and can write TIFF files of virtually unlimited size.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Mar 2014 00:13:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/terrain-to-raster-out-of-memory-error/m-p/374882#M12863</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2014-03-07T00:13:02Z</dc:date>
    </item>
    <item>
      <title>Re: Terrain to Raster Out of Memory Error</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/terrain-to-raster-out-of-memory-error/m-p/374883#M12864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm still stuck with this problem and one thing I'm suspecting as the cause is a memory leak. Upon running the tool, ArcCatalog consumes up to 5gb of my RAM until the tool fails. I can't find any other similar cases over the net either. Any thoughts are very much welcome.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Mar 2014 04:32:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/terrain-to-raster-out-of-memory-error/m-p/374883#M12864</guid>
      <dc:creator>LeonardLuz3</dc:creator>
      <dc:date>2014-03-07T04:32:35Z</dc:date>
    </item>
    <item>
      <title>Re: Terrain to Raster Out of Memory Error</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/terrain-to-raster-out-of-memory-error/m-p/374884#M12865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: swalbridge&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you want to try and get the whole terrain to run at once, a good starter option would be this option:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;arcpy.env.terrainMemoryUsage = True&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//001w0000003t000000"&gt;mentioned in the documentation&lt;/A&gt;&lt;SPAN&gt;, this will work to minimize memory usage.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Alternatively: you could use background processing to do the job, which can take advantage of your entire memory space, and not the rather small portion available to a 32-bit foreground task. Failing the two options above, you can do what Curtis suggested earlier in this thread, and do the conversion on pieces of the Terrain (instead of the whole thing at once). This can be accomplished by partitioning up the terrain into smaller areas for analysis, using something like a fishnet to define each 'slice', and then combining them at the end of the process. But I'd try the first two options first.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Shaun&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Mar 2014 00:50:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/terrain-to-raster-out-of-memory-error/m-p/374884#M12865</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2014-03-29T00:50:55Z</dc:date>
    </item>
  </channel>
</rss>

