[gdal-dev] modifying HDF4 subdatasets

Frank Warmerdam warmerdam at pobox.com
Tue Feb 17 15:11:11 EST 2009

Andrea Battisti wrote:
> Hi all,
> is it possible to modify existing HDF4 subdatasets using the GDAL/HDF4
> driver ?
> I see that the HDF4 driver should support the creation from scratch, but
> given a HDF4 file containing a set of subdatasets, would it be possible
> to open one of the subdatasets, (over)writing to it using RasterIO() ?
> If not, what is the correct way to modify the content of a sub-dataset?


GDAL currently only supports writing to the non-HDFEOS dataset type
it creates itself (I think "SDS" datasets).

I haven't tested update in place, but based on a brief review of the
code it seems it ought to work in simple cases.

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