Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incoherence between sexagesimalToDecimal and isSexagesimal #254

Closed
mukaschultze opened this issue Jan 10, 2021 · 1 comment · Fixed by #278
Closed

Incoherence between sexagesimalToDecimal and isSexagesimal #254

mukaschultze opened this issue Jan 10, 2021 · 1 comment · Fixed by #278

Comments

@mukaschultze
Copy link

mukaschultze commented Jan 10, 2021

Converting 51°58'46.70"O to decimal, using both toDecimal and sexagesimalToDecimal throws the following error:

 Error: Given value is not in sexagesimal format
    at sexagesimalToDecimal (sexagesimalToDecimal.js:1)
    at Object.toDecimal (toDecimal.js:1)

However, using geolib.isSexagesimal("51°58'46.70\"O") returns true.

EDIT: So, I just found out that my sexagesimal had a white space at the beginning, and the isSexagesimal trims the input value.

@manuelbieh manuelbieh added the bug label Mar 29, 2021
manuelbieh pushed a commit that referenced this issue Oct 11, 2021
### [3.3.3](v3.3.2...v3.3.3) (2021-10-11)

### 🔧 Fixes

* ignore whitespaces in sexagesimal patterns. fixes [#254](#254) ([47850ea](47850ea))
* increase accuracy ([2a7b443](2a7b443))
* Merge pull request [#278](#278) from PaulCapron/patch-1 ([3827a8f](3827a8f))
@manuelbieh
Copy link
Owner

🎉 This issue has been resolved in version 3.3.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants