[Qgis-user] 0, null values and color table GRASS/QGIS
Patrick Giraudoux
patrick.giraudoux at univ-fcomte.fr
Tue Aug 28 00:24:56 PDT 2012
Hi,
I am using QGIS 1.7.0 Wroclaw (and GRASS 6.4.1 inside).
I have some troubles with map displays in QGIS with 0 and null values.
I just want to extract a particular habitat category from a Global Land
Cover 2000 raster into a raster of presence/absence (and NULL value for
ocean and waterbodies)
This makes the following:
r.mapcalc "V7_01=if(AsiaGLC2000==7,1,0)"
So far so good, I get a raster V7_01 with null values and 1 for pixel of
category 7, 0 for the others and null values stay NULL. All is correctly
displayed by QGIS.
Now, I would like to transform V7_01 into a floating point map, and then
use r. neighbors for a neigborhood analysis.
r.mapcalc "V7=1.0*V7_01"
I get a raster named V7 BUT strangely for any color table, 0 value is
considered NULL (transparent) when displayed by QGIS. However, the
original NULL values are well kept and distinct in this raster (e.g.
NULL pixels are informed as NULL and 0 pixels are 0, respectively, which
is correctly displayed within GRASS).
An indication about what happen is that the metadata inform that null
values(nodata) are -2.14748e+09 in AsiaGLC2000 and V7_01, but become
2.22507e-308 in V7 (so close to 0).
Any suggestion welcome, I am stuck...
Patrick
More information about the Qgis-user
mailing list