[Gdal-dev] Problem with python-gdal on ia64 Unbuntu Feisty

Howard Butler hobu.inc at gmail.com
Fri Aug 3 12:44:29 EDT 2007


Jonah,

This bug has been reported <http://trac.osgeo.org/gdal/ticket/1712>,  
which is a re-opening of <http://trac.osgeo.org/gdal/ticket/1379>,  
which we thought we fixed.   The proposed patch in 1712 will work,  
but it isn't universal, and we need something that can be applied in  
the SWIG interface file instead of being applied to the output.

Howard


On Aug 3, 2007, at 10:35 AM, Jonah Duckles wrote:

> I am using Ubuntu fesity 64-bit and having problems with using  
> python bindings.  Specifically when I try to us "ReadAsArray():
>
> raster_file = sys.argv[1]
> raster = gdal.Open(raster_file,GA_ReadOnly)
> myarray = raster.ReadAsArray()
>
> Traceback (most recent call last):
>   File "gdal-test.py", line 12, in <module>
>     myarray = inraster.ReadAsArray ()
>   File "/usr/lib/python2.5/site-packages/gdal.py", line 747, in  
> ReadAsArray
>     return gdalnumeric.DatasetReadAsArray( self, xoff, yoff, xsize,  
> ysize )
>   File "/usr/lib/python2.5/site-packages/gdalnumeric.py", line 133,  
> in DatasetReadAsArray
>     return BandReadAsArray( ds.GetRasterBand(1), xoff, yoff, xsize,  
> ysize)
>   File "/usr/lib/python2.5/site-packages/gdalnumeric.py", line 181,  
> in BandReadAsArray
>     buf_xsize, buf_ysize, datatype, buf_obj )
> TypeError: Unaligned buffer
>
> I am guessing this is some sort of datatype mismatch on 64-bit  
> systems as this works splendidly on 32-bit debian machines, but  
> fails on my 64-bit machine.
>
> I am using the default python-gdal package and its dependents as  
> installed in Feisty 7.04
>
> Any idea what it might be?
>
> Thanks,
> Jonah
>
> -- 
> Jonah Duckles
> Graduate Research Assistant
> Purdue University
> Forestry and Natural Resources
> 195 Marsteller Street
> West Lafayette, IN 47907
> (765)532-1126
> _______________________________________________
> Gdal-dev mailing list
> Gdal-dev at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/gdal-dev




More information about the Gdal-dev mailing list