[R-sig-Geo] Reading a WMS layer as a sp object

Michael Sumner mdsumner at gmail.com
Thu Apr 28 06:27:12 CEST 2011

If you build rgdal against a GDAL with WMS support, then it should
work fine with readGDAL (rgdal) or raster.

Building GDAL is easy enough, and there are nightly builds that can be
used here:  http://vbkto.dyndns.org/sdk/

There are notes in the rgdal source for building on various platforms,
I haven't done it for ages though, on any platform.

If that's not feasible, then you can invoke the gdal_translate app
with from R system() to do the download for you, then read that from
GeoTIFF or whatever. There are instructions and examples here:


Cheers, Mike.

On Thu, Apr 28, 2011 at 1:56 PM, Pierre Roudier
<pierre.roudier at gmail.com> wrote:
> Hi list,
> Recently I had a lot of fun with the gmap() function in Robert's dismo
> package. It is retrieving a Google Map layer (roadmap, satellite, or
> terrain) that can be used as a background for plotting other sp
> objects. The extent of the downloaded layer is given by a name
> (geocode) or a Spatial* object. If you haven't tried it, you should -
> it is fun and easy to use!
> Following that nice experience, I was wondering if anybody has been
> working on a similar process, but for a WMS layer (instead of using
> Google's data... with the associated constraints). I got some
> home-built WMS layers that would be more appropriate for use as a
> background in my plots.
> Cheers,
> Pierre
> --
> Scientist
> Landcare Research, New Zealand
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Michael Sumner
Institute for Marine and Antarctic Studies, University of Tasmania
Hobart, Australia
e-mail: mdsumner at gmail.com

More information about the R-sig-Geo mailing list