Created
November 2, 2014 07:04
-
-
Save ateucher/5bcd5a605065eda2daa0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## convert back and forth between -180/180 and 0/360 systems | |
to_lon_360 <- function(lon_180) { | |
(lon_180 + 360) %% 360 | |
} | |
to_lon_180 <- function(lon_360) { | |
((lon_360 + 180) %% 360) - 180 | |
} | |
to_lon_360(-143.27) | |
to_lon_360(120.5) | |
to_lon_180(340) | |
to_lon_180(123.5) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment