<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Andrey (or other HDFers),</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> 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?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Some background...</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I've downloaded an Aster DEM from the EOS Data
Gateway (<A
href="http://edcimswww.cr.usgs.gov/pub/imswelcome/">http://edcimswww.cr.usgs.gov/pub/imswelcome/</A>)
and translated it to GeoTIFF with gdal_translate. For comparison, I also
translated it GeoTIFF using HEG (<A
href="http://hdfeos.gsfc.nasa.gov/hdfeos/details.cfm?swID=59">http://hdfeos.gsfc.nasa.gov/hdfeos/details.cfm?swID=59</A>).
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.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>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.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I used to HDFview (<A
href="http://hdf.ncsa.uiuc.edu/hdf-java-html/hdfview/">http://hdf.ncsa.uiuc.edu/hdf-java-html/hdfview/</A>)
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.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>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...</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Brent Fraser</FONT></DIV>
<DIV><FONT face=Arial size=2>GeoAnalytic Inc.<BR>Tel:(403) 213-2700<BR><A
href="mailto:bfraser@geoanalytic.com">bfraser@geoanalytic.com</A><BR><A
href="http://www.geoanalytic.com">www.geoanalytic.com</A></FONT></DIV></BODY></HTML>