Change Coord.toString() to return degrees instead of map units

Hi devs, I think almost nobody needs the Garmin lat/lon coordinates in log or debug messages, the degrees are much easier to use. This is esp. true for debugging, so I want to change Coord.toString() to return the same result as Coord.toDegreeString(). The attached patch changes this and simplifies the code where possible. One unit test requires the garmin units, and the messages about boundary nodes in LineClipper are probably better understandable with garmin units. Unfortunately I have no easy way to find out where Coord.toString() is called implicitly when Object.ToString() is called, so maybe there are more places where .toGarminString() should be added. Any objections/hints/better ideas? The display tool uses toDegreesString(). I think it never uses Coord.toString() implicitly. Gerd

Hi Gerd This change is fine by me. Ticker On Sat, 2021-05-22 at 06:33 +0000, Gerd Petermann wrote:
Hi devs,
I think almost nobody needs the Garmin lat/lon coordinates in log or debug messages, the degrees are much easier to use. This is esp. true for debugging, so I want to change Coord.toString() to return the same result as Coord.toDegreeString().
The attached patch changes this and simplifies the code where possible. One unit test requires the garmin units, and the messages about boundary nodes in LineClipper are probably better understandable with garmin units.
Unfortunately I have no easy way to find out where Coord.toString() is called implicitly when Object.ToString() is called, so maybe there are more places where .toGarminString() should be added.
Any objections/hints/better ideas? The display tool uses toDegreesString(). I think it never uses Coord.toString() implicitly.
Gerd
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
participants (2)
-
Gerd Petermann
-
Ticker Berkin