3

I am wondering whether the reference coordinates of the base map acquired using get_googlemap() of ggmap can be converted to UTM coordinate system ?

I would like to display a heatmap on a base map of a city acquired by get_googlemap(). The data of my heatmap is referenced in UTMs (i.e. metres) as I find these coordinates more meaningful at the city scale than decimal degrees. I have researched SO but it seems the solutions are to go the other way i.e. to convert the heat map UTM data into lat long system, but this is not my preference.

Has anyone a solution for this ? Any guidance and help is greatly appreciated. Many thanks !

user2892709
  • 175
  • 2
  • 10
  • I think you might have a chance if you're willing to do a bit of code hacking to have `get_googlemap()` [ask google maps for an alternate projection](https://developers.google.com/maps/documentation/javascript/examples/map-projection-simple). I tried a few `coord_map()` tests (e.g. `x_map <- get_map(location = 'united states', zoom = 4, maptype="terrain", source = 'google') ; xmap_gg <- ggmap(x_map) ; xmap_gg +coord_map("stereographic") `) and the google maps raster did not transform via that method. – hrbrmstr Jun 10 '14 at 03:52
  • @hrbrmstr Thanks for your feedback and suggestion. Seems like an arduous task and perhaps beyond my capabilities at the moment. Are there any workarounds such as using another package that you or others know of perhaps ? – user2892709 Jun 10 '14 at 14:23
  • IIRC, the `OpenStreetMap` library has a `openproj` function (just checked, it still does) - http://cran.r-project.org/web/packages/OpenStreetMap/OpenStreetMap.pdf - that could help. I believe it works with base graphics vs ggplot, but it might be a good path for you to head down. – hrbrmstr Jun 10 '14 at 16:14

0 Answers0