[GRASSLIST:6354] Re: convert vector to raster

Maciek Sieczka werchowyna at epf.pl
Wed Apr 6 15:29:09 EDT 2005


Thank for your interest Carlos, but I meant how to:

1. assign a colortable to a vector layer, based on a given column of 
attributes (something like r.colors for rasters)
2. preserve the rasters colortable after v.to.rast in the resulting vector 
layer (having RGB codes stored in GRASSRGB column)

Has anybody got an idea how to achieve this fairly easily so it could be 
used for a daily work? Or would it require new functionality in Grass?

Maciek

----- Original Message ----- 
From: "Carlos Henrique Grohmann" <guano at usp.br>
To: "Maciek Sieczka" <werchowyna at epf.pl>
Cc: "GRASS mailing list" <GRASSLIST at baylor.edu>
Sent: Wednesday, April 06, 2005 1:56 PM
Subject: Re: [GRASSLIST:6343] Re: convert vector to raster


> Maciek,
>
> in ps.map you can specify the RGB color you want for vector areas, but you 
> will
> have to make one entry in you script file for each color (check out ps.map 
> man
> page). for example, in a geologic map:
>
> vareas geology
> layer 1
> masked y
> where lithology='sandstone'
> label Sandstone
> color black
> fcolor 215:93:63
> width 0.1
> end
>
>
> You do this for each lithology (or soil type, in your case)
>
>
> Hope this helps
>
> Carlos
>
>
> -- 
> +----------------------------------------------------------+
>          Carlos Henrique Grohmann - Guano
>   Geologist M.Sc - Doctorate Student at IGc-USP - Brazil
>        Linux User #89721  - guano at usp dot br
> +----------------------------------------------------------+
>
>
> Citando Maciek Sieczka <werchowyna at epf.pl>:
>
>> Hi
>>
>> I've got a question regarding the opposite situation. When I convert a
>> colorfull integer raster (eg. landuse) to vector polygons, how can I
>> preserve colors in the resulting polygon vector layer, ie. copy raster's 
>> RGB
>>
>> values to output's datatable GRASSRGB column?
>>
>> Also, is it possible to assign colors to vector layer automaticaly in a
>> similar way that  r.colors does it for rasters? It's important for 
>> ps.map.
>> So far I've been converting my polygon vectors to raster, r.colors, and
>> ps.map then. How could I specify a colortable directly on a vector layer?
>>
>> Maciek
>>
>> ----- Original Message ----- 
>> From: "Michael Barton" <michael.barton at asu.edu>
>> To: "Carlos Henrique Grohmann" <guano at usp.br>; "GRASS mailing list"
>> <GRASSLIST at baylor.edu>
>> Sent: Wednesday, April 06, 2005 7:24 AM
>> Subject: [GRASSLIST:6343] Re: convert vector to raster
>>
>>
>> > Carlos,
>> >
>> > You are almost there. Use the 'rules' option in r.colors to specify the
>> > color you want for each value in your new raster map. Then you can do 
>> > the
>> > drape with the colors you want. For an ortho-view, create a shaded 
>> > relief
>> > map (under raster/terrain analysis in the menus). Then drape the 
>> > colored
>> > geology raster over it using d.his (display/display raster map in the
>> > menus).
>> >
>> > Michael
>> >
>> >
>> > On 4/5/05 2:29 PM, "Carlos Henrique Grohmann" <guano at usp.br> wrote:
>> >
>> >> Dears,
>> >> I was trying to make a 3D dysplay of a DEM with geology over it, but 
>> >> NVIZ
>> >> doesn't handle vector areas (color filed), so I figured out about 
>> >> convert
>>
>> >> my
>> >> vector geology to raster, but then I couldn't get the colors! I can 
>> >> set
>> >> up a
>> >> single value, or a column in the table, but this col can't be 
>> >> GRASSRGB,
>> >> which
>> >> I
>> >> use to give me the right colors on screen.
>> >> How can I get this 3D-geology?
>> >>
>> >> thanks all
>> >>
>> >> Carlos
>> >
>> > -- 
>> > Michael Barton, Professor
>> > School of Human Origins, Cultures, & Society
>> > Arizona State University
>> > Tempe, AZ  85287
>> >
>> > Web - http://www.public.asu.edu/~cmbarton
>> >
>> >
>>
>>
>
> 




More information about the grass-user mailing list