<?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: arcpy and Combineraster (arcpy.gp.Combine_sa) in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcpy-and-combineraster-arcpy-gp-combine-sa/m-p/1118417#M63012</link>
    <description>&lt;P&gt;Maybe you're right about that. The one thing thats suggest something else is that when I run this code embedded in FME-script on FME-server with ArcGIS 10.3 installed i got no problem.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have specified column names in a json-structure. I use this json specification both when I read the combineRaster and when I write outcome vat-table. It work perfectly.&amp;nbsp;&lt;/P&gt;&lt;P&gt;{'tblColsVat': {&lt;BR /&gt;'Value' : 'LONG',&lt;BR /&gt;'Count' : 'DOUBLE',&lt;BR /&gt;'NMD_COMBINE' : 'LONG',&lt;BR /&gt;'DosAreaRaster_r' : 'LONG'&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;Python:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;gt;&amp;gt; vatTable&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;'Combine_DOSOBJEKT_r_VAT'&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;gt;&amp;gt; vatColumns&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;['Count', 'DosAreaRaster_r', 'NMD_COMBINE', 'Value']&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A verification of vat-table in ArcMap:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2021-11-18_22-29-53.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/27847iB485619572100ADF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="2021-11-18_22-29-53.png" alt="2021-11-18_22-29-53.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Question&lt;/STRONG&gt;: If the names where truncated in the "in_memory\\combineRaster", how can I then access them with my json specification of fields? I.e. full length column names.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 18 Nov 2021 21:35:52 GMT</pubDate>
    <dc:creator>AndersMark</dc:creator>
    <dc:date>2021-11-18T21:35:52Z</dc:date>
    <item>
      <title>arcpy and Combineraster (arcpy.gp.Combine_sa)</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-and-combineraster-arcpy-gp-combine-sa/m-p/1118386#M63007</link>
      <description>&lt;P&gt;I got a strange problem that occur when I combine rasters in my pythoncode.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Say I have rasters "NMD_COMBINE", "DosAreaRaster_r" and the result ends up in "rasterOut".&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Call in code:&amp;nbsp;&lt;/STRONG&gt;&lt;EM&gt;arcpy.gp.Combine_sa(["NMD_COMBINE", "DosAreaRaster_r"],&amp;nbsp;"combineRaster")&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Actually all these rasters are "in_memory" so the actual path for all of them are :&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;"in_memory\\NMD_COMBINE"&lt;/LI&gt;&lt;LI&gt;"in_memory\\DosAreaRaster_r"&lt;/LI&gt;&lt;LI&gt;"in_memory\\combineRaster"&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;The call to combine is fine but the result is a little strange regarding the given column names in the "combineRaster".&amp;nbsp;&lt;/P&gt;&lt;P&gt;The first 3 column are standard: "OID", "Value", "Count". The other 2 for the combined rasters are:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;"NMD_COMBIN"&lt;/LI&gt;&lt;LI&gt;"gptmpraste"&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Look at the columns above! The first one has almost a correct name but are truncated to 10 characters. The second has a completely different name compared to the source but is also 10 chars long. Doesn't it look like it's also truncated and that an "r" is missing?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Question&lt;/STRONG&gt;: Why does this happen?&lt;/P&gt;&lt;P&gt;Normally this Pythoncode is embedded in FME-script but is now extracted and run i Arcmap 10.3 Python window.&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I run the exact same thing in ArcMap 10.7 the column names are correct in the combineRaster. Though I don't think it is the versions that make the difference in this case but what is? Something wrong with the installation? Environment variables?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Nov 2021 20:32:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-and-combineraster-arcpy-gp-combine-sa/m-p/1118386#M63007</guid>
      <dc:creator>AndersMark</dc:creator>
      <dc:date>2021-11-18T20:32:48Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy and Combineraster (arcpy.gp.Combine_sa)</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-and-combineraster-arcpy-gp-combine-sa/m-p/1118391#M63008</link>
      <description>&lt;P&gt;esri raster fields are truncated at 10 chars.&amp;nbsp; this has always been the case.&amp;nbsp; you could try a different raster output, like the recommended *.tif format&lt;/P&gt;</description>
      <pubDate>Thu, 18 Nov 2021 20:47:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-and-combineraster-arcpy-gp-combine-sa/m-p/1118391#M63008</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-11-18T20:47:24Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy and Combineraster (arcpy.gp.Combine_sa)</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-and-combineraster-arcpy-gp-combine-sa/m-p/1118399#M63009</link>
      <description>&lt;P&gt;Thanks but as I wrote, this is not true all the time. When I run the exact same code in ArcMap 10.7 the columns are created correctly.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2021-11-18_21-54-35.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/27841i2C9D06860FEE7FA7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="2021-11-18_21-54-35.png" alt="2021-11-18_21-54-35.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Thu, 18 Nov 2021 20:57:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-and-combineraster-arcpy-gp-combine-sa/m-p/1118399#M63009</guid>
      <dc:creator>AndersMark</dc:creator>
      <dc:date>2021-11-18T20:57:39Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy and Combineraster (arcpy.gp.Combine_sa)</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-and-combineraster-arcpy-gp-combine-sa/m-p/1118401#M63010</link>
      <description>&lt;P&gt;Probably been fixed post 10.3 (which is retired&amp;nbsp;&lt;A href="https://support.esri.com/en/Products/Desktop/arcgis-desktop/arcmap/10-8-1#product-support" target="_blank"&gt;Esri Support ArcMap 10.8 (10.8.1)&lt;/A&gt;&amp;nbsp;)&lt;/P&gt;</description>
      <pubDate>Thu, 18 Nov 2021 21:03:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-and-combineraster-arcpy-gp-combine-sa/m-p/1118401#M63010</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-11-18T21:03:06Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy and Combineraster (arcpy.gp.Combine_sa)</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-and-combineraster-arcpy-gp-combine-sa/m-p/1118417#M63012</link>
      <description>&lt;P&gt;Maybe you're right about that. The one thing thats suggest something else is that when I run this code embedded in FME-script on FME-server with ArcGIS 10.3 installed i got no problem.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have specified column names in a json-structure. I use this json specification both when I read the combineRaster and when I write outcome vat-table. It work perfectly.&amp;nbsp;&lt;/P&gt;&lt;P&gt;{'tblColsVat': {&lt;BR /&gt;'Value' : 'LONG',&lt;BR /&gt;'Count' : 'DOUBLE',&lt;BR /&gt;'NMD_COMBINE' : 'LONG',&lt;BR /&gt;'DosAreaRaster_r' : 'LONG'&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;Python:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;gt;&amp;gt; vatTable&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;'Combine_DOSOBJEKT_r_VAT'&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;gt;&amp;gt; vatColumns&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;['Count', 'DosAreaRaster_r', 'NMD_COMBINE', 'Value']&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A verification of vat-table in ArcMap:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2021-11-18_22-29-53.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/27847iB485619572100ADF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="2021-11-18_22-29-53.png" alt="2021-11-18_22-29-53.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Question&lt;/STRONG&gt;: If the names where truncated in the "in_memory\\combineRaster", how can I then access them with my json specification of fields? I.e. full length column names.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Nov 2021 21:35:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-and-combineraster-arcpy-gp-combine-sa/m-p/1118417#M63012</guid>
      <dc:creator>AndersMark</dc:creator>
      <dc:date>2021-11-18T21:35:52Z</dc:date>
    </item>
  </channel>
</rss>

