[GRASSLIST:217] Re: [GRASS5] Built-in vector documentation extended

Michael Barton michael.barton at asu.edu
Fri Mar 17 12:43:13 EST 2006


Thomas,

See below.

Michael
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution and Social Change
Arizona State University
Tempe, AZ 85287-2402

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton



> From: Thomas Adams <Thomas.Adams at noaa.gov>
> Date: Fri, 17 Mar 2006 12:37:20 -0500
> To: Michael Barton <michael.barton at asu.edu>
> Cc: Markus Neteler <neteler at itc.it>, grass developers list
> <grass5 at grass.itc.it>, Multiple recipients of list <grasslist at baylor.edu>
> Subject: Re: [GRASS5] Built-in vector documentation extended
> 
> Michael,
> 
> This is very helpful and answers many questions I have about the new
> vector format, especially points. I do want to confirm my understanding
> from "Vector data processing in GRASS GIS" (please pardon my being
> obtuse). SoŠ
> 
> In order to get a Postgres table consisting of point coordinates and
> various attributes to import into my lat-long location using v.in.db, I
> had to put a "1" in the field for the "category column name (string
> required)"; when I put "lid" in the field, I got an error saying the
> type was not an integer. It seems GRASS is expecting a string for the
> field name that has integer as its type. My problem is that none of my
> fields meet this requirement for the key field, the only column that
> does, "lid", has type string.

The GRASS vector key field ("category") MUST be an integer. The matching key
field in your attribute table must also be integer to make a join.

> 
> Now, my question is, for 5030 records, how do I add an integer key
> field? My guess is that I would have to write a script that (1) created
> a new column (type integer) for the Postgres table and (2) looped,
> sequentially filling the new field for each record with a unique integer
> value ‹ or I could drop the table, and do all of this outside of the
> Postgres/GRASS environment and reload the table. The problem I have with
> doing either is that the table design is not my own and is controlled by
> 'outsiders'.

Use v.category to do this in GRASS.

Michael 

> 
> Regards,
> Tom
> 
> Michael Barton wrote:
>> Markus,
>> 
>> This is very helpful. It will make learning GRASS vector architecture much
>> easier for people.
>> 
>> Michael
>> __________________________________________
>> Michael Barton, Professor of Anthropology
>> School of Human Evolution and Social Change
>> Arizona State University
>> Tempe, AZ 85287-2402
>> 
>> phone: 480-965-6213
>> fax: 480-965-7671
>> www: http://www.public.asu.edu/~cmbarton
>> 
>> 
>> 
>>   
>>> From: Markus Neteler <neteler at itc.it>
>>> Date: Thu, 16 Mar 2006 22:35:22 +0100
>>> To: grass developers list <grass5 at grass.itc.it>
>>> Cc: GRASS user list <grasslist at baylor.edu>
>>> Subject: [GRASS5] Built-in vector documentation extended
>>> 
>>> Hi,
>>> 
>>> I have extended the vector overview document in
>>> 6.1-CVS, find also here:
>>> 
>>>  http://grass.itc.it/grass61/manuals/html61_user/vectorintro.html
>>> 
>>> While it covers most modules, each now in a thematic
>>> context, it may be fine tuned, improved.
>>> Text pieces welcome (preferably CVS patches).
>>> 
>>> The idea is to give a short overview.
>>> 
>>> Currently the page is even W3 conformant :-)
>>> 
>>> Cheers
>>> 
>>>  Markus
>>> 
>>>     
>> 
>> _______________________________________________
>> grass5 mailing list
>> grass5 at grass.itc.it
>> http://grass.itc.it/mailman/listinfo/grass5
>> 
>>   
> 
> 
> -- 
> Thomas E Adams
> National Weather Service
> Ohio River Forecast Center
> 1901 South State Route 134
> Wilmington, OH 45177
> 
> EMAIL: thomas.adams at noaa.gov
> 
> VOICE: 937-383-0528
> FAX: 937-383-0033
> 




More information about the grass-user mailing list