[gdal-dev] gdalinfo doesn't show GEOS projection info

Ricardo Filipe Soares Garcia da ricardo.garcia.silva at gmail.com
Tue Apr 12 10:45:12 EDT 2011


Hi Rafa

According to my research on this matter, these HDF5 files (from
LANDSAF, I presume) are not georeferenced in a way that GDAL can
recognize.

There is in fact some information regarding the coordinate system in
the HDF5 file, but it is stored on the metadata of the root of the
HDF5 file, which is something that GDAL can't read (at least my 1.7.3
version can't). The solution I have found for this is to use some
other program (in my case, the pytables python module) to extract this
information.
After having this info it is still necessary to add some GCPs to the
files, in order to georeference them (still with the GEOS projection)
in a way that is understandable by GDAL. In order to obtain the
coordinates of the GCPs, I am using some reference formulas from the
LANDSAF PUMs, which will convert from pixel coordinate to latlon and
then proj4's cs2cs utility to convert them to the GEOS projection.
Finally I use the gdal_translate utility to add the GCPs to the file.

In the end, a gdalwarp can be used to reproject the file from GEOS
projection to another projection.

This is basically what I am doing in the script that I sent you
(off-list). If someone has another technique for georeferencing
LANDSAF HDF5 files I'd also be very interesetd in it ;)

Best regards


On Tue, Apr 12, 2011 at 3:24 PM, kingkastle <kingkastle4004 at gmail.com> wrote:
> Greetings,
>
> I'm working with hdf5 file  with the following attributes:
>
> (obtained with hdfview)
> http://osgeo-org.1803224.n2.nabble.com/file/n6265339/hdf5view.bmp
>
> However, when I gdalinfo the file, I get the following information:
> Driver: HDF5Image/HDF5 Dataset
> Files: none associated
> Size is 1701, 651
> Coordinate System is:
> GEOGCS["WGS 84",
>   DATUM["WGS_1984",
>       SPHEROID["WGS 84",6378137,298.257223563,
>           AUTHORITY["EPSG","7030"]],
>       TOWGS84[0,0,0,0,0,0,0],
>       AUTHORITY["EPSG","6326"]],
>   PRIMEM["Greenwich",0,
>       AUTHORITY["EPSG","8901"]],
>   UNIT["degree",0.0174532925199433,
>       AUTHORITY["EPSG","9108"]],
>   AUTHORITY["EPSG","4326"]]
> Corner Coordinates:
> Upper Left  (    0.0,    0.0)
> Lower Left  (    0.0,  651.0)
> Upper Right ( 1701.0,    0.0)
> Lower Right ( 1701.0,  651.0)
> Center      (  850.5,  325.5)
> Band 1 Block=1701x1 Type=Int16, ColorInterp=Undefined
>  Metadata:
>   DSSF:CLASS=Data
>   DSSF:PRODUCT=DSSF
>   DSSF:PRODUCT_ID=111
>   DSSF:N_COLS=1701
>   DSSF:N_LINES=651
>   DSSF:NB_BYTES=2
>   DSSF:SCALING_FACTOR=10
>   DSSF:OFFSET=0
>   DSSF:MISSING_VALUE=-1
>   DSSF:UNITS=W/m**2
>   DSSF:CAL_SLOPE=1
>   DSSF:CAL_OFFSET=0
>
> So, basically I can't see in the gdalinfo the following information:
>
> +) Proyection used
> +) Origin
> +) Pixel size
>
> In fact, when I do gdal-translate the file created is not georeferenced
> rightly.
>
> In my opinion, the problem is that the hdf5 attributes are imcomplete or not
> rightly defined,
>
> Please let me know your opinion
>
> Many thanks in advance and best regards,
>
> Rafa
>
>
> --
> View this message in context: http://osgeo-org.1803224.n2.nabble.com/gdalinfo-doesn-t-show-GEOS-projection-info-tp6265339p6265339.html
> Sent from the GDAL - Dev mailing list archive at Nabble.com.
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
___________________________ ___ __
Ricardo Garcia Silva


More information about the gdal-dev mailing list