[GRASS-dev] How to access the value of each cell for every row column with pygrass?

Hamish hamish_b at yahoo.com
Sun Sep 22 16:15:20 PDT 2013


Nick wrote:

> Using pygrass is it possible to create a matrix or a numpy
> array which will contain each cell's  value?
>
> Something similar like gdals ReadAsArray function?


have a look at the RasterNumpy class,

https://trac.osgeo.org/grass/browser/grass/trunk/lib/python/pygrass/docs/raster.rst#L308



Hamish



More information about the grass-dev mailing list