[Gdal-dev] Failure in opening a pci disk file

Andrey Kiselev dron at ak4719.spb.edu
Fri Nov 28 15:50:45 EST 2003


On Fri, Nov 28, 2003 at 02:11:04PM -0500, Frank Warmerdam wrote:
> It is arguable whether it makes sense to successfully return a dataset
> if there are no bands of raster data.  I don't mind what the PCIDSK
> driver does now, but would agree that it would be helpful to the user
> if it at least returned a warning if there were no bands.
> 
> Andrey, could you add that?

Ok, I have added warning.

Noureddine,

It is better to check the number of bands after opening the dataset to
ensure we have any raster data inside. I don't want to return NULL in
case of no bands, because it may be useful (at least for me :-) to get
other dataset parameters such as projection definition, coordinates,
descriptions etc.

					Regards,
					Andrey

-- 
Andrey V. Kiselev
Home phone:  +7 812 5274898  ICQ# 26871517



More information about the Gdal-dev mailing list