Hey! Thanks a lot, I seem to be getting my Tiff images ok.. Even though they are all really dark and cant see much out of them.. Is that right anyways?? <br><br>One more thing I had mentioned in the previous mail is that I need to obtain also the TWF file that accompanies each TIFF file.. This file specifies pixel resolution and upper left coordinates of images bounding box.. Does anyone have a clue on how to obtain this??
<br><br>For what regards merging the images, I do not have the <span style="font-weight: bold;">gdalmerge</span> command... only the <span style="font-weight: bold;">gdalwarp</span> one.. Is this because of my gdal version... Where can I get the CVS version from? I&#39;ve been looking for it but was not lucky in my search..
<br><br>Can you, or anyone, also help me with the gdalwarp syntax given a series of <span style="font-weight: bold;">.tif</span> files and wanting to merge them into a single viewable one??<br><br>Thanks again for your support
<br><br>Mattia<br><br><div><span class="gmail_quote">On 4/13/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;">
mattia a écrit :<br>&gt; Hey all, I really have great confusion on how to convert my HDF 4 images <br>&gt; which reside as multiple bands into a single HDF file to a GeoTiff <br>&gt; geo-referenced image. In reality, I need to convert the format into a 
<br>&gt; single latitude/longitude *WGS-84* referenced TIFF image..I need to do <br>&gt; this and at the same time obtain a .tfw file which specifies the top <br>&gt; left corner coordinates of the image&#39;s bounding box and the pixel 
<br>&gt; resolution of the image.<br>&gt; <br>&gt; I&#39;ve tried to run the gdalinfo command on one of my images.. The image <br>&gt; name is AMOD021KM20061229043102.hdf and when I run the command (under <br>&gt; Ubuntu) I get the following stack report (the subdatasets are at the 
<br>&gt; bottom part):<br>&gt; <br>&gt; //---------------------------------------------------------- <br>&gt; ---------------------START-LOG-------------- <br>&gt; -------------------------------------------------------- 
<br>&gt; -----------------------------<br>&gt; <br>&gt; rasdaman@mattia-desktop:~/FTPCHINA$ gdalinfo AMOD021KM20061229043102.hdf<br>&gt; Driver: HDF4/Hierarchical Data Format Release 4<br>&gt; Subdatasets:<br>&gt;&nbsp;&nbsp; SUBDATASET_1_NAME=HDF4_SDS:UNKNOWN:&quot;
AMOD021KM20061229043102.hdf&quot;:0<br>&gt;&nbsp;&nbsp; SUBDATASET_1_DESC=[15x3630x1354] EV_1KM_RefSB (16-bit unsigned integer)<br>&gt;&nbsp;&nbsp; SUBDATASET_2_NAME=HDF4_SDS:UNKNOWN:&quot;AMOD021KM20061229043102.hdf&quot;:1<br>&gt;&nbsp;&nbsp; SUBDATASET_2_DESC=[15x3630x1354] EV_1KM_RefSB_Uncert_Indexes (8-bit 
<br>&gt; unsigned integer)<br>&gt;&nbsp;&nbsp; SUBDATASET_3_NAME=HDF4_SDS:UNKNOWN:&quot;AMOD021KM20061229043102.hdf &quot;:2<br>&gt;&nbsp;&nbsp; SUBDATASET_3_DESC=[2x3630x1354] EV_250_Aggr1km_RefSB (16-bit unsigned <br>&gt; integer)<br>&gt;&nbsp;&nbsp; SUBDATASET_4_NAME=HDF4_SDS:UNKNOWN:&quot;
AMOD021KM20061229043102.hdf&quot;:3<br>&gt;&nbsp;&nbsp; SUBDATASET_4_DESC=[2x3630x1354] EV_250_Aggr1km_RefSB_Uncert_Indexes <br>&gt; (8-bit unsigned integer)<br>&gt;&nbsp;&nbsp; SUBDATASET_5_NAME=HDF4_SDS:UNKNOWN:&quot;AMOD021KM20061229043102.hdf

&quot;:4<br>&gt;&nbsp;&nbsp; SUBDATASET_5_DESC=[2x3630x1354] EV_250_Aggr1km_RefSB_Samples_Used <br>&gt; (8-bit unsigned integer)<br>&gt;&nbsp;&nbsp; SUBDATASET_6_NAME=HDF4_SDS:UNKNOWN:&quot; AMOD021KM20061229043102.hdf&quot;:5<br>&gt;&nbsp;&nbsp; SUBDATASET_6_DESC=[5x3630x1354] EV_500_Aggr1km_RefSB (16-bit unsigned 
<br>&gt; integer)<br>&gt;&nbsp;&nbsp; SUBDATASET_7_NAME=HDF4_SDS:UNKNOWN:&quot;AMOD021KM20061229043102.hdf&quot;:6<br>&gt;&nbsp;&nbsp; SUBDATASET_7_DESC=[5x3630x1354] EV_500_Aggr1km_RefSB_Uncert_Indexes <br>&gt; (8-bit unsigned integer)<br>
&gt;&nbsp;&nbsp; SUBDATASET_8_NAME=HDF4_SDS:UNKNOWN:&quot;
AMOD021KM20061229043102.hdf&quot;:7<br>&gt;&nbsp;&nbsp; SUBDATASET_8_DESC=[5x3630x1354] EV_500_Aggr1km_RefSB_Samples_Used <br>&gt; (8-bit unsigned integer)<br>&gt;&nbsp;&nbsp; SUBDATASET_9_NAME=HDF4_SDS:UNKNOWN:&quot; AMOD021KM20061229043102.hdf

&quot;:8<br>&gt;&nbsp;&nbsp; SUBDATASET_9_DESC=[16x3630x1354] EV_1KM_Emissive (16-bit unsigned integer)<br>&gt;&nbsp;&nbsp; SUBDATASET_10_NAME=HDF4_SDS:UNKNOWN:&quot;AMOD021KM20061229043102.hdf&quot;:9<br>&gt;&nbsp;&nbsp; SUBDATASET_10_DESC=[16x3630x1354] EV_1KM_Emissive_Uncert_Indexes 
<br>&gt; (8-bit unsigned integer)<br>&gt;&nbsp;&nbsp; SUBDATASET_11_NAME=HDF4_SDS:UNKNOWN:&quot;AMOD021KM20061229043102.hdf&quot;:10<br>&gt;&nbsp;&nbsp; SUBDATASET_11_DESC=[726x271] Latitude (32-bit floating-point)<br>&gt;&nbsp;&nbsp; SUBDATASET_12_NAME=HDF4_SDS:UNKNOWN:&quot;
AMOD021KM20061229043102.hdf &quot;:11<br>&gt;&nbsp;&nbsp; SUBDATASET_12_DESC=[726x271] Longitude (32-bit floating-point)<br>&gt;&nbsp;&nbsp; SUBDATASET_13_NAME=HDF4_SDS:UNKNOWN:&quot;AMOD021KM20061229043102.hdf&quot;:12<br>&gt;&nbsp;&nbsp; SUBDATASET_13_DESC=[726x271] Height (16-bit integer)
<br>&gt;&nbsp;&nbsp; SUBDATASET_14_NAME=HDF4_SDS:UNKNOWN:&quot;AMOD021KM20061229043102.hdf&quot;:13<br>&gt;&nbsp;&nbsp; SUBDATASET_14_DESC=[726x271] SensorZenith (16-bit integer)<br>&gt;&nbsp;&nbsp; SUBDATASET_15_NAME=HDF4_SDS:UNKNOWN:&quot;AMOD021KM20061229043102.hdf

&quot;:14<br>&gt;&nbsp;&nbsp; SUBDATASET_15_DESC=[726x271] SensorAzimuth (16-bit integer)<br>&gt;&nbsp;&nbsp; SUBDATASET_16_NAME=HDF4_SDS:UNKNOWN:&quot;AMOD021KM20061229043102.hdf&quot;:15<br>&gt;&nbsp;&nbsp; SUBDATASET_16_DESC=[726x271] Range (16-bit unsigned integer)
<br>&gt;&nbsp;&nbsp; SUBDATASET_17_NAME=HDF4_SDS:UNKNOWN:&quot; AMOD021KM20061229043102.hdf&quot;:16<br>&gt;&nbsp;&nbsp; SUBDATASET_17_DESC=[726x271] SolarZenith (16-bit integer)<br>&gt;&nbsp;&nbsp; SUBDATASET_18_NAME=HDF4_SDS:UNKNOWN:&quot;AMOD021KM20061229043102.hdf

&quot;:17<br>&gt;&nbsp;&nbsp; SUBDATASET_18_DESC=[726x271] SolarAzimuth (16-bit integer)<br>&gt;&nbsp;&nbsp; SUBDATASET_19_NAME=HDF4_SDS:UNKNOWN:&quot;AMOD021KM20061229043102.hdf&quot;:18<br>&gt;&nbsp;&nbsp; SUBDATASET_19_DESC=[726x271] gflags (8-bit unsigned integer)
<br>&gt;&nbsp;&nbsp; SUBDATASET_20_NAME=HDF4_SDS:UNKNOWN:&quot;AMOD021KM20061229043102.hdf &quot;:19<br>&gt;&nbsp;&nbsp; SUBDATASET_20_DESC=[3630x1354] EV_Band26 (16-bit unsigned integer)<br>&gt;&nbsp;&nbsp; SUBDATASET_21_NAME=HDF4_SDS:UNKNOWN:&quot;
AMOD021KM20061229043102.hdf
&quot;:20<br>&gt;&nbsp;&nbsp; SUBDATASET_21_DESC=[3630x1354] EV_Band26_Uncert_Indexes (8-bit <br>&gt; unsigned integer)<br>&gt;&nbsp;&nbsp; SUBDATASET_22_NAME=HDF4_SDS:UNKNOWN:&quot;AMOD021KM20061229043102.hdf&quot;:21<br>&gt;&nbsp;&nbsp; SUBDATASET_22_DESC=[16x10] Noise in Thermal Detectors (8-bit unsigned 
<br>&gt; integer)<br>&gt;&nbsp;&nbsp; SUBDATASET_23_NAME=HDF4_SDS:UNKNOWN:&quot;AMOD021KM20061229043102.hdf &quot;:22<br>&gt;&nbsp;&nbsp; SUBDATASET_23_DESC=[16x10] Change in relative responses of thermal <br>&gt; detectors (8-bit unsigned integer)
<br>&gt;&nbsp;&nbsp; SUBDATASET_24_NAME=HDF4_SDS:UNKNOWN:&quot;AMOD021KM20061229043102.hdf&quot;:23<br>&gt;&nbsp;&nbsp; SUBDATASET_24_DESC=[363x16x10] DC Restore Change for Thermal Bands <br>&gt; (8-bit integer)<br>&gt;&nbsp;&nbsp; SUBDATASET_25_NAME=HDF4_SDS:UNKNOWN:&quot;
AMOD021KM20061229043102.hdf&quot;:24<br>&gt;&nbsp;&nbsp; SUBDATASET_25_DESC=[363x2x40] DC Restore Change for Reflective 250m <br>&gt; Bands (8-bit integer)<br>&gt;&nbsp;&nbsp; SUBDATASET_26_NAME=HDF4_SDS:UNKNOWN:&quot; AMOD021KM20061229043102.hdf

&quot;:25<br>&gt;&nbsp;&nbsp; SUBDATASET_26_DESC=[363x5x20] DC Restore Change for Reflective 500m <br>&gt; Bands (8-bit integer)<br>&gt;&nbsp;&nbsp; SUBDATASET_27_NAME=HDF4_SDS:UNKNOWN:&quot;AMOD021KM20061229043102.hdf&quot;:26<br>&gt;&nbsp;&nbsp; SUBDATASET_27_DESC=[363x15x10] DC Restore Change for Reflective 1km 
<br>&gt; Bands (8-bit integer)<br>&gt; Corner Coordinates:<br>&gt; Upper Left&nbsp; (&nbsp;&nbsp;&nbsp; 0.0,&nbsp;&nbsp;&nbsp; 0.0)<br>&gt; Lower Left&nbsp; (&nbsp;&nbsp;&nbsp; 0.0,&nbsp; 512.0)<br>&gt; Upper Right (&nbsp; 512.0,&nbsp;&nbsp;&nbsp; 0.0)<br>&gt; Lower Right (&nbsp; 512.0,&nbsp; 512.0)<br>&gt; Center&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (&nbsp; 
256.0,&nbsp; 256.0)<br>&gt; <br>&gt; //--------------------------------------------------------------------------END-LOG <br>&gt; -------------------------- <br>&gt; ---------------------------------------------------------- 
<br>
&gt; -----------------------------<br>&gt; <br>&gt; It looks like the subdatasets could be malformed... This is because I <br>&gt; get these SUBDATASET_X_NAME=HDF4_SDS:UNKNOWN: syntax.. is that right.. <br>&gt; I&#39;ve been told that the images are MODIS images from Terra and Aqua 
<br>&gt; satellites. I also read that MODIS is used for snow detection only.. is <br>&gt; this correct??<br>&gt; <br>&gt; I&#39;m trying to understand how to achieve what I need and so far I <br>&gt; understand that the required commands are the gdal_transform or the 
<br>&gt; gdalwarp commands.<br>&gt; <br>&gt; When I run gdal_translate on the file, I get the following:<br>&gt; <br>&gt; rasdaman@mattia-desktop :~/FTPCHINA$ gdal_translate <br>&gt; AMOD021KM20061229043102.hdf test.tiff
<br>
&gt; Input file contains subdatasets. Please, select one of them for reading.<br>&gt; rasdaman@mattia-desktop:~/FTPCHINA$<br>&gt; <br>&gt; Hence my question is, how do I tell the command to pick up a certain <br>&gt; dataset?? And, where can I find the relative documentation for this 
<br>&gt; command when applied to multiple HDF bands??<br>&gt; <br>&gt; Finally, I reside in Germany and need to transform a whole lot of images <br>&gt; into GeoTiff to later establish a WMS service .. Hence all conversion 
<br>&gt; will need be done remotely... Does anyone have any suggestions on how I <br>&gt; should go on about this?? Should I be using the gdal library or would I <br>&gt; best bet on something else???<br>&gt; Msphinx?? ENVI??
<br>&gt; <br>you should try :<br>$ gdal_translate HDF4_SDS:UNKNOWN:&quot;AMOD021KM20061229043102.hdf&quot;:0 test_b0.tif<br>$ gdal_translate HDF4_SDS:UNKNOWN:&quot;AMOD021KM20061229043102.hdf&quot;:1 test_b1.tif<br>... and so on for each dataset
<br><br>same with gdalwarp.<br><br>this extract only one band. Then you can use gdal_merge or gdalwarp to merge bands in a single raster.<br><br>Also have a look to some previous post in the list :<br><a href="http://thread.gmane.org/gmane.comp.gis.gdal.devel/10482" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">

http://thread.gmane.org/gmane.comp.gis.gdal.devel/10482</a><br>if you meet trouble to get WGS84 correct.<br><br>Good alternates are MRT or HEG modis tools ...<br><br>Good luck !<br><span class="sg">Guillaume.<br>
</span><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