On Oct 28, 2009, at 11:35 AM, Frank Warmerdam wrote:

Luca Fasano wrote:
Hi all,
I need a way to retrieve a GDAL DataType (its code or its string name,
it's the same) starting from all information on it. Does it exist a
class or method to to this?
For example:
GdalDataType(nbits=32, float=True, Complex=True) -> gdal.GDT_CFloat32
I use Python bindings for GDAL.
I'd like to avoid building the string manually (i.e.
'GDT_'+'C'+'Float'+'32')
Thanks

Luca,

No such function exists.

We could take a patch and apply it to the Python bindings if you were to provide it though. That would be handy, especially if it were smart enough to throw exceptions for permutations that can't exist in GDAL.

Howard
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to