[gdal-dev] Bindings for Python 2.0

Frank Warmerdam warmerda at h...
Mon Oct 30 10:12:44 EST 2000


Aleksey Naumov wrote:
> 
> 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

Fixed.

You are right, these were not 2.0 specific issues.

Best regards,

---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerda at h...
light and sound - activate the windows | http://members.home.com/warmerda
and watch the world go round - Rush | Geospatial Programmer for Rent




More information about the Gdal-dev mailing list