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

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?

I did not test for removing the centroids, from the areas which I want
transparency. Then again, this isn't the right answer I feel.

Thanks, Nikos

On 06/03/17 12:44, 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?

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"

+

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

Moritz

On Mon, Mar 6, 2017 at 6:44 AM, Nikos Alexandris <nik@nikosalexandris.net>
wrote:

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.

Try setting the column value to "none" (usually implemented for parameters,
I'm not sure here).

Note that "nv" is 'no value' (NULL), not 'no color' in the color rules
syntax.

Vaclav

Nikos Alexandris:

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.

Vaclav Petras:

Try setting the column value to "none" (usually implemented for parameters,
I'm not sure here).

Does not work, already tried that before.

Note that "nv" is 'no value' (NULL), not 'no color' in the color rules
syntax.

Right!

Nikos

On Mon, Mar 6, 2017 at 11:20 AM, Nikos Alexandris <nik@nikosalexandris.net> wrote:

Vaclav Petras:

Try setting the column value to “none” (usually implemented for parameters,
I’m not sure here).

Does not work, already tried that before.

It would make sense to have it, please open a feature request.

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.

On Tue, Mar 7, 2017 at 4:10 AM, Nikos Alexandris <nik@nikosalexandris.net>
wrote:

I would like to use a hexagon symbol (we don't
have one I think)

We actually do:

https://trac.osgeo.org/grass/changeset/70136

I though it might be useful, e.g. for legend of v.mkgrid -h.

Did you open the ticket for no color from attr table?

* Vaclav Petras <wenzeslaus@gmail.com> [2017-03-09 13:33:41 -0500]:

On Tue, Mar 7, 2017 at 4:10 AM, Nikos Alexandris <nik@nikosalexandris.net>
wrote:

I would like to use a hexagon symbol (we don't
have one I think)

We actually do:

https://trac.osgeo.org/grass/changeset/70136

I though it might be useful, e.g. for legend of v.mkgrid -h.

Did you open the ticket for no color from attr table?

#3313
Nikos