<?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: Merging rasters and keep raster table fields in ArcGIS Spatial Analyst Questions</title>
    <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/merging-rasters-and-keep-raster-table-fields/m-p/142508#M2041</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you for the explanation and the suggestion for stand alone tables.&amp;nbsp; The stand alone tables are working, just another step or two in the process.&amp;nbsp; I also found the suggestions for stand alone tables on another post.&amp;nbsp; So it sounds as if I'd be better off by making all of the VAts with descriptive attributes stand alone, then join them as needed when combining the GIRDs.&amp;nbsp; Actually only one of the inputs is raster to begin with, everything else is Vector.&amp;nbsp; Its just that when we converted the raster to vector, then tried to overlay it with other vector data, the process blew up after a few hours&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 May 2014 17:55:23 GMT</pubDate>
    <dc:creator>DianeMcConnaughey</dc:creator>
    <dc:date>2014-05-15T17:55:23Z</dc:date>
    <item>
      <title>Merging rasters and keep raster table fields</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/merging-rasters-and-keep-raster-table-fields/m-p/142504#M2037</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Having the ability to use attributes in Raster Calculator would be really nice,&amp;nbsp; why was it taken away?&amp;nbsp; I don't care if it is the old "dot" syntax or some other syntax. Please bring it back, soon.&amp;nbsp;&amp;nbsp; I need to merge/mosic 11 GRIDs which presumably do not overlap, but might a little around the edges as as artifact of how they were created.&amp;nbsp;&amp;nbsp; Mosaic does not let me use an item either.&amp;nbsp; Two text items have to be used for the desisred attributes in the GRIDs.&amp;nbsp; So&amp;nbsp; I've concatenated the two fields into a new field, then added added a new field for an integer crosswalk of the concatenated fields. I plan to mosaic the GRIDs after adding &amp;amp; calculating the two new fields in all of them, thne using the "lookup" function to create new grids with value = newfield, hten mosaic.&amp;nbsp; What a lot of work.&amp;nbsp;&amp;nbsp; Is there an easier way ? ( speaking of merge, the merge function was really nice too, why was it disappeared?)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jun 2013 20:25:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/merging-rasters-and-keep-raster-table-fields/m-p/142504#M2037</guid>
      <dc:creator>DianeMcConnaughey</dc:creator>
      <dc:date>2013-06-19T20:25:51Z</dc:date>
    </item>
    <item>
      <title>Re: Raster Calculator trouble</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/merging-rasters-and-keep-raster-table-fields/m-p/142505#M2038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Having the ability to use attributes in Raster Calculator would be really nice,&amp;nbsp; why was it taken away?&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;The &lt;STRONG&gt;Lookup&lt;/STRONG&gt; function is the new way to do it. The redesign of the Raster Calculator tool at 10.x was a retooling that allowed a single syntax (arcpy map algebra) to work across ArcGIS. At 9.x, we had SOMA, MOMA, Raster Calculator, the command line, and tool interface. Each of these had a different syntax (for example, SOMA did not support "dot" syntax), and Raster Calculator even had its own unique geoprocessing environment(!). So going forward I think it is an improvement, although there is a learning curve.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;the merge function was really nice too, why was it disappeared?)&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The &lt;STRONG&gt;Merge&lt;/STRONG&gt; and &lt;STRONG&gt;Mosaic&lt;/STRONG&gt; tools were combined. In some situations, I have found &lt;STRONG&gt;Cell Statistics&lt;/STRONG&gt; useful to merge datasets together.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I need to [mosaic] 11 GRIDs which presumably do not overlap, but might a little around the edges as as artifact of how they were created.&amp;nbsp;&amp;nbsp; Mosaic does not let me use an item either.&amp;nbsp; Two text items have to be used for the desisred attributes in the GRIDs.&amp;nbsp; So&amp;nbsp; I've concatenated the two fields into a new field, then added added a new field for an integer crosswalk of the concatenated fields. I plan to mosaic the GRIDs after adding &amp;amp; calculating the two new fields in all of them, thne using the "lookup" function to create new grids with value = newfield, hten mosaic.&amp;nbsp; What a lot of work.&amp;nbsp;&amp;nbsp; Is there an easier way ?&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If your raster codes are not unique (ie value 2 means different things for two of your 11 rasters) you do have a sticky processing problem. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The best way I can think is to convert your 11 rasters so all cells are unique across the&amp;nbsp; 11 rasters and mosaic them, then join your attributes back in. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Step 1. Set up your value in each VAT&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN&gt;NEWVAL = [VALUE] + 1000&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Step 2. Copy all your raster attribute tables to standalone tables (you could use Copy Rows in a iterator model), and join them all together with the Merge tool.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Step 3. Convert your rasters to these values and mosaic them:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN&gt;ras1 = "grid1" + 1000&lt;/SPAN&gt;
&lt;SPAN&gt;ras2 = "grid2" + 2000&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Mosaic To New Raster to merge ras1-ras11&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Step 4. Join Field your new mosaicked raster's RAT to the table created in step 2.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;An entirely different approach that may work is this. May be easiest in the Python window:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1. Set the extent to cover all 11 rasters&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2. For all 11 rasters, over the entire extent, convert nodata to a missing value (say, zero):&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN&gt;x1 = Con(IsNull("grid1"),0,"grid1")&lt;/SPAN&gt;
&lt;SPAN&gt;x2 = Con(IsNull("grid2"),0,"grid1")&lt;/SPAN&gt;
&lt;SPAN&gt;...&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;3. Combine these together. You'll get a pretty wide RAT with 11 fields that match VALUE in your 11 raster tables included.&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN&gt;Combine(x1,x2... x11)&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;4. Add your text fields to this combined raster.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;5. One by one, select for each of your fields ("RAS11" &amp;lt;&amp;gt; 0), add join and calc over your text fields, remove join.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Hope this helps!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:51:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/merging-rasters-and-keep-raster-table-fields/m-p/142505#M2038</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2021-12-11T07:51:00Z</dc:date>
    </item>
    <item>
      <title>Re: Merging rasters and keep raster table fields</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/merging-rasters-and-keep-raster-table-fields/m-p/142506#M2039</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is this also the solution for a simple combine with rasters with descriptive attributes?&amp;nbsp; I need to combine/overlay 8 or 9 rasters.&amp;nbsp; The combine works fine, but I lose the descriptive attributes, and have to get them back into the combined grid with a Join operation.&amp;nbsp; A little tedious, but it works, usually.&amp;nbsp; I just had a join fail.&amp;nbsp; It added all the fields a join would add, but the records were all NULL for the joined items.&amp;nbsp; So I did a virtual join, and calculated the null values to the the values in the joined table.&amp;nbsp; I would do this in vector, but it keeps blowing up (maybe it is the network here, but this also happens on a local drive).&amp;nbsp;&amp;nbsp; Only one of the datasets started out as raster, which was vectorized, but doing these as polygons fails, immediately or after several hours.&amp;nbsp;&amp;nbsp; So the vector data all had to be rasterized. Combing the rasters takes about 2 minutes.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 May 2014 16:39:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/merging-rasters-and-keep-raster-table-fields/m-p/142506#M2039</guid>
      <dc:creator>DianeMcConnaughey</dc:creator>
      <dc:date>2014-05-15T16:39:37Z</dc:date>
    </item>
    <item>
      <title>Re: Merging rasters and keep raster table fields</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/merging-rasters-and-keep-raster-table-fields/m-p/142507#M2040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Is this also the solution for a simple combine with rasters with descriptive attributes?&amp;nbsp; ...&amp;nbsp; Combining the rasters takes about 2 minutes.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The Spatial Analyst tools are designed to work with the main cell values (Value attribute). This allows for the most efficient storage and analysis of raster data, for example complex map algebra expressions can do very sophisticated things (using three or more tools nested using the Raster Calcualtor tool) very easily. (This is why the combine takes only two minutes!) Because of this design approach, if you have descriptive attributes, the best way to work with them is as standalone tables.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For example, export the raster table from your Combine output raster to a standalone table, join to each of your input tables to make a big wide joined table, and then use the Merge tool to create a table that has all the attributes you want to access together. (you could join this to your raster if you want, but why not keep it by itself?)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;An easier [but less efficient] workflow to just tack on a few attributes back on to the VAT is to use the Join Field tool (as I described above), but in general I like to keep the tabular data separate from my raster so I don't have to worry about having to another join after the next step.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There used to be a neat tool called MERGEVAT in ArcInfo Workstation GRID ... but honestly the general approach of handling the tabular data separately is less painful.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 May 2014 17:48:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/merging-rasters-and-keep-raster-table-fields/m-p/142507#M2040</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2014-05-15T17:48:13Z</dc:date>
    </item>
    <item>
      <title>Re: Merging rasters and keep raster table fields</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/merging-rasters-and-keep-raster-table-fields/m-p/142508#M2041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you for the explanation and the suggestion for stand alone tables.&amp;nbsp; The stand alone tables are working, just another step or two in the process.&amp;nbsp; I also found the suggestions for stand alone tables on another post.&amp;nbsp; So it sounds as if I'd be better off by making all of the VAts with descriptive attributes stand alone, then join them as needed when combining the GIRDs.&amp;nbsp; Actually only one of the inputs is raster to begin with, everything else is Vector.&amp;nbsp; Its just that when we converted the raster to vector, then tried to overlay it with other vector data, the process blew up after a few hours&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 May 2014 17:55:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/merging-rasters-and-keep-raster-table-fields/m-p/142508#M2041</guid>
      <dc:creator>DianeMcConnaughey</dc:creator>
      <dc:date>2014-05-15T17:55:23Z</dc:date>
    </item>
    <item>
      <title>Re: Merging rasters and keep raster table fields</title>
      <link>https://community.esri.com/t5/arcgis-spatial-analyst-questions/merging-rasters-and-keep-raster-table-fields/m-p/142509#M2042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Diane, check out this document I just posted this weekend:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/docs/DOC-5821"&gt;Implementing merge() in ArcPy map algebra&lt;/A&gt;​&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 May 2015 01:23:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-spatial-analyst-questions/merging-rasters-and-keep-raster-table-fields/m-p/142509#M2042</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2015-05-03T01:23:22Z</dc:date>
    </item>
  </channel>
</rss>

