Open nzec opened 3 years ago
I think this is a great idea! Fitting the line with linear regression should result in an optimal squared deviation average, which IMHO should be a good straight line quality measure in general.
There are some aspects that need to be considered for implementation:
linesman
currently just calculates quality measures and fitting a line is somewhat a different thing. Creating a subcommand linesman fit
distinct from to the default (measuring) linesman
could be an option to avoid cluttering the command line interface. Methods to do this directly on the sphere are described here:
This would be the most accurate thing to do but would be very hard.
Ok, this might be doable, but its indeed very complicated.
In general, I think that linesman should prefer the gedoesic interpretation of "straight" line to the lat-lon-2d interpretation, as it makes more sense for long "straight" lines. On the other hand, mayhaps its common for gps trackers to not use a geodesic when determining the direct connection of two points – which would mean that implementing a geodesic regression wouldn't be of much practical use. Maybe input from user number 1 (geowizard) could help prioritizing this feature.
For reference: https://en.wikipedia.org/wiki/Simple_linear_regression