[GRASS-dev] RGB colored and Transparent areas in one vector map

Nikos Alexandris nik at nikosalexandris.net
Tue Mar 7 01:10:00 PST 2017


Nikos Alexandris wrote:

>> Dear all,
>>
>> I have an rgb_column with RGBs for a vector map. For some areas, I would
>> like to have no color, as in trasparent.
>>
>> If I am not wrong, we can't do that, ie define "nv" as we can do in
>> color rules for a raster map.
>>
>> Can we?

Moritz Lennert:

>I don't think so,
>
>The easiest workaround I see is to set your rgb_colum to NULL where you
>want transparency (or to create a separate transparency column) and
>display your map twice:
>
>d.vect MyMap rgb_column=MyCol where="MyCol IS NOT NULL"
>or
>d.vect MyMap rgb_column=MyCol where="transparency = 0"

Not quite. NULL is considered an invalid color rule (/value?). There is
a warning. Currently it works for me like:

d.vect hexagons rgb=rgb_column where="count IS NOT 0"

simply because it happens to have a "count" column with zeros.

>+
>
>d.vect MyMap fcol=none where="MyCol IS NULL"
>or
>d.vect MyMap fcol=none where="transparency = 1"

and

d.vect hexagons fcol=none
or
d.vect hexagons fcol=none where="count IS 0" color=white

Nikos

ps- I changed my mind and I would like to use a hexagon symbol (we don't
have one I think), sized according to the main values of interest (here
average values) and use the standard deviation as a fill color, or vice
versa. Will test.


More information about the grass-dev mailing list