fix #2624: coordinates display is wrong near a confluence point

The coordinates need to be rounded differently depending on the
precision which will be used for the output.
Merge branch 'issue-2624' into upstream