[GIS] way to get undistorted maps in R (when using the OpenStreetMap package)

coordinate systemmapsopenstreetmapr

When I download a large map within R (using the OpenStreetMap package) and I reproject the map (ideally to +proj=longlat), the map will always turn out distorted, making country labels etc. near the poles illegible.

Q1: Is there a way to obtain such a map (ideally still in R) in such a way that you can still read the labels? Secondly, if I keep the original map (in mercator projection) but "reproject" the points, and I use the map in a (ggplot2) plot, the labels will still look strange – probably because the size of the map image changed between downloading and plotting.

Q2: Is there a way to either download the perfectly sized tiles or to use the original tile size in the plot, so that the labels don't look blurred?

My code (for Q1, but Q2 is based on this as well) looks similar to this:

library(OpenStreetMap)
map <- openmap(c(85,-179.99999),c(-60,179.99999), zoom=2, type = "osm")
# - type="nps" is about the only type that looks okay because it has no labels
map <- openproj(map)
plot(map)

…and the map looks like this (if you look closely, you will see that "Brazil" is clearly visible, but "Russian Federation" (in Russian) not so much):
enter image description here

Best Answer

If you reproject a raster with labels, you will obviously get squeezed labels.

The only way to avoid this is to render the raster from vector data directly into the desired projection. You might want to look into mapnik, tilemill or maperitive to do this from Openstreetmap raw data (which is vector data).

The R openstreetmap package only offers raster data from tiles, which is not suitable for this task. The osmar package might do a better job, but you will not get lucky with it on a worldwide scale. It's just too much data to process.

Related Question