ifellows / ROSM

R access to high resolution raster maps using the OpenStreetMap protocol. Dozens of road, satellite, and topographic map servers are directly supported, including CloudMade, Mapnik, Bing, stamen, and MapQuest. Maps can be plotted using either base graphics, or ggplot2. This package is not affiliated with the OpenStreetMap.org mapping project.
11 stars 2 forks source link

ggplot2 implementation #12

Closed Leovar101 closed 3 years ago

Leovar101 commented 3 years ago

I'm not quite sure how to use the object your package produces. ggplot2 on it's own does not support the type, and using the autoplot()function it displays the wrong coordinates in my case. The map shows the right area, but the coordinates are off by an entire degree and without decimal points. c(8.7582, -3.7858), c(8.7514, -3.7775) for the area in openmap() becomes 97860, -421250 and 978200, -420750 in the map generated by autoplot(). So if I try to plot certain points of interest via geom_point it just distorts the entire map. Is this intended, does the package change the projection, or what is going on here?

Edit: I figured out that it does indeed use Mercator projection. I found this not readily apparent, sorry for the inconvenience.