0

I've been searching for a while to no avail, please help. I'm able to draw a simple world map using a shapefile (and do a lot more, draw lines, fill with colors, etc).

The source of shapefile is:

http://thematicmapping.org/downloads/world_borders.php

This is a simple example:

library(rgdal)
world <- readOGR("Z:/data/borders","TM_WORLD_BORDERS-0.3")
par(mar=c(0,0,0,0))
plot(world)

enter image description here

However, the shape is quite different to what google map looks like. I suspect that it has something to do with projection, and I've been trying to adjust it but to no avail. So what I would like to do is to get my map to match the outlines of google projection (not the other way around).

The reason I need it is because I have a raster image layer that is based on google maps projection that I need to overlay on top of my map.

Your help would be really appreciated,

many thanks,

Alex

SymbolixAU
  • 25,502
  • 4
  • 67
  • 139
user3685724
  • 84
  • 1
  • 8
  • 1
    Google Maps uses [Web Mercator](https://en.wikipedia.org/wiki/Web_Mercator), FWIW. – alistaire Mar 20 '17 at 05:23
  • 1
    and use `?spTransform` to transform the projection of a spatial object – SymbolixAU Mar 20 '17 at 05:42
  • If you "suspect that it has something to do with projection", I'd suggest you to read a primer on map projections and spatial reference systems before trying anything, so that you can have a grasp on what you are doing. – lbusett Mar 21 '17 at 11:21

0 Answers0