[GRASSLIST:4825] Re: transition probability

Dylan Beaudette dylan at iici.no-ip.org
Sat Nov 13 20:19:41 EST 2004

On Saturday 13 November 2004 12:45 am, you wrote:
> Dylan Beaudette wrote:
> > If it hasn't, I am wondering if there are a couple of vector commands
> > that could do the following:
> >
> > given an input polygon map of several categories, and a line drawn across
> > these categories,
> >
> > 1. sample the polygon boundaries(and their respective category) that the
> > line intersects
> >
> > 2. put the above information into a new vector line that contains line
> > segments that have an attribute that matches the category of the polygon
> > that they intersected.
> v.overlay
> Radim

Seems that I just figured out the answer to my last question in regards to 
line vector types. 

However, I now have another perhaps more complicated problem..

i have two maps:

t_1 = line map containing a single line

fresno_west = ploygon map with many polygons, and mulitple attributes per 
 db.describe -c fresno_west
Column 1: cat
Column 2: AREA
Column 4: CA653_A_
Column 5: CA653_A_ID
Column 6: MUSYM
Column 7: MUKEY
when i use v.overlay with ainput=t_1 atype=line binput=fresno_west btype=area 
output=r_1 operator=and ...
I get a map with the following attribute columns:
db.describe -c r_1
Column 1: cat
Column 2: cata
Column 3: catb

this is almost what i want, as each of the line segments in the resulting map 
(r_1) is labeled with the category number corresponding to the polygon that 
it intersected in the catb attribute column:

this is great, but i need to join the attributes from the original polygon 
file to the new line file r_1. i imagine that it would be a join on:
r_1.catb ---> fresno_west.cat
...which should then allow corresponding attributes from fresno_west (the 
polygon layer) to be connected to r_1 (the output from v.overlay)...

i am able to connect the attribute table from fresno_west to r_1 with the 
v.db.connect map=r_1 table=fresno_west key=catb field=2 -o

...but this does not produce the results that i am looking for as the 
fresno_west table does not contain a 'catb' column...

.... perhaps I am not fully comprehending the GRASS 57 vector attribute 
system.. any ideas?

many thanks!

Dylan Beaudette
Soil Science Graduate Group
University of California at Davis

More information about the grass-user mailing list