[Qgis-user] 0, null values and color table GRASS/QGIS

Patrick Giraudoux patrick.giraudoux at univ-fcomte.fr
Wed Aug 29 03:27:24 PDT 2012


------------------------------

Message: 3
Date: Tue, 28 Aug 2012 10:45:22 +0200
From: Paolo Cavallini<cavallini at faunalia.it>
To:qgis-user at lists.osgeo.org
Subject: Re: [Qgis-user] 0, null values and color table GRASS/QGIS
Message-ID:<503C8522.5050004 at faunalia.it>
Content-Type: text/plain; charset=ISO-8859-1

Il 28/08/2012 09:24, Patrick Giraudoux ha scritto:

> Hi,
>
> I am using QGIS 1.7.0 Wroclaw (and GRASS 6.4.1 inside).
>
This is old, please upgrade to 1.8.
Thanks.

-- Paolo Cavallini - Faunalia www.faunalia.eu Full contact details at 
www.faunalia.eu/pc Nuovi corsi QGIS e PostGIS: 
http://www.faunalia.it/calendario




Absolutely, right. It works OK in 1.8.0-Lisboa. Thanks.

Patrick




Le 28/08/2012 09:24, Patrick Giraudoux a écrit :
> 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