Hi Even, I got the failure when converting a 3 band img to a BMP image. I think converting a tiff to BMP will reproduce as well. I was thinking to make validation optional at run time by setting, e.g. config value.
Thanks, Gao, Peng > -----Original Message----- > From: Even Rouault [mailto:[EMAIL PROTECTED] > Sent: Monday, November 03, 2008 2:43 PM > To: gdal-dev@lists.osgeo.org > Cc: Peng Gao > Subject: Re: [gdal-dev] GDAL 1.6.0 GDALValidateCreationOptions > > Hi, > > Create()/CreateCopy() shouldn't fail if there's a warning due > to GDALValidateCreationOptions(). At least, I don't > understand how this can happen. Do you notice that behaviour > with a specific driver ? I couldn't reproduce a failure. > > For example, something like: > gdal_translate foo.tif bar.tif -co BAD_OPTION=YES > > just emits "Warning 6: Driver GTiff does not support > BAD_OPTION creation option" but the translation is done correctly. > > As far as avoiding the warning itself, there's always the > possibility of querying the GDAL_DMD_CREATIONOPTIONLIST > metadata item on the driver and look for the "TFW" string in > it to see if the option is supported or not. > > What would be your idea to make it optional ? At compilation > time ? Run time ? > > Regards, > Even > > Le Monday 03 November 2008 23:11:45 Peng Gao, vous avez écrit : > > Hi All, > > > > Create()/CreateCopy() now validates the creation options using > > GDALValidateCreationOptions(). > GDALValidateCreationOptions() generates > > a warning if any of creation options is not supported by the driver. > > Create()/CreateCopy() fails if there is a warning. > > > > This seems to be too harsh. My app breaks now since it > always includes > > a "TFW" creation option. > > > > Can the validation be optional? > > > > Regards, > > Gao, Peng > > _______________________________________________ > > gdal-dev mailing list > > gdal-dev@lists.osgeo.org > > http://lists.osgeo.org/mailman/listinfo/gdal-dev > > > > _______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev