[GRASS-user] Re: Assign attributes of start and enpoints to connecting lines

Shane Litherland litherland-farm at bigpond.com
Sun Dec 12 05:46:10 EST 2010

Hi Hanlie,
I am getting out of my depth here, and might be leading you astray...

But I had a little challenge a few months ago, wanting to generate
points along a line to then use to create other tangent lines (in
science terms, generating belt-transects across a gully, at randomly
defined distances from start of gully)... sounds vaguely like a simpler
version of what you're doing.

I used a combo of v.segment, v.type_wrapper.sh,... and some beginner
fumbling... from your initial post, I'm guessing you've already got
these under your belt?

If your current hurdle is getting a new column into the table for the
river segments layer, from info in the points layer, could you achieve
this by working directly with the tables (database)? rather than a GRASS
command?? Do you have some linking field between the points and the
segments layers (e.g. segment_cat)? if you do, or can make one, could
you e.g.:
SELECT (start_node_name\ end_node_name) AS segment_name FROM
and update this to the river segment table??
UPDATE river_segment_table SET new_column_for_label=segment_name
WHERE river_segment_table.segment_cat=points_layer.segment_cat

##note this isn't gramatically correct SQL... just an idea..
Please excuse crude SQL example, I'm still dusting off my old MSACCESS
knowledge and 'converting' it to Postgresql... You can probably get a
select/update process in one easy step with the right SQL sweet-talking?

If i'm off track, apologies for misleading you ;-) if you get something
out of it, i might promote myself from "complete novice" at sql to
"someone that knows just enough to break things"


More information about the grass-user mailing list