[GRASS-dev] grass.script.array.read: reading multiple rasters

Paulo van Breugel p.vanbreugel at gmail.com
Thu Jul 31 11:08:20 PDT 2014


To read in a raster with GRASS Python Scripting Library, I can use

ref = garray.array()
ref.read('mymap')

But is it also possible to read in multiple raster layers at once? 
Something like:

ref = garray.array()
ref.read(('map1','map2'))

If not, what would be the best way to get an array with data from 
multiple raster layers.. using a loop?

What I am after is to get an array with multiple variables (raster 
layers) to be used as input in e..g. numpy.cov 
(http://docs.scipy.org/doc/numpy/reference/generated/numpy.cov.html).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20140731/85266eb7/attachment.html>


More information about the grass-dev mailing list