[Qgis-developer] raster algebra plugin - numpy/Numeric problem

Martin Dobias wonder.sk at gmail.com
Mon Jan 12 10:39:38 EST 2009


On Fri, Jan 9, 2009 at 7:44 PM, Barry Rowlingson
<b.rowlingson at lancaster.ac.uk> wrote:
>  What seems to be happening is that on Windows, everything uses numpy
> arrays - so when I get raster data via python-gdal I get a numpy array
> back, which I then manipulate using numpy functions, and pass it back
> to python-gdal to write a new geoTiff. But with Ubuntu, I get a
> Numeric array back, manipulate it with numpy functions, and then pass
> a numpy array to python-gdal which promptly complains that the object
> doesn't have a 'typecode' method (which only Numeric arrays have).

Barry,

it seems like most of your questions are answered in this page:
https://trac.osgeo.org/gdal/wiki/GdalOgrInPython
(see Numpy/Numeric section at the bottom)

Bye
Martin


More information about the Qgis-developer mailing list