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

Jonah Duckles jduckles at purdue.edu
Fri Aug 3 11:35:42 EDT 2007


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20070803/349d0b52/attachment.html


More information about the Gdal-dev mailing list