<?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: How to overwrite a raster data? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/how-to-overwrite-a-raster-data/m-p/685250#M53051</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Unless I am mistaking your workflow,&lt;BR /&gt;You are starting with a raster (call it A)&lt;BR /&gt;and want an output raster we will call C&lt;BR /&gt;and need an intermediate raster we will call B&lt;BR /&gt;&lt;BR /&gt;so if you make B using B = Function(A),&lt;BR /&gt;and make C using C = AnotherFunction(B)&lt;BR /&gt;&lt;BR /&gt;you want to know why making B from A&lt;BR /&gt;and then deleting B before&lt;BR /&gt;making C from B&lt;BR /&gt;does not work?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;No. My workflow is &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Start with a raster (call A), and making an intermediate raster (call B1,B2,B3......) from A.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Then, I make another raster (call C1,C2,C3.....) from B1,B2,B3..... respectively.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;finally, i want an output raster (call D) is D = C1 + C2 + C3.....&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I delete Raster B1,B2,B3... after making C1,C2,C3... and before making D, the program does not work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I want to know why?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 29 Aug 2013 07:54:39 GMT</pubDate>
    <dc:creator>ZuoqiChen</dc:creator>
    <dc:date>2013-08-29T07:54:39Z</dc:date>
    <item>
      <title>How to overwrite a raster data?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-overwrite-a-raster-data/m-p/685246#M53047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="plain" name="code"&gt;
tempId = Raster(dsm_file)*0
tempId = SRTran.GetId(tempId)
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;the line 1 means that I create a empty raste, named tempId. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;and the line 2 means that i use the 'tempId' to do a Map algebra, and i hope the same raster file (e.g. 'tempId') can be used to store the return value. But actually, the raster can not be overwrited. How can i do?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Aug 2013 11:48:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-overwrite-a-raster-data/m-p/685246#M53047</guid>
      <dc:creator>ZuoqiChen</dc:creator>
      <dc:date>2013-08-27T11:48:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to overwrite a raster data?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-overwrite-a-raster-data/m-p/685247#M53048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am not sure what you are trying to do, but I don't think you can do it that way.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You cannot have the same raster on both sides of a map algebra statement.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Try making an intermediate raster, and using it on the left in line 1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;and on the right in line 2&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;One of the dreary things about map algebra is that you end up with a lot of intermediate rasters&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;which you have to (that is to say, really want to) clean up afterwards (or as you finish with each one).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Aug 2013 12:10:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-overwrite-a-raster-data/m-p/685247#M53048</guid>
      <dc:creator>markdenil</dc:creator>
      <dc:date>2013-08-27T12:10:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to overwrite a raster data?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-overwrite-a-raster-data/m-p/685248#M53049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I am not sure what you are trying to do, but I don't think you can do it that way.&lt;BR /&gt;You cannot have the same raster on both sides of a map algebra statement.&lt;BR /&gt;&lt;BR /&gt;Try making an intermediate raster, and using it on the left in line 1&lt;BR /&gt;and on the right in line 2&lt;BR /&gt;&lt;BR /&gt;One of the dreary things about map algebra is that you end up with a lot of intermediate rasters&lt;BR /&gt;which you have to (that is to say, really want to) clean up afterwards (or as you finish with each one).&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank u. I try used an intermediate raster,&amp;nbsp; and it has already been done!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But there is one more problem when i clean up the intermediate raster.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If i clean up it before output the final raster, the program will be closed by error when i output the raster. And IDLE did't output any messages.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If i clean up it after output the final raster, the program is work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Why?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Aug 2013 23:48:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-overwrite-a-raster-data/m-p/685248#M53049</guid>
      <dc:creator>ZuoqiChen</dc:creator>
      <dc:date>2013-08-27T23:48:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to overwrite a raster data?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-overwrite-a-raster-data/m-p/685249#M53050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Unless I am mistaking your workflow,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You are starting with a raster (call it A)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;and want an output raster we will call C&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;and need an intermediate raster we will call B&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;so if you make B using B = Function(A),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;and make C using C = AnotherFunction(B)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;you want to know why making B from A&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;and then deleting B before&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;making C from B&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;does not work?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Aug 2013 14:05:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-overwrite-a-raster-data/m-p/685249#M53050</guid>
      <dc:creator>markdenil</dc:creator>
      <dc:date>2013-08-28T14:05:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to overwrite a raster data?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-overwrite-a-raster-data/m-p/685250#M53051</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Unless I am mistaking your workflow,&lt;BR /&gt;You are starting with a raster (call it A)&lt;BR /&gt;and want an output raster we will call C&lt;BR /&gt;and need an intermediate raster we will call B&lt;BR /&gt;&lt;BR /&gt;so if you make B using B = Function(A),&lt;BR /&gt;and make C using C = AnotherFunction(B)&lt;BR /&gt;&lt;BR /&gt;you want to know why making B from A&lt;BR /&gt;and then deleting B before&lt;BR /&gt;making C from B&lt;BR /&gt;does not work?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;No. My workflow is &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Start with a raster (call A), and making an intermediate raster (call B1,B2,B3......) from A.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Then, I make another raster (call C1,C2,C3.....) from B1,B2,B3..... respectively.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;finally, i want an output raster (call D) is D = C1 + C2 + C3.....&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I delete Raster B1,B2,B3... after making C1,C2,C3... and before making D, the program does not work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I want to know why?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Aug 2013 07:54:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-overwrite-a-raster-data/m-p/685250#M53051</guid>
      <dc:creator>ZuoqiChen</dc:creator>
      <dc:date>2013-08-29T07:54:39Z</dc:date>
    </item>
  </channel>
</rss>

