[Gdal-dev] warping MODIS data with gdal

Andrey Kiselev dron at ak4719.spb.edu
Wed Nov 29 06:08:16 EST 2006


On Tue, Nov 28, 2006 at 05:16:06PM +0100, Markus Neteler wrote:
> MODIS does not use the "Normal Sphere (r=6370997) but 6371007.181
> I got this from:
>  http://edcdaac.usgs.gov/landdaac/tools/mrtswath/info/ReleaseNotes.pdf

GDAL fetches the sphere parameter just fine. For above file I have:

$ gdalinfo -nomd HDF4_EOS:EOS_GRID:"MOD09A1.A2001289.h08v05.004.2003162200605.hdf":MOD_Grid_500m_Surface_Reflectance:sur_refl_b01
Driver: HDF4Image/HDF4 Dataset
Size is 2400, 2400
Coordinate System is:
PROJCS["unnamed",
    GEOGCS["Unknown datum based upon the custom spheroid",
        DATUM["Not specified (based on custom spheroid)",
            SPHEROID["Custom spheroid",6371007.181,0]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433]],
    PROJECTION["Sinusoidal"],
    PARAMETER["longitude_of_center",0],
    PARAMETER["false_easting",0],
    PARAMETER["false_northing",0],
    UNIT["Meter",1]]
Origin = (-11119505.196667000651360,4447802.078666999936104)
Pixel Size = (463.312716527917246,-463.312716527916677)
Corner Coordinates:
Upper Left  (-11119505.197, 4447802.079) (130d32'26.62"W, 40d 0'0.00"N)
Lower Left  (-11119505.197, 3335851.559) (115d28'12.19"W, 30d 0'0.00"N)
Upper Right (-10007554.677, 4447802.079) (117d29'11.96"W, 40d 0'0.00"N)
Lower Right (-10007554.677, 3335851.559) (103d55'22.97"W, 30d 0'0.00"N)
Center      (-10563529.937, 3891826.819) (115d58'24.91"W, 35d 0'0.00"N)
Band 1 Block=2400x1 Type=Int16, ColorInterp=Gray

> I found some dirty trick to tell GDAL about it, see my script at:
> http://mpa.itc.it/markus/useful/modis_hdf2erdas_ll_wgs84.sh

That looks strange for me. The script overrides sphere parameter in
output file, does it mean that after gdalwarp output file has incorrect
sphere? Or it means that gdalwarp actually warps to WGS84 ellipsoid
instead of normal sphere specified in PROJ.4 string? I am not sure that
the problem is in HDF driver here.

Best regards,
Andrey

-- 
Andrey V. Kiselev
ICQ# 26871517



More information about the Gdal-dev mailing list