[GRASS-user] Forcing polyline nodes through a point
Dwight Needels
needels at translucida.com
Thu May 28 22:04:41 EDT 2009
I am trying to create a map of hiking trails based on GPS data. If
anyone can point me to a tutorial that discusses the techniques and
issues involved, I would appreciate it. Meanwhile, a couple of
specific questions.
I have a series of GPS tracks that have been brought into GRASS as
polylines, and a series of time-averaged waypoints that have been
brought into GRASS as points. The lines represent segments of color-
blazed trails, and the waypoints represent higher-quality measurements
of trail termini and intersections.
I am looking for a way to force the polylines (from GPS tracks) to
terminate at the points (from averaged waypoints). One possibility
would be to snap each terminal node to the nearest point (within a
threshold), with the point coordinates taking precedence. I think I
would prefer, instead, to have the point appended to the end of the
line, becoming the new node (followed by a cleanup step with
v.generalize).
Does anyone have any idea how I might accomplish either of these
things? Is there a better/easier method?
With some up-front processing I could ensure that each trail segment
terminates near an averaged waypoint. However, it would be
considerably less work if I could automatically split a polyline at
the vertex that is closest to a point (within a threshold) before
processing as above. This would allow me to smooth (straighten) the
trails while still maintaining sharp turns at important locations such
as switchbacks in the trail.
Is this feasible?
Thanks, -Dwight
More information about the grass-user
mailing list