[GRASSLIST:4840] Re: transition probability

Dylan Beaudette dylan at iici.no-ip.org
Mon Nov 15 13:26:23 EST 2004


On Monday 15 November 2004 01:01 am, you wrote:
> You have to join the tables in Postgres.
> I hope to add join table to v.overlay later.
>
> Radim

Thanks for the tip Radim.

I was able to get the tables joined and re-attached to the vector layers by 
using MySQL.

if anyone is interested, I have started documenting the process here;
http://169.237.35.250/~dylan/grass_and_tp/

i have noticed that the attribute management section on the GRASS 57 tutorial 
that -pertains to MySQL is empty. I would be willing to add to that section 
if anyone is interested.

Thank again!

Dylan

> Dylan Beaudette wrote:
> > 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
> > polygon:
> > -------------------------
> >  db.describe -c fresno_west
> > Column 1: cat
> > Column 2: AREA
> > Column 3: PERIMETER
> > 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:
> > (http://basho.dept-lawr.ucdavis.edu/~dylan/temp/tp1.png)...
> >
> > 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
> > command;
> > 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!




More information about the grass-user mailing list