<?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 Creating a new raster dataset with mixed bands programmatically in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/creating-a-new-raster-dataset-with-mixed-bands/m-p/641113#M17255</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anyone know how to programmatically create a new raster dataset with &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;bands of different types? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Using the IRasterWorkspace2 interface, I can create a new raster dataset, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;however the band type must be specified and all the bands will have the &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;same type. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried changing the band type for single band within the dataset using the &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;put_PixelType method (from IRasterBand), and specifying a type different then&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;the one used to create the dataset. However this fails.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried create an empty raster dataset ( 0 bands) which fails too.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I also tried creating raster dataset with 1 band, and get a band refence from&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;another raster dataset and add that band to my new raster dataset. This fails&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;since the AppendBand method (IRasterBandCollection) is only valid for an &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IRaster and NOT an IRasterDatset.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Oct 2010 15:54:23 GMT</pubDate>
    <dc:creator>StevePiche</dc:creator>
    <dc:date>2010-10-19T15:54:23Z</dc:date>
    <item>
      <title>Creating a new raster dataset with mixed bands programmatically</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/creating-a-new-raster-dataset-with-mixed-bands/m-p/641113#M17255</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anyone know how to programmatically create a new raster dataset with &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;bands of different types? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Using the IRasterWorkspace2 interface, I can create a new raster dataset, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;however the band type must be specified and all the bands will have the &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;same type. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried changing the band type for single band within the dataset using the &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;put_PixelType method (from IRasterBand), and specifying a type different then&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;the one used to create the dataset. However this fails.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried create an empty raster dataset ( 0 bands) which fails too.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I also tried creating raster dataset with 1 band, and get a band refence from&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;another raster dataset and add that band to my new raster dataset. This fails&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;since the AppendBand method (IRasterBandCollection) is only valid for an &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IRaster and NOT an IRasterDatset.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Oct 2010 15:54:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/creating-a-new-raster-dataset-with-mixed-bands/m-p/641113#M17255</guid>
      <dc:creator>StevePiche</dc:creator>
      <dc:date>2010-10-19T15:54:23Z</dc:date>
    </item>
  </channel>
</rss>

