[gdal-dev] GDAL 1.6.0 GDALValidateCreationOptions

Even Rouault even.rouault at mines-paris.org
Mon Nov 3 17:43:03 EST 2008


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 at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev




More information about the gdal-dev mailing list