[GRASSLIST:493] Re: creating legend file for vector map

Keith J. Forbes kforbes at gmx.net
Tue Jun 24 09:36:43 EDT 2003


On Friday 20 June 2003 17:15, Moritz Lennert wrote:
> ML  Keith J. Forbes said:
> ML  >
> ML  >
> ML  >
> ML  > On Friday 20 June 2003 15:00, Keith J. Forbes wrote:
> ML  >> KJ  Hi. I have imported using m.in.e00 e00 vector maps, and all the
> ML  >> associated KJ  categories have been imported and are stored in the
> ML  >> dig_cats
> ML  >> directory. I KJ  would like to create a legend file (preferably have
> ML  >> GRASS
> ML  >> do this for me) so KJ  that each category can de displayed with a
> ML  >> different
> ML  >> color and an KJ  accompanying legend.
> ML  >> KJ
> ML  >> KJ  The only info I have found so far is that I would have to create
> ML  >> this
> ML  >> bt hand KJ  using the category files, which seems to be quite
> ML  >> cumbersome.
> ML  >> KJ
> ML  >> KJ  I hope there is another way to do this, and would appreciate any
> ML  >> help.
> ML  >> Thanks KJ  in advance for your indulgence of a GRASS newbie.
> ML  >> KJ
> ML  >> KJ
> ML  >> KJ
> ML  >
> ML  >
> ML  >
> ML  > Well, I ended up doing this the hard way (by hand) by creating a
> legend ML  > file
> ML  > (table like this without header row of course) to use with
> d.vect.area: ML  >
> ML  > Cat. RGB
> ML  > 1  xxx xxx xxx
> ML  > 2 xxx xxy xxy
> ML  > and so on
> ML  >
> ML  > which worked fine after I got a RGB pallette from the web
> ML  >
> ML  > Now, I would like to display a legend along with the colored map
> matching ML  > the
> ML  > category labels to the colors.
> ML  >
> ML  > Help!!!
> ML  >
> ML
> ML  Well, the only way I know how you can do this is to create a new vector
> ML  file (in v.digit, for example) with as many areas (for example
> rectangles) ML  as you have categories, label each area with one of the
> category numbers ML  and apply your legend file to this new vector map.
> ML
> ML  If you create your legend file in v.digit, you can use the Customize ->
> ML  Select An Overlay vector Map option to overlay your base vector map in
> ML  order to place the legend at a convenient spot in relation to your base
> ML  vector map.
> ML
> ML  Moritz
> ML
> ML

Thanks Moritz. 

I have over 40 categories, and I tried digitizing a couple of rectangles and 
found that the process of creating rectangles without leaks, labelling them, 
etc. is quite cumbersome. There must be another way to get GRASS to use the 
legend file I made by hand (2 columns of text, one with categories, and 
another with RGB values) to make a legend box? 

Can anyone help with this???  Thanks in advance.

Keith



-- 
k|J|f




More information about the grass-user mailing list