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'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> <<a href="mailto:guillaume.huby.lists@gmail.com">guillaume.huby.lists@gmail.com</a>> 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>> Hey all, I really have great confusion on how to convert my HDF 4 images <br>> which reside as multiple bands into a single HDF file to a GeoTiff <br>> geo-referenced image. In reality, I need to convert the format into a
<br>> single latitude/longitude *WGS-84* referenced TIFF image..I need to do <br>> this and at the same time obtain a .tfw file which specifies the top <br>> left corner coordinates of the image's bounding box and the pixel
<br>> resolution of the image.<br>> <br>> I've tried to run the gdalinfo command on one of my images.. The image <br>> name is AMOD021KM20061229043102.hdf and when I run the command (under <br>> Ubuntu) I get the following stack report (the subdatasets are at the
<br>> bottom part):<br>> <br>> //---------------------------------------------------------- <br>> ---------------------START-LOG-------------- <br>> --------------------------------------------------------
<br>> -----------------------------<br>> <br>> rasdaman@mattia-desktop:~/FTPCHINA$ gdalinfo AMOD021KM20061229043102.hdf<br>> Driver: HDF4/Hierarchical Data Format Release 4<br>> Subdatasets:<br>> SUBDATASET_1_NAME=HDF4_SDS:UNKNOWN:"
AMOD021KM20061229043102.hdf":0<br>> SUBDATASET_1_DESC=[15x3630x1354] EV_1KM_RefSB (16-bit unsigned integer)<br>> SUBDATASET_2_NAME=HDF4_SDS:UNKNOWN:"AMOD021KM20061229043102.hdf":1<br>> SUBDATASET_2_DESC=[15x3630x1354] EV_1KM_RefSB_Uncert_Indexes (8-bit
<br>> unsigned integer)<br>> SUBDATASET_3_NAME=HDF4_SDS:UNKNOWN:"AMOD021KM20061229043102.hdf ":2<br>> SUBDATASET_3_DESC=[2x3630x1354] EV_250_Aggr1km_RefSB (16-bit unsigned <br>> integer)<br>> SUBDATASET_4_NAME=HDF4_SDS:UNKNOWN:"
AMOD021KM20061229043102.hdf":3<br>> SUBDATASET_4_DESC=[2x3630x1354] EV_250_Aggr1km_RefSB_Uncert_Indexes <br>> (8-bit unsigned integer)<br>> SUBDATASET_5_NAME=HDF4_SDS:UNKNOWN:"AMOD021KM20061229043102.hdf
":4<br>> SUBDATASET_5_DESC=[2x3630x1354] EV_250_Aggr1km_RefSB_Samples_Used <br>> (8-bit unsigned integer)<br>> SUBDATASET_6_NAME=HDF4_SDS:UNKNOWN:" AMOD021KM20061229043102.hdf":5<br>> SUBDATASET_6_DESC=[5x3630x1354] EV_500_Aggr1km_RefSB (16-bit unsigned
<br>> integer)<br>> SUBDATASET_7_NAME=HDF4_SDS:UNKNOWN:"AMOD021KM20061229043102.hdf":6<br>> SUBDATASET_7_DESC=[5x3630x1354] EV_500_Aggr1km_RefSB_Uncert_Indexes <br>> (8-bit unsigned integer)<br>
> SUBDATASET_8_NAME=HDF4_SDS:UNKNOWN:"
AMOD021KM20061229043102.hdf":7<br>> SUBDATASET_8_DESC=[5x3630x1354] EV_500_Aggr1km_RefSB_Samples_Used <br>> (8-bit unsigned integer)<br>> SUBDATASET_9_NAME=HDF4_SDS:UNKNOWN:" AMOD021KM20061229043102.hdf
":8<br>> SUBDATASET_9_DESC=[16x3630x1354] EV_1KM_Emissive (16-bit unsigned integer)<br>> SUBDATASET_10_NAME=HDF4_SDS:UNKNOWN:"AMOD021KM20061229043102.hdf":9<br>> SUBDATASET_10_DESC=[16x3630x1354] EV_1KM_Emissive_Uncert_Indexes
<br>> (8-bit unsigned integer)<br>> SUBDATASET_11_NAME=HDF4_SDS:UNKNOWN:"AMOD021KM20061229043102.hdf":10<br>> SUBDATASET_11_DESC=[726x271] Latitude (32-bit floating-point)<br>> SUBDATASET_12_NAME=HDF4_SDS:UNKNOWN:"
AMOD021KM20061229043102.hdf ":11<br>> SUBDATASET_12_DESC=[726x271] Longitude (32-bit floating-point)<br>> SUBDATASET_13_NAME=HDF4_SDS:UNKNOWN:"AMOD021KM20061229043102.hdf":12<br>> SUBDATASET_13_DESC=[726x271] Height (16-bit integer)
<br>> SUBDATASET_14_NAME=HDF4_SDS:UNKNOWN:"AMOD021KM20061229043102.hdf":13<br>> SUBDATASET_14_DESC=[726x271] SensorZenith (16-bit integer)<br>> SUBDATASET_15_NAME=HDF4_SDS:UNKNOWN:"AMOD021KM20061229043102.hdf
":14<br>> SUBDATASET_15_DESC=[726x271] SensorAzimuth (16-bit integer)<br>> SUBDATASET_16_NAME=HDF4_SDS:UNKNOWN:"AMOD021KM20061229043102.hdf":15<br>> SUBDATASET_16_DESC=[726x271] Range (16-bit unsigned integer)
<br>> SUBDATASET_17_NAME=HDF4_SDS:UNKNOWN:" AMOD021KM20061229043102.hdf":16<br>> SUBDATASET_17_DESC=[726x271] SolarZenith (16-bit integer)<br>> SUBDATASET_18_NAME=HDF4_SDS:UNKNOWN:"AMOD021KM20061229043102.hdf
":17<br>> SUBDATASET_18_DESC=[726x271] SolarAzimuth (16-bit integer)<br>> SUBDATASET_19_NAME=HDF4_SDS:UNKNOWN:"AMOD021KM20061229043102.hdf":18<br>> SUBDATASET_19_DESC=[726x271] gflags (8-bit unsigned integer)
<br>> SUBDATASET_20_NAME=HDF4_SDS:UNKNOWN:"AMOD021KM20061229043102.hdf ":19<br>> SUBDATASET_20_DESC=[3630x1354] EV_Band26 (16-bit unsigned integer)<br>> SUBDATASET_21_NAME=HDF4_SDS:UNKNOWN:"
AMOD021KM20061229043102.hdf
":20<br>> SUBDATASET_21_DESC=[3630x1354] EV_Band26_Uncert_Indexes (8-bit <br>> unsigned integer)<br>> SUBDATASET_22_NAME=HDF4_SDS:UNKNOWN:"AMOD021KM20061229043102.hdf":21<br>> SUBDATASET_22_DESC=[16x10] Noise in Thermal Detectors (8-bit unsigned
<br>> integer)<br>> SUBDATASET_23_NAME=HDF4_SDS:UNKNOWN:"AMOD021KM20061229043102.hdf ":22<br>> SUBDATASET_23_DESC=[16x10] Change in relative responses of thermal <br>> detectors (8-bit unsigned integer)
<br>> SUBDATASET_24_NAME=HDF4_SDS:UNKNOWN:"AMOD021KM20061229043102.hdf":23<br>> SUBDATASET_24_DESC=[363x16x10] DC Restore Change for Thermal Bands <br>> (8-bit integer)<br>> SUBDATASET_25_NAME=HDF4_SDS:UNKNOWN:"
AMOD021KM20061229043102.hdf":24<br>> SUBDATASET_25_DESC=[363x2x40] DC Restore Change for Reflective 250m <br>> Bands (8-bit integer)<br>> SUBDATASET_26_NAME=HDF4_SDS:UNKNOWN:" AMOD021KM20061229043102.hdf
":25<br>> SUBDATASET_26_DESC=[363x5x20] DC Restore Change for Reflective 500m <br>> Bands (8-bit integer)<br>> SUBDATASET_27_NAME=HDF4_SDS:UNKNOWN:"AMOD021KM20061229043102.hdf":26<br>> SUBDATASET_27_DESC=[363x15x10] DC Restore Change for Reflective 1km
<br>> Bands (8-bit integer)<br>> Corner Coordinates:<br>> Upper Left ( 0.0, 0.0)<br>> Lower Left ( 0.0, 512.0)<br>> Upper Right ( 512.0, 0.0)<br>> Lower Right ( 512.0, 512.0)<br>> Center (
256.0, 256.0)<br>> <br>> //--------------------------------------------------------------------------END-LOG <br>> -------------------------- <br>> ----------------------------------------------------------
<br>
> -----------------------------<br>> <br>> It looks like the subdatasets could be malformed... This is because I <br>> get these SUBDATASET_X_NAME=HDF4_SDS:UNKNOWN: syntax.. is that right.. <br>> I've been told that the images are MODIS images from Terra and Aqua
<br>> satellites. I also read that MODIS is used for snow detection only.. is <br>> this correct??<br>> <br>> I'm trying to understand how to achieve what I need and so far I <br>> understand that the required commands are the gdal_transform or the
<br>> gdalwarp commands.<br>> <br>> When I run gdal_translate on the file, I get the following:<br>> <br>> rasdaman@mattia-desktop :~/FTPCHINA$ gdal_translate <br>> AMOD021KM20061229043102.hdf test.tiff
<br>
> Input file contains subdatasets. Please, select one of them for reading.<br>> rasdaman@mattia-desktop:~/FTPCHINA$<br>> <br>> Hence my question is, how do I tell the command to pick up a certain <br>> dataset?? And, where can I find the relative documentation for this
<br>> command when applied to multiple HDF bands??<br>> <br>> Finally, I reside in Germany and need to transform a whole lot of images <br>> into GeoTiff to later establish a WMS service .. Hence all conversion
<br>> will need be done remotely... Does anyone have any suggestions on how I <br>> should go on about this?? Should I be using the gdal library or would I <br>> best bet on something else???<br>> Msphinx?? ENVI??
<br>> <br>you should try :<br>$ gdal_translate HDF4_SDS:UNKNOWN:"AMOD021KM20061229043102.hdf":0 test_b0.tif<br>$ gdal_translate HDF4_SDS:UNKNOWN:"AMOD021KM20061229043102.hdf":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