more sophisticated handling of coordinate formats in format.py

Signed-off-by: lasse <lasse@nalle.(none)>
more sophisticated handling of coordinate formats in format.py - merge corrected

Signed-off-by: lasse <lasse@nalle.(none)>