Hi,
Thanks for this great library. Would like to request support for Lat/long coordinates with N,S,E,W and °
Potential examples:
26°11′N
26°11′N, 91°44′E
26°11′N 91°44′E
Yes currently only Signed degrees format is supported.
We can add validations for DMS + compass direction formats as well.
http://www.geomidpoint.com/latlon.html
@ezkemboi @profnandaa Happy to submit a PR for this one.
@rohankulshreshtha, sure. Do that, I will do a review.
I will also read the article send and also check on @smohiuddin issue on the same and provide more clarification.
I don't know what @profnandaa think?
Sounds good, perhaps this should come with an extra options param to support that. Just create a new regex for that as opposed to combining both regexes in to one.
I have added a PR for this one (#1158 ).
As discussed I have made a separate regex and introduced an option ({checkDMS : true}).
Latitudes, Longitudes range from 0 to 90, 0 to 180 respectively.
Minutes & Seconds range from 0-60.
N, S, E or W as last character(case insensitive).
Seconds can be a float.
Ex - '40° 26′ 46″ N, 79° 58′ 56″ W' or '40° 26′ 45.9996″ N, 79° 58′ 55.2″ E'
Please let me know if any change is required.
Most helpful comment
Sounds good, perhaps this should come with an extra options param to support that. Just create a new regex for that as opposed to combining both regexes in to one.