On 27 February 2014 22:06, Pietro <[email protected]> wrote:
> Hi Javier,
>

Hi,

>
> yes, this bug should be fixed in (r59127), I've tried this code using
> the North Carolina mapset:
>
> from grass.pygrass.raster import RasterNumpy
> elev = RasterNumpy('elevation')
> elev.open()
> flt = elev.flatten()
> len(flt)
> elev.close()
>
> and it works, are you in Linux?
>

I confirm this.
I would also add that it if you want to save the map you have to use:

flt = pygrass.raster.RasterNumpy('elevation_flatten')
flt.open('w',mtype='FCELL')
flt = elev.flatten()
elev.close()
flt.close()

otherwise you obtain an error (segmentation fault)

-- 
ciao
Luca

http://gis.cri.fmach.it/delucchi/
www.lucadelu.org
_______________________________________________
grass-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to