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

Moritz Lennert mlennert at club.worldonline.be
Fri Jun 20 12:15:11 EDT 2003


Keith J. Forbes said:
>
>
>
> On Friday 20 June 2003 15:00, Keith J. Forbes wrote:
>> KJ  Hi. I have imported using m.in.e00 e00 vector maps, and all the
>> associated KJ  categories have been imported and are stored in the
>> dig_cats
>> directory. I KJ  would like to create a legend file (preferably have
>> GRASS
>> do this for me) so KJ  that each category can de displayed with a
>> different
>> color and an KJ  accompanying legend.
>> KJ
>> KJ  The only info I have found so far is that I would have to create
>> this
>> bt hand KJ  using the category files, which seems to be quite
>> cumbersome.
>> KJ
>> KJ  I hope there is another way to do this, and would appreciate any
>> help.
>> Thanks KJ  in advance for your indulgence of a GRASS newbie.
>> KJ
>> KJ
>> KJ
>
>
>
> Well, I ended up doing this the hard way (by hand) by creating a legend
> file
> (table like this without header row of course) to use with d.vect.area:
>
> Cat. RGB
> 1  xxx xxx xxx
> 2 xxx xxy xxy
> and so on
>
> which worked fine after I got a RGB pallette from the web
>
> Now, I would like to display a legend along with the colored map matching
> the
> category labels to the colors.
>
> Help!!!
>

Well, the only way I know how you can do this is to create a new vector
file (in v.digit, for example) with as many areas (for example rectangles)
as you have categories, label each area with one of the category numbers
and apply your legend file to this new vector map.

If you create your legend file in v.digit, you can use the Customize ->
Select An Overlay vector Map option to overlay your base vector map in
order to place the legend at a convenient spot in relation to your base
vector map.

Moritz




More information about the grass-user mailing list