[Gdal-dev] Problem with MODIS imagery
Hugo Martins
hfpmartins at gmail.com
Tue Jul 31 05:14:52 EDT 2007
Hello all,
I've already posted this questions on open-ev list but i think they are
better adressed to this list, so here they go!
I've a huge modis dataset to process in batch mode, or at least, it is what
i'm trying to do!
My first problem is that i can only extract different bands if i use
gdal_translate -sds command. Well, i don´t need them all and so i have tried
gdal_translate HDF4_EOS:EOS_GRID:"MOD13Q1.A2007.h17v04.005.2007204181956.hdf":MODIS_Grid_16DAY_250m_500m_VI!
Unfortunately i get error message saying the file size is zero and that it
has no bands. Any suggestions?
The original file info is (from gdalinfo):
Driver: HDF4/Hierarchical Data Format Release 4
Files: MOD13Q1.A2007177.h17v04.005.2007204181956.hdf
Size is 512, 512
Coordinate System is `'
Metadata: ...
HDFEOSVersion=HDFEOS_V2.9
LOCALGRANULEID=MOD13Q1.A2007177.h17v04.005.2007204181956.hdf
...
NORTHBOUNDINGCOORDINATE=49.9999999955098
SOUTHBOUNDINGCOORDINATE=39.9999999964079
EASTBOUNDINGCOORDINATE=0.0129643652214683
WESTBOUNDINGCOORDINATE=-15.5572382657541
...
Subdatasets:
SUBDATASET_1_NAME=HDF4_EOS:EOS_GRID:"
MOD13Q1.A2007177.h17v04.005.2007204181956.hdf":MODIS_Grid_16DAY_250m_500m_VI:250m
16 days NDVI
SUBDATASET_1_DESC=[4800x4800] 250m 16 days NDVI
MODIS_Grid_16DAY_250m_500m_VI (16-bit integer)
SUBDATASET_2_NAME=HDF4_EOS:EOS_GRID:"
MOD13Q1.A2007177.h17v04.005.2007204181956.hdf":MODIS_Grid_16DAY_250m_500m_VI:250m
16 days EVI
SUBDATASET_2_DESC=[4800x4800] 250m 16 days EVI
MODIS_Grid_16DAY_250m_500m_VI (16-bit integer)
SUBDATASET_3_NAME=HDF4_EOS:EOS_GRID:"
MOD13Q1.A2007177.h17v04.005.2007204181956.hdf":MODIS_Grid_16DAY_250m_500m_VI:250m
16 days VI Quality
SUBDATASET_3_DESC=[4800x4800] 250m 16 days VI Quality
MODIS_Grid_16DAY_250m_500m_VI (16-bit unsigned integer)
SUBDATASET_4_NAME=HDF4_EOS:EOS_GRID:"
MOD13Q1.A2007177.h17v04.005.2007204181956.hdf":MODIS_Grid_16DAY_250m_500m_VI:250m
16 days red reflectance
SUBDATASET_4_DESC=[4800x4800] 250m 16 days red reflectance
MODIS_Grid_16DAY_250m_500m_VI (16-bit integer)
SUBDATASET_5_NAME=HDF4_EOS:EOS_GRID:"
MOD13Q1.A2007177.h17v04.005.2007204181956.hdf":MODIS_Grid_16DAY_250m_500m_VI:250m
16 days NIR reflectance
SUBDATASET_5_DESC=[4800x4800] 250m 16 days NIR reflectance
MODIS_Grid_16DAY_250m_500m_VI (16-bit integer)
SUBDATASET_6_NAME=HDF4_EOS:EOS_GRID:"
MOD13Q1.A2007177.h17v04.005.2007204181956.hdf":MODIS_Grid_16DAY_250m_500m_VI:250m
16 days blue reflectance
SUBDATASET_6_DESC=[4800x4800] 250m 16 days blue reflectance
MODIS_Grid_16DAY_250m_500m_VI (16-bit integer)
SUBDATASET_7_NAME=HDF4_EOS:EOS_GRID:"
MOD13Q1.A2007177.h17v04.005.2007204181956.hdf":MODIS_Grid_16DAY_250m_500m_VI:250m
16 days MIR reflectance
SUBDATASET_7_DESC=[4800x4800] 250m 16 days MIR reflectance
MODIS_Grid_16DAY_250m_500m_VI (16-bit integer)
SUBDATASET_8_NAME=HDF4_EOS:EOS_GRID:"
MOD13Q1.A2007177.h17v04.005.2007204181956.hdf":MODIS_Grid_16DAY_250m_500m_VI:250m
16 days view zenith angle
SUBDATASET_8_DESC=[4800x4800] 250m 16 days view zenith angle
MODIS_Grid_16DAY_250m_500m_VI (16-bit integer)
SUBDATASET_9_NAME=HDF4_EOS:EOS_GRID:"
MOD13Q1.A2007177.h17v04.005.2007204181956.hdf":MODIS_Grid_16DAY_250m_500m_VI:250m
16 days sun zenith angle
SUBDATASET_9_DESC=[4800x4800] 250m 16 days sun zenith angle
MODIS_Grid_16DAY_250m_500m_VI (16-bit integer)
SUBDATASET_10_NAME=HDF4_EOS:EOS_GRID:"
MOD13Q1.A2007177.h17v04.005.2007204181956.hdf":MODIS_Grid_16DAY_250m_500m_VI:250m
16 days relative azimuth angle
SUBDATASET_10_DESC=[4800x4800] 250m 16 days relative azimuth angle
MODIS_Grid_16DAY_250m_500m_VI (16-bit integer)
SUBDATASET_11_NAME=HDF4_EOS:EOS_GRID:"
MOD13Q1.A2007177.h17v04.005.2007204181956.hdf":MODIS_Grid_16DAY_250m_500m_VI:250m
16 days composite day of the year
SUBDATASET_11_DESC=[4800x4800] 250m 16 days composite day of the year
MODIS_Grid_16DAY_250m_500m_VI (16-bit integer)
SUBDATASET_12_NAME=HDF4_EOS:EOS_GRID:"
MOD13Q1.A2007177.h17v04.005.2007204181956.hdf":MODIS_Grid_16DAY_250m_500m_VI:250m
16 days pixel reliability
SUBDATASET_12_DESC=[4800x4800] 250m 16 days pixel reliability
MODIS_Grid_16DAY_250m_500m_VI (8-bit integer)
Corner Coordinates:
Upper Left ( 0.0, 0.0)
Lower Left ( 0.0, 512.0)
Upper Right ( 512.0, 0.0)
Lower Right ( 512.0, 512.0)
Center ( 256.0, 256.0)
The second problem: after extracting all bands without reprojecting, the
coordinates come with shifts when compared to extracted bands from mrt tools
gdalinfo from extracted bands with mrt tools is:
Driver: GTiff/GeoTIFF
Files: testemrt.tif
Size is 4800, 4800
Coordinate System is:
PROJCS["SINUSOIDAL Unspecified Datum. Semi-major axis: 6371007.181000,
Semi-minor axis: 0.000000",
GEOGCS["unnamed",
DATUM["unknown",
SPHEROID["unnamed",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["metre",1,
AUTHORITY["EPSG","9001"]]]
Origin = (-1111834.691493776600000,5559636.770208701500000)
Pixel Size = (231.656358263750060,-231.656358263750060)
Metadata:
AREA_OR_POINT=Point
TIFFTAG_SOFTWARE=MODIS Reprojection Tool v3.3a January 2006
Corner Coordinates:
Upper Left (-1111834.691, 5559636.770) ( 15d33'19.01"W, 49d59'56.25"N)
Lower Left (-1111834.691, 4447686.251) ( 13d 3'9.05"W, 39d59'56.25"N)
Upper Right ( 115.828, 5559636.770) ( 0d 0'5.83"E, 49d59'56.25"N)
Lower Right ( 115.828, 4447686.251) ( 0d 0'4.90"E, 39d59'56.25"N)
Center ( -555859.432, 5003661.510) ( 7d 4'10.08"W, 44d59'56.25"N)
Band 1 Block=4800x1 Type=Int16, ColorInterp=Gray
gdalinfo from extracted bands with gdal_translate is:
Driver: GTiff/GeoTIFF
Files: teste.tif
Size is 4800, 4800
Coordinate System is:
PROJCS["unnamed",
GEOGCS["Unknown datum based upon the custom spheroid",
DATUM["unknown",
SPHEROID["unnamed",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["metre",1,
AUTHORITY["EPSG","9001"]]]
Origin = (-1111950.519667000000000,5559752.598333000200000)
Pixel Size = (231.656358263958340,-231.656358263750060)
Metadata:
AREA_OR_POINT=Area
HDFEOSVersion=HDFEOS_V2.9
LOCALGRANULEID=MOD13Q1.A2007177.h17v04.005.2007204181956.hdf
...
NORTHBOUNDINGCOORDINATE=49.9999999955098
SOUTHBOUNDINGCOORDINATE=39.9999999964079
EASTBOUNDINGCOORDINATE=0.0129643652214683
WESTBOUNDINGCOORDINATE=-15.5572382657541
...
Corner Coordinates:
Upper Left (-1111950.520, 5559752.598) ( 15d33'26.06"W, 50d 0'0.00"N)
Lower Left (-1111950.520, 4447802.079) ( 13d 3'14.66"W, 40d 0'0.00"N)
Upper Right ( 0.000, 5559752.598) ( 0d 0'0.01"E, 50d 0'0.00"N)
Lower Right ( 0.000, 4447802.079) ( 0d 0'0.01"E, 40d 0'0.00"N)
Center ( -555975.260, 5003777.339) ( 7d 4'15.84"W, 45d 0'0.00"N)
Band 1 Block=4800x1 Type=Int16, ColorInterp=Gray
The third problem is with gdalwarp but i suppose it is originated by the
shifts occurred when extracting the bands (made previously). I want to
reproject images to WGS84 and so picked up esri prj files for sinusoidal and
wgs84 projections. Then i've changed the sinusoidal file by changing the
semimajor axis from 6371000 to 6371007.181 and by changing the degree. After
applied gdalwarp and shifts are maintained.
Can you please help me, as i said before i have a lot of imagery to process
and doing it one by one is completely absurd! So i really need some help so
that i can make it in batch mode!
Thanks in advance,
Hugo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20070731/4db60ec5/attachment.html
More information about the Gdal-dev
mailing list