Elevation profile smoothing and tests fix #840