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

Hanlie Pretorius hanlie.pretorius at gmail.com
Mon Dec 13 01:02:59 EST 2010


Hi Shane,

Thanks for the suggestion :-)

I think you're starting where I want to end up, that is, with an
attribute link between the two tables. I want to create this link
based on the spatial arrangement of the lines and the points. So, the
initial 'joining' of points to line needs to be based on their spatial
locations. Then, I need to transfer the right attributes from the
points layer to the line layer.

Regards
Hanlie

2010/12/12, Shane Litherland <litherland-farm at bigpond.com>:
> 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
> points_layer_table
> 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"
>
> Regards,
> Shane.
>
>
>


More information about the grass-user mailing list