[R-sig-Geo] Plotting shapefiles on top of Google map tiles

Tomislav Hengl hengl at spatial-analyst.net
Mon Jan 18 09:52:12 CET 2010


Hi Patrick,

I was breaking my head with this problem for one afternoon. Being more
a GIS person, my ideas was that one should be able to get a
StaticGoogleMaps image to some GIS format, i.e. to convert it to a
SpatialGridDataFrame. Then it is rather easy to overlay
points/lines/polygons using the spplot function (or to export to some
external GIS format e.g. geotiff). The procedure is now explained on
p.103-105 in my book (http://spatial-analyst.net/book/DataSources).
Here is the complete code:

http://spatial-analyst.net/book/getStaticGoogleMaps.R

T. Hengl
http://home.medewerker.uva.nl/t.hengl/


Quoting Patrick Crutcher <pcrutcher at gmail.com>:

> I have some shapefiles I want to plot over Google Maps tiles. I have
> polygons, lines and point data. What's the most efficient way to do this?
> One path might be to use the pkg RgoogleMaps, however, it is still unclear
> to me how to do this. I assume using PlotonStaticMap with some combination
> of reformatting the shapefile data. Thanks.
>
> P.
>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>




----- End forwarded message -----



More information about the R-sig-Geo mailing list