[gdal-dev] problem with HDF format

Even Rouault even.rouault at spatialys.com
Wed Feb 15 08:54:48 PST 2017


Luca,

from a quick skim in the code, the GRINGPOINTLATITUDE / GRINGPOINTLONGITUDE 
metadata are not used by the HDF4 driver to derive the georeferencing it uses, so it is not 
unexpected that what gdalinfo reports on the MODIS dataset isn't directly correlated with 
those. There are several code paths depending on the actual formulation of HDF4 to derive 
the GDAL georeferencing info from the dataset.

Even

> 
> probably we found a problem with GDAL and HDF format, we are trying to
> merge several MODIS tiles but we got a wrong "Corner Coordinates"
> 
> These are our input files
> 
> gdalinfo MOD11A1.A2012340.h29v05.005.2012342062359.hdf
>  GRINGPOINTLATITUDE.1=39.9958333333333, 39.9958333333333,
> 30.0041666666667, 30.0041666666667
>  GRINGPOINTLONGITUDE.1=143.594796204465, 156.637998651088,
> 138.5660967488, 127.027721580114
> 
> gdalinfo MOD11A1.A2012340.h28v05.005.2012342062414.hdf
>   GRINGPOINTLATITUDE.1=39.9958333333333, 39.9958333333333,
> 30.0041666666667, 30.0041666666667
>   GRINGPOINTLONGITUDE.1=130.54074741744, 143.583922543306,
> 127.018104673762, 115.479756825833
> 
> gdalinfo MOD11A1.A2012340.h28v04.005.2012342062356.hdf
>   GRINGPOINTLATITUDE.1=49.9958333333333, 49.9958333333333,
> 40.0041666666667, 40.0041666666667
>   GRINGPOINTLONGITUDE.1=155.572379857539, 171.116660974438,
> 143.601448808716, 130.556661758206
> 
> but using gdalbuildvrt, gdal_merge and gdalwarp we got a bigger upper
> right value (173.313142 instead 171.116660974438), you can see our
> tests here [0]
> 
> do you have any idea? is it a bug or feature?
> 
> [0] http://pastebin.com/KGYvFtfn


-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20170215/91669847/attachment.html>


More information about the gdal-dev mailing list