Note: This document is for an older version of GRASS GIS that will be discontinued soon. You should upgrade, and read the current manual page.
Two algorithms are proposed in the module, both based on the idea of using a reference line, creating a series of reference points along this line and then finding the coordinates of corresponding points on all the input lines. The default algorithm uses closest distance to identify corresponding points, while the second algorithm (t flag) draws perpendicular transversals at the reference points and uses the intersections of these transversals with the other lines as corresponding points.
In detail, the default algorithm goes as follows:
The transversals algorithm goes as follows:
The user can change three parameters in the algorithms: the choice of the reference line (refline), the number of vertices to calculate (vertices) and the search range (range), i.e. for the default algorithm the maximum distance of corresponding points from the reference line and for the second algorithm the length of the transversals on each side of the reference line.
If no reference line is given the module choses the reference line by determining the mean distance of the midpoint of each line to the midpoints of all other lines. The line with the lowest mean distance is then chosen as the reference line. If no range is given, the module uses the mean of the above mean distances as the range for the transversals algorithm, and an unlimited search range for the default algorithm.
If the m flag is set and there are more than 2 lines in the input file, the module calculates the mathematical median of the x and of the y coordinates.
The median in this module is not the geometric median, but the simple mathematical median respectively of the x and the y coordinates.
The transversals algorithm is very sensitive to the range parameter. The user might want to play around with this parameter to find the best value.
Increasing the number of vertices should have a smoothing effect on the resulting line, but in the case of the transversals algorithm it can possibly lead to more instability.
v.centerline input=flightpaths output=center_line_mean v.centerline -m input=flightpaths output=center_line_median v.centerline input=flightpaths output=center_line_mean_5000 range=5000 v.centerline -t input=flightpaths output=center_line_mean_t v.centerline -t input=flightpaths output=center_line_mean_t_8000 range=8000
v.centerline input=river output=center_line v.centerline -t input=river output=river_center_t
Available at: v.centerline source code (history)
Latest change: Monday Jun 28 07:54:09 2021 in commit: 1cfc0af029a35a5d6c7dae5ca7204d0eb85dbc55
Main index | Vector index | Topics index | Keywords index | Graphical index | Full index
© 2003-2023 GRASS Development Team, GRASS GIS 7.8.9dev Reference Manual