<div><br>Frank Warmerdam wrote: </div><br><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote"><div class="moz-text-flowed" style="font-family: -moz-fixed; font-size: 13px;" lang="x-western">
Jose Luis Gomez Dans wrote:
<br><blockquote type="cite">Hi!
<br>
<br>I have read a couple of postings regarding MODIS subsetting and warping. I
<br>have been using HEGTools up to now, but I find that having just GDAL in my
<br>processing chain makes life easier. So far, i understand that I need to warp
<br>a subdataset off the HDFEOS file to change the ellps parameter so that the
<br>subdataset is available in Lat/Long WGS84. This seems to work, and I can the
<br>reproject into UTMXX/DatumXYZ again. This requires a gdalwarp, a
<br>gdal_translate and a further gdalwarp. is there a more direct route?
<br></blockquote>
<br>Jose,
<br>
<br>You would need to be more specific about what exact steps you are doing.
<br>Off hand I would think you could do things in a single gdalwarp from
<br>a subdataset to an output file in UTM using the -s_srs switch to override
<br>the interpretation of the input coordinate system if required.
</div></blockquote><div><br><br>Frank,<br><br>I am experiencing the same troubles (using FWTools 1.2.0).<br></div><br><br>My MODIS image is (downloaded from the EOS data gateway):<br>################## Code<br>>gdalinfo HDF4_EOS:EOS_GRID:"
SomeData.hdf":Product:Band<br>Driver: HDF4Image/HDF4 Dataset<br>Size is 2400, 2400<br>Coordinate System is:<br>PROJCS["unnamed",<br> GEOGCS["Unknown datum based upon the custom spheroid",<br> DATUM["Not specified (based on custom spheroid)",
<br> SPHEROID["Custom spheroid",6371007.181,0]],<br> PRIMEM["Greenwich",0],<br> UNIT["degree",0.0174532925199433]],<br> PROJECTION["Sinusoidal"],<br> PARAMETER["longitude_of_center",0],
<br> PARAMETER["false_easting",0],<br> PARAMETER["false_northing",0],<br> UNIT["Meter",1]]<br>Origin = (0.000000000000000,5559752.598333000200000)<br>Pixel Size = (463.312716527916680
,-463.312716527500130)<br>Metadata:<br>...<br>################## End code<br>(btw it is supposed to be a HDF5 and not a HDF4, but this doesn't seem to be the problem)<br><br>I tried (EPSG:27572 is NTF (Paris) / Lambert zone II):
<br>################## Code<br>gdalwarp -t_srs EPSG:27572 HDF4_EOS:EOS_GRID:"SomeData.hdf":Product:Band SomeData_out.tif<br>gdalwarp -s_srs "+proj=sinu +lon_0=0 +x_0=0 +y_0=0 +a=6371007.181 +b=6371007.181 +units=m no_defs <>" -t_srs EPSG:27572 HDF4_EOS:EOS_GRID:"
SomeData.hdf":Product:Band SomeData_out.tif<br>################## End code<br><br>These commands gave me a shift in the Y axis (around 21 km).<br><br>Using the trick of Markus (<a class="moz-txt-link-freetext" href="http://mpa.itc.it/markus/useful/modis_hdf2erdas_ll_wgs84.sh">
http://mpa.itc.it/markus/useful/modis_hdf2erdas_ll_wgs84.sh</a>) is a solution, but in 3 commands like Jose described.<br><br>Do you know a shorter way to achieve this ?<br><br>Thank you in advance for your reply.<br><br>
Regards,<br>Guillaume.<br>