Bindings for Python 2.0

Aleksey Naumov naumov at a...
Mon Oct 30 03:08:08 EST 2000


Frank,

> Note that I have never tried the GDAL python bindings with Python 2.0. I
> would appreciate hearing if it works or not.

I went through functions/methods in gdal.py, they work just fine,
with only 2 exceptions (and they don't look 2.0 specific):

1.
class Band:
def GetRasterColorTable(self):
_ct = _gdal.GDALGetRasterColorTable( self._o )
if _ct is None:
return None
else:
return gdal.GDALColorTable( _ct )
Should be: return _gdal.GDALColorTable( _ct )

2. Band.GetNoDataValue:
>>> aBand.GetNoDataValue()
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/local/lib/python2.0/site-packages/gdal.py", line 323, in
GetNoDataValue
return _gdal.GDALGetRasterNoDataValue(self._o)
AttributeError: GDALGetRasterNoDataValue


Still have to check osr.py...

Best regards,
Aleksey








More information about the Gdal-dev mailing list