[gdal-dev] Writing a GDAL Driver: two questions

Frank Warmerdam warmerdam at pobox.com
Mon Aug 16 11:50:46 EDT 2010


Martin Lambers wrote:
> Hello all,
> 
> I am writing a GDAL Driver for the GTA format
> <http://www.nongnu.org/gta/>. The driver can already read GTA files and
> create files with CreateCopy().
> 
> - What actions must a Driver support in GA_Update mode? Is it ok if it
> just implements GDALPamRasterBand::IWriteBlock() for data updates? Or
> does it have to support metadata updates, too?

Martin,

It is acceptable to issue an error in response to update to metadata,
coordinate system, georeferencing and such in Update mode if it is
impractical to update them.

> - A GTA file can have bands with different data types mixed freely (e.g.
> Byte, UInt16, CFloat32 all in one file). The Open() function can create
> a matching GDALDataset without problems, and the gdal* programs seem to
> be able to handle this. But the GDALDriver::Create() function only
> allows to create data sets with the same data type for all bands. Are
> different data types supported, or should I restrict the driver to only
> open files that use the same data type for all bands?

The only way to create mixed type files is to use AddBand() to
add the bands of different types.

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