[GRASS-user] Converting a color to NULL

Jannis Achstetter krippi at gmail.com
Wed Jul 11 02:25:48 EDT 2007


Hello list,

First of all: I'm using GRASS 6.2.1 (2006) on a x86_64-machine running
Gentoo Linux.
My problem is that I download kind of vector data via WMS (so, I get
raster maps). Unfortunatelly, there is no other way than to get the data
via WMS.
What I get is a map with two areas, both not closed (they actually
continue beyond the region) with a one-pixel-line a the borders (not
where the region ends). I tried to get the data as PNG-image, which
works (in GIMP, I see the areas and the transparent-checker, where it
should be) but GRASS some kind of ignores the alpha-layer, I get a
"map.1" and a "map.alpha", the first is displayed completely black and
the other one completely white, meaning the information I actually want
to display is lost. So I tried to get the data as jpeg which gives me
red, green, blue and alpha, where alpha is all white (I know, jpegs
can't do transparency).
I combined the RGB-layers to a composite-image and I can overlay it to
my other raster-maps using the GIS Manager.

The problem is: where "no data" should be, white is displayed, instead
of NULL. How do I change that? I tried using r.colors but it seems only
to work the other way round (set a color where NULL (nv) was), not
deleting one specific color.
I tried to convert the raster map to vector (using r.to.vect) but even
with smoothing, I get 338321 boundaries and 155782 areas, where actually
only 2 should exist.

Is there a way to change what is white in my raster-map to NULL or is
there a good way to convert the raster-map to vector?

Sincerely,
    Jannis Achstetter




More information about the grass-user mailing list