Hi, I am using the GRASS-numpy functionality [1] to read a python numpy.array from a GRASS raster map (GRASS7):
import grass.script.array as garray a = garray.array() a.read(map) Here [2] it says that also the null value can be specified. So what is the actual null value in GRASS so that the raster map is correctly saved as numpy.array with numpy.nan where appropriate? And a second related question: Does grass.script.array.read() respect an existing MASK so that areas that are masked will get numpy.nan? Of course this can also be done within numpy like map[numpy.isnan(mask)] but this again needs to properly define the nan value when reading the raster mask into an numpy.array. Best regards, Johannes [1] http://grasswiki.osgeo.org/wiki/GRASS_Python_Scripting_Library#Interfacing_with_NumPy [2] http://grass.osgeo.org/programming6/classpython_1_1array_1_1array.html#a493c541122108eca3fc4b441fe1a5487
_______________________________________________ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user