[Gdal-dev] Can we extract a band of a envisat .n1 file?

Frank Warmerdam warmerdam at pobox.com
Fri Jan 20 22:20:24 EST 2006


On 1/20/06, jluis <jluis at ualg.pt> wrote:
> Hi,
> I am thinking on something similar to the hdf4 page example
> gdalinfo HDF4_SDS:MODIS_L1B:GSUB1.A2001124.0855.003.200219309451.hdf:2

J. Luis,

The HDF4 driver treats each image array in a
dataset as a distinct "subdataset" with the funky
naming convention you see above.

The Envisat driver does not do that since all the
data layers have the same geometry.  Instead
it treats them all as "bands".  If you do a gdalinfo on
an envisat data you should see something like (partial):

Lower Right (  512.0,  512.0)
Center      (  256.0,  256.0)
Band 1 Block=512x1 Type=Int16, ColorInterp=Undefined
  Description = 11500_12500_NM_NADIR_TOA_MDS
Band 2 Block=512x1 Type=Int16, ColorInterp=Undefined
  Description = 10400_11300_NM_NADIR_TOA_MDS
Band 3 Block=512x1 Type=Int16, ColorInterp=Undefined
  Description = 03505_03895_NM_NADIR_TOA_MDS

So, based on the band descriptions you can identify
what each band is.  Then you can use normal GDAL
mechanisms to select a band.  For instance, to translate
just the first band to GeoTIFF you could use:

  gdal_translate -b 1 ATS.N1 11500_12500_NM.tif

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    | Geospatial Programmer for Rent




More information about the Gdal-dev mailing list