[PROJ] proj_dmstor accepted inputs
Charles Karney
karney at alum.mit.edu
Wed May 6 12:51:55 PDT 2026
I took a quick look at the source and it looks like you've figured out
the format. (I see that a degree symbol is also allowed.) Because of
the inconvenience of using ' and " as minutes and seconds markers, I
would recommend allowing : (colon) to be used as a *separator*
character, e.g., 25:24:23. This usage is common for times and so its
use for angles is fairly intuitive. (This convention is supported by
GeographicLib.) Allowing the digits to be run together, 252423, is a
recipe for disaster.
--
Charles Karney <karney at alum.mit.edu>
> On May 6, 2026, at 14:45, Peter Townsend via PROJ <proj at lists.osgeo.org> wrote:
>
> I was looking at the proj_dmstor function to try and leverage it, but there really isn't any documentation on what the expected input format is supposed to be.
>
> "252423N" returns 4405.6124577616465, which isn't anywhere close to the expected result of 25.40638888 degrees / 0.44342513699807451 radians.
> "25 24 23 N" gives me 0.43633231299858238, which is wrong.
> "25d24'23\"N" does get me 0.44342513715321491 though.
> proj_rtodms(0.44342513715321491, 'N', 'S') does give me "25d24'23\"N" back.
>
> Does it require the d, ', and " markers in the string?
>
> --
> Peter Townsend
> Senior Software Developer
> _______________________________________________
> PROJ mailing list
> PROJ at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/proj
More information about the PROJ
mailing list