ThinkGeo.com    |     Documentation    |     Premium Support

DecimalDegreesHelper function returning wrong value

I’m using the function GetDegreesMinutesStringFromDecimalDegreePoint in ThinkGeo.Core.DecimalDegreesHelper version 13.0.

There seems to be a bug where if there are leading zeros after the decimal point, the zeros get removed. This of course can have big implications when dealing with small and precise locations. For example, say I have a point of 10.5278504760803, -35.0834924172083. If I pass this coordinate into GetDegreesMinutesStringFromDecimalDegreePoint, I expect the 2nd number to come out to - 35° 5.00955' before doing any rounding. The string that gets returned is 10º 31.671'E 35º 5.1'S. You can see the leading zeroes get removed. I would expect the string to look like

10º 31.671'E 35º 5.010'S (or 35º 5.009’S depending on if the function is rounding up or not).

Is this a bug or am I missing something?

Thanks!

Hi Dan,

Thanks for finding this! I can recreate the issue and will let you know when we have a fix.

Thanks,
John

1 Like

Hi @Dan_Weaver,

Thanks for finding this bug. It has been fixed and you can get the latest 13.3.0-beta16 or newer and it should work as expected:
https://www.nuget.org/packages/ThinkGeo.Core/13.3.0-beta016

Thanks,
John

1 Like

Thanks John! Is there a date for when it’ll be in a non-beta release?

Hi Dan,

It will be in the beta channel until our next release around April/May.

Thanks,
John

1 Like