You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Leading zeros with FORMAT_GEO_OUT=ddd:mm.ss.xx #7475
There is an advantage of having fixed widths for coordinates to reduce ambiguity.
Request: implement an option (or make if default - minimizing ambiguity pr. default is always wise) to have fixed width - i.e coordinates get leading/trailing zeros. The output in the current version is:
Were are now implementing this. In fact you pointed out a bug here, because the longitude of course should always have had 3 digits for degrees.
But there is something inconsistent between GMT_FORMAT_OUT and GMT_FORMAT_MAP. In the former ddd always got you leading zeros (although incorrectly as pointed out above), but in the latter it cut off the leading zeros.
For GMT_FORMAT_MAP we are now implementing the syntax DDD to also get the leading zeros, with ddd not giving leading zeros.
So I am suggesting to implement that bothGMT_FORMAT_OUT and GMT_FORMAT_MAP will have two options for doing the degrees.
ddd to give degrees without leading zeros (this would change the outcome for GMT_FORMAT_OUT).
DDD to plot degrees with leading zeros. This would do the same for GMT_FORMAT_OUT as ddd did before.
@anbj : would it be a problem for you if we change this syntax for GMT_FORMAT_OUT?
Great. I added a comment in one of the commits; it says two digits for longitude and three for latitude. Unless I’m very confused I think it should be three digits for longitude (0/360 or -180/180) and two digits for latitude (-90/90).
Activity
remkos commentedon Jul 19, 2023
Were are now implementing this. In fact you pointed out a bug here, because the longitude of course should always have had 3 digits for degrees.
But there is something inconsistent between
GMT_FORMAT_OUTandGMT_FORMAT_MAP. In the formerdddalways got you leading zeros (although incorrectly as pointed out above), but in the latter it cut off the leading zeros.For
GMT_FORMAT_MAPwe are now implementing the syntaxDDDto also get the leading zeros, withdddnot giving leading zeros.So I am suggesting to implement that both
GMT_FORMAT_OUTandGMT_FORMAT_MAPwill have two options for doing the degrees.dddto give degrees without leading zeros (this would change the outcome forGMT_FORMAT_OUT).DDDto plot degrees with leading zeros. This would do the same forGMT_FORMAT_OUTasddddid before.@anbj : would it be a problem for you if we change this syntax for
GMT_FORMAT_OUT?Further implementation of #7475
Another manual update related to #7475
anbj commentedon Jul 19, 2023
@remkos: absolutely no problem. This is great.
remkos commentedon Jul 19, 2023
Thanks. We'll make it that way then, as in PR #7655
anbj commentedon Jul 19, 2023
Great. I added a comment in one of the commits; it says two digits for longitude and three for latitude. Unless I’m very confused I think it should be three digits for longitude (0/360 or -180/180) and two digits for latitude (-90/90).
anbj commentedon Jul 20, 2023
Fixed in 9e8e200.
Leading zeros (#7655)
remkos commentedon Jul 21, 2023
Thanks. Yes, I got confused somewhere.