Skip to content

Instantly share code, notes, and snippets.

@smakhtin
Created October 7, 2015 20:59
Show Gist options
  • Select an option

  • Save smakhtin/1344684dd0c77b421aba to your computer and use it in GitHub Desktop.

Select an option

Save smakhtin/1344684dd0c77b421aba to your computer and use it in GitHub Desktop.
Convert to Web Mercator in R
toMercator <- function(lat) {
180/pi * log(tan(pi / 4 + lat * (pi / 180) / 2))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment