[GRASSLIST:8206] key column for categories

dear list

I imported a vector shapefile in Grass 6.0. The file contains some 70
different categories that are not explicitely written in a 'cat' column.
while importing, grass put me an extra column 'cat' in the .dbf file which is
used as category (numbers from 1-...). I need to represent the different
categories in different colors with a legend, but grass uses this cat column
as key column. how do I change this to get my own categories represented in
different colors?(do my categories have to be numbers or can they be text?) A
small hind on how to show the legend would be helpful too.

Thanx for any info

Olivier

On Thu, 8 Sep 2005 10:55:03 +0200
Olivier Faber <olivier.faber@tudor.lu> wrote:

dear list

I imported a vector shapefile in Grass 6.0. The file contains some 70
different categories that are not explicitely written in a 'cat' column.
while importing, grass put me an extra column 'cat' in the .dbf file which is
used as category (numbers from 1-...). I need to represent the different
categories in different colors with a legend, but grass uses this cat column
as key column. how do I change this to get my own categories represented in
different colors?(do my categories have to be numbers or can they be text?) A
small hind on how to show the legend would be helpful too.

Thanx for any info

Olivier

As far as I know you can't get a legend to display for vector layers in GRASS. You could however run QGIS from within GRASS to use the GRASS plugin and then display your layer there using whatever attributes you wanted.

T
--
Trevor Wiens
twiens@interbaun.com

The greatest obstacle to discovery is not ignorance - it is the illusion of knowledge.
(Daniel J. Boorstin)

Im going to create a Gauss-Boaga location where to load some georeferenced maps. This is what I have done:

*1.*

Please specify the coordinate system for location <tempo>
A x,y
B Latitude-Longitude
C UTM
D Other Projection
RETURN to cancel

> D -> I'll create the location with the Other Projection procedure.
*
2.*

Please specify projection name
Enter 'list' for the list of available projections
Hit RETURN to cancel request
>tmerc -> i think is the right projection

*3.*

Please specify datum name
Enter 'list' for the list of available datums
or 'custom' if you wish to enter custom parameters
Hit RETURN to cancel request
>rome40 -> it is right, isn't?

*4. ------here is the problem----------*

Number Details
---
1 Used in Italy (Peninsular Part)
        (PROJ.4 Params towgs84=-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68)
        Accuracy 3-4m
---
2 Used in Italy (Sardinia)
        (PROJ.4 Params towgs84=-168.6,-34.0,38.6,-0.374,-0.679,-1.379,-9.48)
        Accuracy 3-4m
---
3 Used in Italy (Sicily)
        (PROJ.4 Params towgs84=-50.2,-50.4,84.8,-0.690,-2.012,0.459,-28.08)
        Accuracy 3-4m
---
4 Used in Default rome40 region
        (PROJ.4 Params towgs84=-225.000,-65.000,9.000)
        Default 3-Parameter Transformation
---

What is the right number? i would think that is the /*1st*/ (couse im in the north of Italy) or the /*4th*/
How can i know which towgs84 parameter have i to use?
and.. if the right parameter is the first, why is there the 4th parameter, that is so strange?

sorry for my english.... thanks

Luca P.

Email.it, the professional e-mail, gratis per te: http://www.email.it/f
  Sponsor:
Logos Finanziaria SPA. Società di credito ad erogazione diretta. Fino a 30.000 euro in 24 ore! Clicca e scopri come
* Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=2909&d=9-9

I imported a vector shapefile in Grass 6.0. The file contains some 70
different categories that are not explicitely written in a 'cat'
column.

If importing with v.in.ascii you can use the cat= option to tell it
which column contains the category number.

while importing, grass put me an extra column 'cat' in the
.dbf file which is used as category (numbers from 1-...).
I need to represent the different categories in different colors with
a legend, but grass uses this cat column as key column. how do I
change this to get my own categories represented in different
colors?

You can tell it to use another column with the v.reclass module's
column= option, or the same module to re-categorize by specified rules.

see also the d.vect -a flag for use with a column named GRASSRGB
containing RGB color triplets for each feature attribute.

(do my categories have to be numbers or can they be text?)

They have to be numbers. Of course you can assign meaning to those
numbers yourself.

A small hind on how to show the legend would be helpful too.

vector legends in GRASS:
d.vect.thematic
ps.map's vlegend instruction

Hamish