[gdal-dev] Looking for a "surefire" way to get valid output formats.

Vlad vladimir.sandoval at yandex.com
Tue May 16 11:39:03 PDT 2017


Basically trying to keep users from selecting an invalid -of parameter in
translate and warp.

Looking at gdalinfo --formats I see this for PNG..

 PNG -raster- (rwv): Portable Network Graphics

and gdalinfo --format png, I get...

 Supports: Open() - Open existing dataset.
 Supports: CreateCopy() - Create dataset by copying another.
 Supports: Virtual IO - eg. /vsimem/

HOWEVER, the key/value pairs in the PNG driver metadata map give me...
"DCAP_CREATECOPY"=YES

and no "DCAP_CREATE". 

For a BMP I get a "DCAP_CREATE" = YES, and there is no "DCAP_CREATECOPY",
however I know translate will work with -of png or -of bmp.

What should I be looking at to see if a driver short name is a supported
output type?





--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Looking-for-a-surefire-way-to-get-valid-output-formats-tp5320711.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.


More information about the gdal-dev mailing list