Mark-Eis / BitsnBobs

For General Bits and Bobs of Code
https://mark-eis.github.io/BitsnBobs/
Other
1 stars 0 forks source link

In `validate_degminsec()`, latitude must be between -90˚ and +90˚ #49

Closed Mark-Eis closed 6 months ago

Mark-Eis commented 6 months ago

https://github.com/Mark-Eis/BitsnBobs/blob/2a5cc2b3a89ff4c38ae9a1f9234570f252fcc797/R/degreeconvert.R#L270

    if (all(dms %@% ".latorlon" == "lat", dms$deg > 90))
        stop(
            "`dms$deg` for latitude must not be greater than 90\u00B0",
            call. = FALSE
        )
Mark-Eis commented 6 months ago
    if (all(dms %@% ".latorlon" == "lat", with(dms, deg + min / 60 + sec / 3600) > 90))
        stop(
            "`dms$deg` for latitude must not be greater than 90\u00B0",
            call. = FALSE
        )
Mark-Eis commented 6 months ago

8d6cfc8 and 1fa6af7