<?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 Import Composite Raster Layer with arcpy in Mapping Questions</title>
    <link>https://community.esri.com/t5/mapping-questions/import-composite-raster-layer-with-arcpy/m-p/492962#M5279</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am currently working on an automated mapping process in arcpy (using arcmap 10).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What I need to do is import two different ".tif" files into separate dataframes. lets call the first tif file "Tif_1" and the second "Tif_2". &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;so my TOC would look like the following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;DF1:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Tif_1&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;DF2:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Tif_2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Tif_1&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Tif_1 is a 3 band composite image, and Tif_2 is a single band image that i want to show on top of Tif_1&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The script i use is the following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;x=0&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;for tiff in PLlist:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#Get Name of 'tiff'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;desc = arcpy.Describe(tiff)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;name = desc.baseName&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#Insert TrueColor into TrueColor DF&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;inTClyr = arcpy.mapping.Layer(TClist&lt;X&gt;)&lt;/X&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.mapping.AddLayer(TC,inTClyr,"TOP")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.ApplySymbologyFromLayer_management(inTClyr,symbTC)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.RefreshTOC()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.RefreshActiveView()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#Insert TrueColor into Plume DF&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;inTClyr2 = arcpy.mapping.Layer(TClist&lt;X&gt;)&lt;/X&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.mapping.AddLayer(PL,inTClyr,"TOP")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.ApplySymbologyFromLayer_management(inTClyr2,symbTC1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.mapping.UpdateLayer(PL,inTClyr2,symbTC1, True)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.RefreshTOC()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.RefreshActiveView()&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#Insert Plume into Plume DF&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;inPLlyr = arcpy.mapping.Layer(PLlist&lt;X&gt;)&lt;/X&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.mapping.AddLayer(PL,inPLlyr,"TOP")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.ApplySymbologyFromLayer_management(inPLlyr,symbPL)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.RefreshTOC()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.RefreshActiveView()&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, the problem i am having is that neither of the true color composites ("Tif_1") have their symbologies updated. They both come into their respective dataframes being displayed as single band stretched images, and even though i have saved a .lyr file with symbology as a true color composite the "Tif_1" images fail to accept the new symbology.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;**though the code is incomplete here, no errors are presented when i run the code, the symbology layers just don't apply...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Jun 2011 13:24:11 GMT</pubDate>
    <dc:creator>ZachRaymer</dc:creator>
    <dc:date>2011-06-21T13:24:11Z</dc:date>
    <item>
      <title>Import Composite Raster Layer with arcpy</title>
      <link>https://community.esri.com/t5/mapping-questions/import-composite-raster-layer-with-arcpy/m-p/492962#M5279</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am currently working on an automated mapping process in arcpy (using arcmap 10).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What I need to do is import two different ".tif" files into separate dataframes. lets call the first tif file "Tif_1" and the second "Tif_2". &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;so my TOC would look like the following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;DF1:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Tif_1&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;DF2:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Tif_2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Tif_1&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Tif_1 is a 3 band composite image, and Tif_2 is a single band image that i want to show on top of Tif_1&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The script i use is the following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;x=0&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;for tiff in PLlist:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#Get Name of 'tiff'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;desc = arcpy.Describe(tiff)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;name = desc.baseName&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#Insert TrueColor into TrueColor DF&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;inTClyr = arcpy.mapping.Layer(TClist&lt;X&gt;)&lt;/X&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.mapping.AddLayer(TC,inTClyr,"TOP")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.ApplySymbologyFromLayer_management(inTClyr,symbTC)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.RefreshTOC()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.RefreshActiveView()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#Insert TrueColor into Plume DF&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;inTClyr2 = arcpy.mapping.Layer(TClist&lt;X&gt;)&lt;/X&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.mapping.AddLayer(PL,inTClyr,"TOP")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.ApplySymbologyFromLayer_management(inTClyr2,symbTC1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.mapping.UpdateLayer(PL,inTClyr2,symbTC1, True)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.RefreshTOC()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.RefreshActiveView()&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#Insert Plume into Plume DF&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;inPLlyr = arcpy.mapping.Layer(PLlist&lt;X&gt;)&lt;/X&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.mapping.AddLayer(PL,inPLlyr,"TOP")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.ApplySymbologyFromLayer_management(inPLlyr,symbPL)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.RefreshTOC()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.RefreshActiveView()&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, the problem i am having is that neither of the true color composites ("Tif_1") have their symbologies updated. They both come into their respective dataframes being displayed as single band stretched images, and even though i have saved a .lyr file with symbology as a true color composite the "Tif_1" images fail to accept the new symbology.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;**though the code is incomplete here, no errors are presented when i run the code, the symbology layers just don't apply...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jun 2011 13:24:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/import-composite-raster-layer-with-arcpy/m-p/492962#M5279</guid>
      <dc:creator>ZachRaymer</dc:creator>
      <dc:date>2011-06-21T13:24:11Z</dc:date>
    </item>
    <item>
      <title>Re: Import Composite Raster Layer with arcpy</title>
      <link>https://community.esri.com/t5/mapping-questions/import-composite-raster-layer-with-arcpy/m-p/492963#M5280</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think the problem here is that you are mixing symbology renderers and this can't even be done in the UI.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For example, in the UI, add an RGB Composite raster.&amp;nbsp; Then try to set its datasource to just one of the bands (via the Source tab).&amp;nbsp; It won't let you.&amp;nbsp; If you set the symbology properties to be Stretched first (must click OK), then you can change the source to a specific band.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You need to author two different layer files.&amp;nbsp; One for Composite and one for Stretched.&amp;nbsp; Don't try to update a composite with a stretched layer file.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I hope this helps,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Jeff&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jun 2011 15:47:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/import-composite-raster-layer-with-arcpy/m-p/492963#M5280</guid>
      <dc:creator>JeffBarrette</dc:creator>
      <dc:date>2011-06-24T15:47:04Z</dc:date>
    </item>
  </channel>
</rss>

