[GRASSLIST:6466] plot points in different color

Dear GRASS users,

I have a point data associated with PostgreSQL table. I would like to
fill the points with RGB color based on their attribute (typical desktop
GIS task).

I used "grassrgb" column in PG table and "d.vect -a" command but it did
not fill them with color. Manual page for "d.vect" says that "-a" option
works only for area type vector data;-(((

How can I fill the points with the color based on their attribute in
GRASS?

Thanks,

Rado

PG TABLE:

   east | north | id | perc | grassrgb
-----------+-----------+--------+------+-----------
481412.45 | 114890.02 | 115758 | 23 | 255:201:0
436976.24 | 16658.02 | 116194 | 32 | 255:201:0
513015.88 | 108963.68 | 116285 | 31 | 255:201:0
563716.89 | 82973.91 | 116442 | 23 | 255:201:0
559728.19 | 55266.49 | 108167 | 15 | 255:255:0
523753.84 | 96061.85 | 193121 | 5 | 255:255:0
554137.91 | 25981.95 | 193180 | 5 | 255:255:0
525675.06 | -22426.98 | 110254 | 59 | 255:137:0
582684.19 | 60473.42 | 116426 | 54 | 255:137:0
502887.37 | 57836.26 | 109116 | 67 | 255:70:0
577125.90 | 32710.38 | 110049 | 65 | 255:70:0
420653.26 | 82045.02 | 106823 | 92 | 233:0:54
413557.10 | 27108.21 | 106898 | 92 | 233:0:54
431697.39 | 34068.04 | 106955 | 92 | 233:0:54

GRASS COMMAND (layer "netemp" is linked with table above):

d.vect -a map=netemp icon=basic/circle attrcol=perc

Hi!
On 4/14/05, Rado Bonk <rado.bonk@jrc.it> wrote:

I have a point data associated with PostgreSQL table. I would like to
fill the points with RGB color based on their attribute (typical desktop
GIS task).

I wanted to achieve the something similar, but couldn't work out how
to do it. My aim was to have the points coloured according to some
attribute value (be it elevation, or something else), using a palette.
I couldn't suss out how to do it, so I ended up using GMT.

Now I want to do the same with nviz: I wans to plot some tracks on my
raster with some attribute coded as colour, but I think there's no way
of doing this (I can set a single colour for a points vector set, not
a palette).

So rather than answering your question :), I add to it: is it possible
to do this?

Many thanks
Jose

> I have a point data associated with PostgreSQL table. I would like
> to fill the points with RGB color based on their attribute (typical
> desktop GIS task).

I think currently you have to use a shell script:

d.vect cats= fcolor=

for each category.

you could use db.select as a source to feed these values in automatically.

Not very pretty, but I think it would work.

I wanted to achieve the something similar, but couldn't work out how
to do it. My aim was to have the points coloured according to some
attribute value (be it elevation, or something else), using a palette.
I couldn't suss out how to do it, so I ended up using GMT.

Now I want to do the same with nviz: I wans to plot some tracks on my
raster with some attribute coded as colour, but I think there's no way
of doing this (I can set a single colour for a points vector set, not
a palette).

So rather than answering your question :), I add to it: is it possible
to do this?

the following things need to happen:
a) d.vect gets support for GRASSRGB column -> fill color for points
b) NVIZ would need support for vector areas
c) NVIZ would need support for vector area/points fill color

Feel free to add these to the GRASS wish list if they are not already
in there, or try your hand at coding them yourself.

http://grass.ibiblio.org/bugtracking/bugreport.html

Hamish

On 4/15/05, Hamish <hamish_nospam@yahoo.com> wrote:

> > I have a point data associated with PostgreSQL table. I would like
> > to fill the points with RGB color based on their attribute (typical
> > desktop GIS task).

I think currently you have to use a shell script:

d.vect cats= fcolor=

for each category.

you could use db.select as a source to feed these values in automatically.

   Presumably, to do this based on attribute, one would need to
classify the points first in classes?

> I wanted to achieve the something similar, but couldn't work out how
> to do it. My aim was to have the points coloured according to some
> attribute value (be it elevation, or something else), using a palette.
> I couldn't suss out how to do it, so I ended up using GMT.
>
> Now I want to do the same with nviz: I wans to plot some tracks on my
> raster with some attribute coded as colour, but I think there's no way
> of doing this (I can set a single colour for a points vector set, not
> a palette).
>
> So rather than answering your question :), I add to it: is it possible
> to do this?

the following things need to happen:
a) d.vect gets support for GRASSRGB column -> fill color for points
b) NVIZ would need support for vector areas
c) NVIZ would need support for vector area/points fill color

Feel free to add these to the GRASS wish list if they are not already
in there, or try your hand at coding them yourself.

OK, I have achieved this with GMT (grdview + psxyz, if anyone is
interested), but nviz would be great.

Thanks for the help
Jose

> > > I have a point data associated with PostgreSQL table. I would
> > > like to fill the points with RGB color based on their attribute
> > > (typical desktop GIS task).
>
> I think currently you have to use a shell script:
>
> d.vect cats= fcolor=
>
> for each category.
>
> you could use db.select as a source to feed these values in
> automatically.

   Presumably, to do this based on attribute, one would need to
classify the points first in classes?

you could do this right at the display step using d.vect's cats= and
where= options to restrict to a SQL query. e.g.,

d.vect map where="individual='juvenile' and area='beach'"

Hamish