[GRASS-user] Averaging multiple vector lines
Dwight Needels
needels at translucida.com
Wed Jun 3 21:23:29 EDT 2009
I have a GRASS vector that originated as multiple GPS tracks from
walking a particular trail segment on several different days. Is there
a good way to average these lines to get a single line? I want to
minimize GPS accuracy errors by averaging across multiple days and
also minimize precision errors (random jumping around on a single day)
while still maintaining the shape of the trail with all of its twists
and turns.
I have been able to generate a composite vector by using a combination
of v.to.rast, r.grow, r.thin, r.to.vect, v.clean, and v.generalize
method=douglas. This method works pretty well when the lines remain
close together, but it is very dependent on picking a value for the
r.grow radius that fills in all of the gaps between the multiple
tracks. If one track is quite different than the others in even a
single region of the vector, this requires a relatively large radius
value. Moreover, the final vector is located about midway between the
two extremes rather than being weighted toward where the majority of
tracks fall.
It seems like there would be a way to calculate some sort of sliding
average of the coordinates that fall within a certain size window,
perhaps after using v.to.points with a small dmax (5 ft?) to generate
a fairly dense set of points. Ideally, the calculation window could be
wider perpendicular to the direction of the line than it is along the
direction of the line. From day to day tracks are often within 10 to
20 ft of each other, but it is not uncommon for two tracks to be 30 ft
away from each other at some points.
Any ideas?
-Thanks, -Dwight
More information about the grass-user
mailing list