[FWTools] Extract to binary with meta, manipulate, then project

Frank Warmerdam warmerdam at pobox.com
Sun Feb 4 14:49:36 EST 2007

Simon Hook wrote:
> Hi Frank,
> The processing I do will likely add or take away bands but the x and y 
> dimensions of the image will stay the same. Assuming I can edit the .aux 
> file (i.e. it is ascii rather than binary) that should work.


The PAux driver's .aux file is a simple ascii file.

 > Does the
> aux just use the 4 corners? I am not sure if you know this but ASTER 
> files contain two arrays (1 lat, 1 lon), with points throughout the 
> scene, that should be expanded to produce a lat/lon for each pixel. If 
> you use the 4 corners, there will be some error because pixel spacing 
> varies across the scene. Several programs ignore these arrays, e.g. 
> ENVI. Also can you extract all the ASTER products, not just the 1B (I 
> want to do some work with the emissivity product).

GDAL has a mechanism to keep track of lat/lon bands per:


This *should* exist for 1B ASTER products, so you can extract the lat and
lon as distinct files if you want.  But, the gdalwarp program does not
currently support this kind of geolocation array, so you can't ultimately
use them to geocode your image unless you have something else to do the
actual work.

Note that metadata does not get written to .aux files, so the correct
subdataset identify for geolocation arrays will only be evident in the
gdalinfo report, not the .aux file.

The GDAL HDF4 driver attempt to be broadly useful for a variety of
HDF4 format products, and it should be useful for a variety of ASTER
product levels.  However, the extraction quality of geolocation, and metadata
may vary.

Best regards,
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org

More information about the FWTools mailing list