[gdal-dev] How to extract information from datasets with three dimensionss

Frank Warmerdam warmerdam at pobox.com
Tue Mar 24 10:36:52 EDT 2009


2009/3/24 jor sion <jorsion at gmail.com>:
> Hi,
>
> I am using GDAL in CSharp to read the information from HDF files.
>
> To read the information from datasets with two dimensions is easy. but I
> don't know how to get the X_Axis and Y_Axis of the dataset. I can only get
> the information at the position (X_Axis, Y_Axis).

Jor,

I'm not sure what you mean by "get the X_Axis".  Perhaps you are wanting
to establish the geographic locations associated with different pixel and line
indexes into the band?  You would use the GetGeotransform() method to get
the affine transformation parameters between pixel/line and georeferenced
coordinates.

Read in particular the "Affine Geotransform" portion of:

  http://www.gdal.org/gdal_datamodel.html

> And it is diffcult to read data from datasets with three dimensions. It can
> only read one layer. I don't know how to  read all the layer's information.

Where datasets in HDF are 3D, each elevation (or time) layer
is normally represented as a distinct band.  In some cases there
may be metadata on the bands indicating their time/elevation level
but in other cases not.

GDAL is not particularly well organized to support 3D datasets.

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