[Gdal-dev] HDF control point dump for Aster DEM (and Modis)
Brent Fraser
bfraser at geoanalytic.com
Thu Feb 12 16:01:23 EST 2004
Andrey (or other HDFers),
I'm looking into control points in HDF files again, this time for Aster DEMs. Can gdalinfo or gdal_translate dump the control points as text to the screen?
Some background...
I've downloaded an Aster DEM from the EOS Data Gateway (http://edcimswww.cr.usgs.gov/pub/imswelcome/) and translated it to GeoTIFF with gdal_translate. For comparison, I also translated it GeoTIFF using HEG (http://hdfeos.gsfc.nasa.gov/hdfeos/details.cfm?swID=59). The positioning of HEG's GeoTIFF was accurate to about 200m (compared to 1:250k VMAP1 vector data), while GDAL's was out by about 2 kilometers.
I expect the difference is due to HEG using the 8 x 8 array of control points in the HDF file. I've got a program that will use the points to warp the DEM using triangulation, but I don't have an easy way to get a list of the gcps.
I used to HDFview (http://hdf.ncsa.uiuc.edu/hdf-java-html/hdfview/) to see how the gcps are stored in the HDF file, and it's not simple. Under "Geolocation Fields", it's a single grid named as MRGFLD_Latitude, as a single three-dimensional (2 x 8 x 8) array of 64-bit floats (64 gcps with lat in the first plane and lon in the second). This is significantly different from Modis HDF gcps which are stored as 2 two-dimensional arrays(one Latitude, the other Longitude) of 32-bit floats.
Given the popularity of Aster DEMs and Modis data it might make for a nice enhancement to gdalinfo to dump the gcps for these two types of HDF datasets...
Brent Fraser
GeoAnalytic Inc.
Tel:(403) 213-2700
bfraser at geoanalytic.com
www.geoanalytic.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20040212/6d69744f/attachment.html
More information about the Gdal-dev
mailing list