<br><br><div><span class="gmail_quote">On 4/19/07, <b class="gmail_sendername">Guillaume HUBY</b> &lt;<a href="mailto:ghuby@geosys.com">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><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><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><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><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><div><br>see before.<br></div><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><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>