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

Arpita Singh singarpita at gmail.com
Fri Jan 9 23:26:45 EST 2009


---------- Forwarded message ----------
From: Arpita Singh <singarpita at gmail.com>
Date: Sat, Jan 10, 2009 at 9:42 AM
Subject: Re: [Qgis-developer] raster algebra plugin - numpy/Numeric problem
To: Barry Rowlingson <b.rowlingson at lancaster.ac.uk>
Cc: qgis-developer List <qgis-developer at lists.osgeo.org>


hello,
      I want to build QuickPrint Option Window For my app, where it display
the window as in Quantum Gis of adding north arrow ,title, legend and logo..
I am new in this so plz help by giving some code in python.

i know there must be solution with you all, thanks in advance.

arpita

On Sat, Jan 10, 2009 at 12:14 AM, Barry Rowlingson <
b.rowlingson at lancaster.ac.uk> wrote:

> Okay, so I'm getting my new raster algebra plugin working. Runs fine
> at home on  Windows with Qgis 1.0.0-preview2.
>
>  I try it on Linux, on Qgis 1.0.0-Kore. Fails because of API changes,
> so I fix those. Then it fails while playing with raster data from
> gdal.
>
>  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).
>
>  I think the change happened between python-gdal 1.4 and 1.5. Is it
> worth working round the Numeric array problem or does anyone know if
> things are going to be updated soon? What does Ubuntu Intrepid Ibex
> have? What python-gdal is available for MacOS?
>
>  The workaround involves making sure I pass the right sort of array to
> the writing functions, but that involves knowing what python-gdal
> expects and copying the data when converting it to Numeric array.
> Something worth avoiding. Oh well.
>
>  Sorry this is less of a qgis problem and more of a python-gdal one...
> But I'm sure you guys know the answer...
>
> Barry
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>



-- 
Arpita



-- 
Arpita
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/qgis-developer/attachments/20090110/cf30d577/attachment-0001.html


More information about the Qgis-developer mailing list