[GRASS-user] Snapping Points to Nodes along Lines
Moritz Lennert
mlennert at club.worldonline.be
Wed Oct 1 18:05:56 EDT 2008
On 01/10/08 04:28, Ryan R. Rosario wrote:
> Hmm. If I do
>
> v.net input=result_from_connect output=projected_points
The command you give here will call operation=nodes as this is the
default (see man page).
>
> I do get the point projected onto the line, but I also get points at each
> intersection as well as at the end of each street.
Yes, this is the normal result fro the what the command you give above.
> Is there any way I can
> get just the projected points?
Sorry, I only now seem to really understand what you want to do.
There's no direct way of doing that, so you will have to take a detour.
The easiest way I can think of like that is:
1) run v.distance with the output= option to create a map of connecting
lines
then either
2a) on the result of 1) run v.net operation=nodes and then v.net
operation=report to get cat values of the points (just have to figure
out which ones are considered start and which end - I suppose that this
will be uniform), then run v.extract on those category values to extract
just these points which represent the projection
or
2b) on the result of 1): (you might have to use v.db.addtable on that to
create a table first, can't remember) run v.db.addcol to add to columns
of double precision 'X' and 'Y', then run v.to.db with option=start or
option=end (again you have to figure out which it is) to upload the
coordinates of the start/end points to the table linked to the result of
1). Then you can use v.in.db to create a new vector map containing these
points.
Tell us if any of these two solutions work for you.
Moritz
More information about the grass-user
mailing list