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

ValiSystem vali.system at free.fr
Mon Aug 6 07:02:37 EDT 2007


On 3 août 07, at 17:35, 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

This is a known issue, Frank is aware (i've exactly the same problem  
- Feisty AMD64). If you are running an itanium (since you said ia64),  
you might give it as a precision on the trac ticket.

  http://trac.osgeo.org/gdal/ticket/1709

Cheers







More information about the Gdal-dev mailing list