WHat I meant by strange is that I only get one band to have a significant value... all other bands have &#39;Undefined value&#39; ...<br><br>I tried renaming the file from <span class="q">AMOD021KM20061229043102.hdf to </span>
<span class="q">MOD021KM20061229043102.hdf, ie : removing the A in front which, I guess, as been used for convention to indicate an image from Terra satellite as opposed to the Aqua satellite..<br><br>I also tried, some days ago with HEG tools but when I try to open the image I get an error popup statin &quot;cannot open load 
</span><span class="q">AMOD021KM20061229043102.hdf, unknown error&quot;<br><br>I&#39;m having problem installing MRT in Linux (Ubuntu) .. I will keep trying :(<br><br>How do I know if I have a good image? gdalinfo??<br><br>
This is what I get with <span style="font-weight: bold;">gdalinfo -nomd</span><br><br style="font-weight: bold;"><span style="font-weight: bold;">rasdaman@mattia-desktop:/opt/HEG/iHEG$ gdalinfo -nomd MOD021KM20061229043102.hdf
</span><br style="font-weight: bold;"><span style="font-weight: bold;">Driver: HDF4/Hierarchical Data Format Release 4</span><br style="font-weight: bold;"><span style="font-weight: bold;">Size is 512, 512</span><br style="font-weight: bold;">
<span style="font-weight: bold;">Coordinate System is `&#39;</span><br style="font-weight: bold;"><span style="font-weight: bold;">Subdatasets:</span><br style="font-weight: bold;"><span style="font-weight: bold;">&nbsp; SUBDATASET_1_NAME=HDF4_SDS:UNKNOWN:&quot;
MOD021KM20061229043102.hdf&quot;:0</span><br style="font-weight: bold;"><span style="font-weight: bold;">&nbsp; SUBDATASET_1_DESC=[15x3630x1354] EV_1KM_RefSB (16-bit unsigned integer)</span><br style="font-weight: bold;"><span style="font-weight: bold;">
&nbsp; SUBDATASET_2_NAME=HDF4_SDS:UNKNOWN:&quot;MOD021KM20061229043102.hdf&quot;:1</span><br style="font-weight: bold;"><span style="font-weight: bold;">&nbsp; SUBDATASET_2_DESC=[15x3630x1354] EV_1KM_RefSB_Uncert_Indexes (8-bit unsigned integer)
</span><br style="font-weight: bold;"><span style="font-weight: bold;">&nbsp; SUBDATASET_3_NAME=HDF4_SDS:UNKNOWN:&quot;MOD021KM20061229043102.hdf&quot;:2</span><br style="font-weight: bold;"><span style="font-weight: bold;">&nbsp; SUBDATASET_3_DESC=[2x3630x1354] EV_250_Aggr1km_RefSB (16-bit unsigned integer)
</span><br style="font-weight: bold;"><span style="font-weight: bold;">&nbsp; SUBDATASET_4_NAME=HDF4_SDS:UNKNOWN:&quot;MOD021KM20061229043102.hdf&quot;:3</span><br style="font-weight: bold;"><span style="font-weight: bold;">&nbsp; SUBDATASET_4_DESC=[2x3630x1354] EV_250_Aggr1km_RefSB_Uncert_Indexes (8-bit unsigned integer)
</span><br style="font-weight: bold;"><span style="font-weight: bold;">&nbsp; SUBDATASET_5_NAME=HDF4_SDS:UNKNOWN:&quot;MOD021KM20061229043102.hdf&quot;:4</span><br style="font-weight: bold;"><span style="font-weight: bold;">&nbsp; SUBDATASET_5_DESC=[2x3630x1354] EV_250_Aggr1km_RefSB_Samples_Used (8-bit unsigned integer)
</span><br style="font-weight: bold;"><span style="font-weight: bold;">&nbsp; SUBDATASET_6_NAME=HDF4_SDS:UNKNOWN:&quot;MOD021KM20061229043102.hdf&quot;:5</span><br style="font-weight: bold;"><span style="font-weight: bold;">&nbsp; SUBDATASET_6_DESC=[5x3630x1354] EV_500_Aggr1km_RefSB (16-bit unsigned integer)
</span><br style="font-weight: bold;"><span style="font-weight: bold;">&nbsp; SUBDATASET_7_NAME=HDF4_SDS:UNKNOWN:&quot;MOD021KM20061229043102.hdf&quot;:6</span><br style="font-weight: bold;"><span style="font-weight: bold;">&nbsp; SUBDATASET_7_DESC=[5x3630x1354] EV_500_Aggr1km_RefSB_Uncert_Indexes (8-bit unsigned integer)
</span><br style="font-weight: bold;"><span style="font-weight: bold;">&nbsp; SUBDATASET_8_NAME=HDF4_SDS:UNKNOWN:&quot;MOD021KM20061229043102.hdf&quot;:7</span><br style="font-weight: bold;"><span style="font-weight: bold;">&nbsp; SUBDATASET_8_DESC=[5x3630x1354] EV_500_Aggr1km_RefSB_Samples_Used (8-bit unsigned integer)
</span><br style="font-weight: bold;"><span style="font-weight: bold;">&nbsp; SUBDATASET_9_NAME=HDF4_SDS:UNKNOWN:&quot;MOD021KM20061229043102.hdf&quot;:8</span><br style="font-weight: bold;"><span style="font-weight: bold;">&nbsp; SUBDATASET_9_DESC=[16x3630x1354] EV_1KM_Emissive (16-bit unsigned integer)
</span><br style="font-weight: bold;"><span style="font-weight: bold;">&nbsp; SUBDATASET_10_NAME=HDF4_SDS:UNKNOWN:&quot;MOD021KM20061229043102.hdf&quot;:9</span><br style="font-weight: bold;"><span style="font-weight: bold;">&nbsp; SUBDATASET_10_DESC=[16x3630x1354] EV_1KM_Emissive_Uncert_Indexes (8-bit unsigned integer)
</span><br style="font-weight: bold;"><span style="font-weight: bold;">&nbsp; SUBDATASET_11_NAME=HDF4_SDS:UNKNOWN:&quot;MOD021KM20061229043102.hdf&quot;:10</span><br style="font-weight: bold;"><span style="font-weight: bold;">
&nbsp; SUBDATASET_11_DESC=[726x271] Latitude (32-bit floating-point)</span><br style="font-weight: bold;"><span style="font-weight: bold;">&nbsp; SUBDATASET_12_NAME=HDF4_SDS:UNKNOWN:&quot;MOD021KM20061229043102.hdf&quot;:11</span><br style="font-weight: bold;">
<span style="font-weight: bold;">&nbsp; SUBDATASET_12_DESC=[726x271] Longitude (32-bit floating-point)</span><br style="font-weight: bold;"><span style="font-weight: bold;">&nbsp; SUBDATASET_13_NAME=HDF4_SDS:UNKNOWN:&quot;MOD021KM20061229043102.hdf
&quot;:12</span><br style="font-weight: bold;"><span style="font-weight: bold;">&nbsp; SUBDATASET_13_DESC=[726x271] Height (16-bit integer)</span><br style="font-weight: bold;"><span style="font-weight: bold;">&nbsp; SUBDATASET_14_NAME=HDF4_SDS:UNKNOWN:&quot;
MOD021KM20061229043102.hdf&quot;:13</span><br style="font-weight: bold;"><span style="font-weight: bold;">&nbsp; SUBDATASET_14_DESC=[726x271] SensorZenith (16-bit integer)</span><br style="font-weight: bold;"><span style="font-weight: bold;">
&nbsp; SUBDATASET_15_NAME=HDF4_SDS:UNKNOWN:&quot;MOD021KM20061229043102.hdf&quot;:14</span><br style="font-weight: bold;"><span style="font-weight: bold;">&nbsp; SUBDATASET_15_DESC=[726x271] SensorAzimuth (16-bit integer)</span><br style="font-weight: bold;">
<span style="font-weight: bold;">&nbsp; SUBDATASET_16_NAME=HDF4_SDS:UNKNOWN:&quot;MOD021KM20061229043102.hdf&quot;:15</span><br style="font-weight: bold;"><span style="font-weight: bold;">&nbsp; SUBDATASET_16_DESC=[726x271] Range (16-bit unsigned integer)
</span><br style="font-weight: bold;"><span style="font-weight: bold;">&nbsp; SUBDATASET_17_NAME=HDF4_SDS:UNKNOWN:&quot;MOD021KM20061229043102.hdf&quot;:16</span><br style="font-weight: bold;"><span style="font-weight: bold;">
&nbsp; SUBDATASET_17_DESC=[726x271] SolarZenith (16-bit integer)</span><br style="font-weight: bold;"><span style="font-weight: bold;">&nbsp; SUBDATASET_18_NAME=HDF4_SDS:UNKNOWN:&quot;MOD021KM20061229043102.hdf&quot;:17</span><br style="font-weight: bold;">
<span style="font-weight: bold;">&nbsp; SUBDATASET_18_DESC=[726x271] SolarAzimuth (16-bit integer)</span><br style="font-weight: bold;"><span style="font-weight: bold;">&nbsp; SUBDATASET_19_NAME=HDF4_SDS:UNKNOWN:&quot;MOD021KM20061229043102.hdf
&quot;:18</span><br style="font-weight: bold;"><span style="font-weight: bold;">&nbsp; SUBDATASET_19_DESC=[726x271] gflags (8-bit unsigned integer)</span><br style="font-weight: bold;"><span style="font-weight: bold;">&nbsp; SUBDATASET_20_NAME=HDF4_SDS:UNKNOWN:&quot;
MOD021KM20061229043102.hdf&quot;:19</span><br style="font-weight: bold;"><span style="font-weight: bold;">&nbsp; SUBDATASET_20_DESC=[3630x1354] EV_Band26 (16-bit unsigned integer)</span><br style="font-weight: bold;"><span style="font-weight: bold;">
&nbsp; SUBDATASET_21_NAME=HDF4_SDS:UNKNOWN:&quot;MOD021KM20061229043102.hdf&quot;:20</span><br style="font-weight: bold;"><span style="font-weight: bold;">&nbsp; SUBDATASET_21_DESC=[3630x1354] EV_Band26_Uncert_Indexes (8-bit unsigned integer)
</span><br style="font-weight: bold;"><span style="font-weight: bold;">&nbsp; SUBDATASET_22_NAME=HDF4_SDS:UNKNOWN:&quot;MOD021KM20061229043102.hdf&quot;:21</span><br style="font-weight: bold;"><span style="font-weight: bold;">
&nbsp; SUBDATASET_22_DESC=[16x10] Noise in Thermal Detectors (8-bit unsigned integer)</span><br style="font-weight: bold;"><span style="font-weight: bold;">&nbsp; SUBDATASET_23_NAME=HDF4_SDS:UNKNOWN:&quot;MOD021KM20061229043102.hdf
&quot;:22</span><br style="font-weight: bold;"><span style="font-weight: bold;">&nbsp; SUBDATASET_23_DESC=[16x10] Change in relative responses of thermal detectors (8-bit unsigned integer)</span><br style="font-weight: bold;">
<span style="font-weight: bold;">&nbsp; SUBDATASET_24_NAME=HDF4_SDS:UNKNOWN:&quot;MOD021KM20061229043102.hdf&quot;:23</span><br style="font-weight: bold;"><span style="font-weight: bold;">&nbsp; SUBDATASET_24_DESC=[363x16x10] DC Restore Change for Thermal Bands (8-bit integer)
</span><br style="font-weight: bold;"><span style="font-weight: bold;">&nbsp; SUBDATASET_25_NAME=HDF4_SDS:UNKNOWN:&quot;MOD021KM20061229043102.hdf&quot;:24</span><br style="font-weight: bold;"><span style="font-weight: bold;">
&nbsp; SUBDATASET_25_DESC=[363x2x40] DC Restore Change for Reflective 250m Bands (8-bit integer)</span><br style="font-weight: bold;"><span style="font-weight: bold;">&nbsp; SUBDATASET_26_NAME=HDF4_SDS:UNKNOWN:&quot;MOD021KM20061229043102.hdf
&quot;:25</span><br style="font-weight: bold;"><span style="font-weight: bold;">&nbsp; SUBDATASET_26_DESC=[363x5x20] DC Restore Change for Reflective 500m Bands (8-bit integer)</span><br style="font-weight: bold;"><span style="font-weight: bold;">
&nbsp; SUBDATASET_27_NAME=HDF4_SDS:UNKNOWN:&quot;MOD021KM20061229043102.hdf&quot;:26</span><br style="font-weight: bold;"><span style="font-weight: bold;">&nbsp; SUBDATASET_27_DESC=[363x15x10] DC Restore Change for Reflective 1km Bands (8-bit integer)
</span><br style="font-weight: bold;"><span style="font-weight: bold;">Corner Coordinates:</span><br style="font-weight: bold;"><span style="font-weight: bold;">Upper Left&nbsp; (&nbsp;&nbsp;&nbsp; 0.0,&nbsp;&nbsp;&nbsp; 0.0)</span><br style="font-weight: bold;">
<span style="font-weight: bold;">Lower Left&nbsp; (&nbsp;&nbsp;&nbsp; 0.0,&nbsp; 512.0)</span><br style="font-weight: bold;"><span style="font-weight: bold;">Upper Right (&nbsp; 512.0,&nbsp;&nbsp;&nbsp; 0.0)</span><br style="font-weight: bold;"><span style="font-weight: bold;">
Lower Right (&nbsp; 512.0,&nbsp; 512.0)</span><br style="font-weight: bold;"><span style="font-weight: bold;">Center&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (&nbsp; 256.0,&nbsp; 256.0)</span><br style="font-weight: bold;"><span style="font-weight: bold;">rasdaman@mattia-desktop
:/opt/HEG/iHEG$</span><br style="font-weight: bold;"><br><span style="font-weight: bold;"></span><br style="font-weight: bold;">You had sent me the following command some days ago to convert to tiff using gdal_translate<br>
<span style="font-weight: bold;">gdal_translate HDF4_SDS:UNKNOWN:&quot;AMOD021KM20061229043102.hdf&quot;:9 test_b9.tif<br><br></span>WOuld I need to do the analogous thing with the  <span style="font-weight: bold;">gdalwarp
<span style="font-weight: bold;"> </span></span>utility?? So as to consider GCP??<br><br>One last thing... At the end of day I will need to process all images in the same way and to get out of them RGB images (The images cover the whole national territory of China)... For this, I&#39;m I looking at 
<span style="font-style: italic;">all</span> the bands in the HDF File?? Or does it only concern a certain number of them (in this case <span style="font-style: italic;">all</span> means the 26 bands displayed with gdalinfo)
<br><br>Thanks for your patience and help, Its only that I have some deadlines coming for a big project and really need to sort these data conversions ASAP.<br><br>Thanks<br><br>Mattia<span style="font-weight: bold;"><span style="font-weight: bold;">
</span><br></span><br><br></span><br><div><span class="gmail_quote">On 4/19/07, <b class="gmail_sendername">guillaume huby</b> &lt;<a href="mailto:guillaume.huby.lists@gmail.com">guillaume.huby.lists@gmail.com</a>&gt; wrote:
</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br><br><div><span class="q"><span class="gmail_quote">On 4/19/07, <b class="gmail_sendername">
Guillaume HUBY</b> &lt;<a href="mailto:ghuby@geosys.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">ghuby@geosys.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

Hey all,<br><br>I ran the following command on an HDF format:<br><br>$ gdal_translate HDF4_SDS:UNKNOWN:&quot;AMOD021KM20061229043102.hdf&quot;:9<br>test_b9.tif</blockquote></span><div><br>First of all, your modis file does not look like like the HDF-EOS MOD21KM file I know (but I downloaded subseted data). Are you sure you get a good one ?
<br>Second point, each dataset of MOD21KM hdf is made of raw data with GCP within meta data. So, AFAIK, if you use gdal_translate you do not apply GCP to image. You should use gdalwarp instead.<br>&nbsp;</div><div><span class="q" id="q_1120a9d672c98ffa_3">
<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I hence get a geotiff file called test_b9.tif<br>I actually ran the command on all my 26 channels and got 26 different<br>TIF files.<br>I think that this should be the most important channel though, namely,<br>it is the :
<br><br>&nbsp;&nbsp; SUBDATASET_9_NAME=HDF4_SDS:UNKNOWN:&quot;AMOD021KM20061229043102.hdf&quot;:8<br>&nbsp;&nbsp; SUBDATASET_9_DESC=[16x3630x1354] EV_1KM_Emissive (16-bit unsigned<br>integer)<br><br><br>If I now run gdalinfo I get:<br><br>rasdaman@mattia-desktop

:~/FTPCHINA$ gdalinfo -nomd test_b8.tif<br>Driver: GTiff/GeoTIFF<br>Size is 1354, 3630<br>Coordinate System is `&#39;<br>Corner Coordinates:<br>Upper Left&nbsp;&nbsp;(&nbsp;&nbsp;&nbsp;&nbsp;0.0,&nbsp;&nbsp;&nbsp;&nbsp;0.0)<br>Lower Left&nbsp;&nbsp;(&nbsp;&nbsp;&nbsp;&nbsp;0.0, 3630.0)<br>Upper Right ( 
1354.0,&nbsp;&nbsp;&nbsp;&nbsp;0.0)<br>Lower Right ( 1354.0, 3630.0)<br>Center&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(&nbsp;&nbsp;677.0, 1815.0)<br>Band 1 Block=1354x3 Type=UInt16, ColorInterp=Gray<br>Band 2 Block=1354x3 Type=UInt16, ColorInterp=Undefined<br>Band 3 Block=1354x3 Type=UInt16, ColorInterp=Undefined
<br>Band 4 Block=1354x3 Type=UInt16, ColorInterp=Undefined<br>Band 5 Block=1354x3 Type=UInt16, ColorInterp=Undefined<br>Band 6 Block=1354x3 Type=UInt16, ColorInterp=Undefined<br>Band 7 Block=1354x3 Type=UInt16, ColorInterp=Undefined
<br>Band 8 Block=1354x3 Type=UInt16, ColorInterp=Undefined<br>Band 9 Block=1354x3 Type=UInt16, ColorInterp=Undefined<br>Band 10 Block=1354x3 Type=UInt16, ColorInterp=Undefined<br>Band 11 Block=1354x3 Type=UInt16, ColorInterp=Undefined
<br>Band 12 Block=1354x3 Type=UInt16, ColorInterp=Undefined<br>Band 13 Block=1354x3 Type=UInt16, ColorInterp=Undefined<br>Band 14 Block=1354x3 Type=UInt16, ColorInterp=Undefined<br>Band 15 Block=1354x3 Type=UInt16, ColorInterp=Undefined
<br>Band 16 Block=1354x3 Type=UInt16, ColorInterp=Undefined<br>rasdaman@mattia-desktop:~/FTPCHINA$</blockquote><div>&nbsp;</div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

Isnt this a strange result?</blockquote></span></div><div><br>No, a hdf file is made of datasets. Each dataset can contain rasters (or other data). In your case, the ninth dataset of your hdf file contains a raster with 16 bands (see the 16 of SUBDATASET_9_DESC=[16x3630x1354]). So when you extract the ninth dataset, you get a raster with 16 bands.
<br>&nbsp;</div><span class="q"><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">What about the coordinate system?</blockquote></span><div><br>
see before.<br></div><span class="q"><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I tried to merge all the tifs with gdalwarp, but had no success so far..<br><br>I&#39;m pretty new to this field and in very high waters..
<br><br>Any suggestions?</blockquote></span><div><br>If you don&#39;t want to use batch mode or have a uniform process for all images, you should use HEG-Tools or MRT which EOS made tools with simple GUI very easy to use to extract data from HDF-EOS files.
<br><br>Good luck,<br>Guillaume.<br></div></div>
<br>_______________________________________________<br>Gdal-dev mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:Gdal-dev@lists.maptools.org">Gdal-dev@lists.maptools.org</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://lists.maptools.org/mailman/listinfo/gdal-dev" target="_blank">
http://lists.maptools.org/mailman/listinfo/gdal-dev</a><br></blockquote></div><br><br clear="all"><br>-- <br>Mattia