[R-sig-Geo] Access WMS (and alike) services from R?

Agustin Lobo alobolistas at gmail.com
Wed Apr 30 09:58:14 CEST 2014


Actually had found this
http://www.gdal.org/frmt_wms.html

My idea is using qgis for the interactive selection of the wms
service, layer and window, and then
make the xml and request the layer in R.

A bridge between qgis to R for raster layers, similar to the no-longer
working manageR plugin for vector layers,
would be another solution, but would imply writing to disk a raster layer.

Unfortunately cannot do this myself, trying to find an interested ms student.

Agus

On Tue, Apr 29, 2014 at 5:55 PM, Jonathan Greenberg <jgrn at illinois.edu> wrote:
> I haven't tested this exact application yet, but perhaps try gdalUtils
> (which are wrappers for the gdal utilities, and use an independent
> GDAL install).  Let me know if it works!
>
> --j
>
> On Wed, Apr 23, 2014 at 8:34 AM, Agustin Lobo <alobolistas at gmail.com> wrote:
>> According to gdalDrivers(), I have
>> 115             WCS                                       OGC Web
>> Coverage Service  FALSE FALSE
>> 116             WMS                                      OGC Web Map
>> Service  FALSE  TRUE
>>
>>
>> which I understand implies that I should be able to read wms.
>>
>> I'll see if I can find someone interested on building this type of utility in R.
>>
>> Agus
>>
>> Details on my system (linuxmint 15, based on ubuntu raring) (gdal from
>> ubuntugis-unstable):
>>> require(rgdal)
>> Loading required package: rgdal
>> Loading required package: sp
>> rgdal: version: 0.8-16, (SVN revision 498)
>> Geospatial Data Abstraction Library extensions to R successfully loaded
>> Loaded GDAL runtime: GDAL 1.10.0, released 2013/04/24
>> Path to GDAL shared files: /usr/share/gdal/1.10
>> Loaded PROJ.4 runtime: Rel. 4.8.0, 6 March 2012, [PJ_VERSION: 480]
>> Path to PROJ.4 shared files: (autodetected)
>>
>>> sessionInfo()
>> R version 3.0.2 (2013-09-25)
>> Platform: x86_64-pc-linux-gnu (64-bit)
>>
>> locale:
>>  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
>> LC_TIME=es_ES.UTF-8        LC_COLLATE=en_US.UTF-8
>>  [5] LC_MONETARY=es_ES.UTF-8    LC_MESSAGES=en_US.UTF-8
>> LC_PAPER=es_ES.UTF-8       LC_NAME=C
>>  [9] LC_ADDRESS=C               LC_TELEPHONE=C
>> LC_MEASUREMENT=es_ES.UTF-8 LC_IDENTIFICATION=C
>>
>> attached base packages:
>> [1] grid      stats     graphics  grDevices utils     datasets
>> methods   base
>>
>> other attached packages:
>>  [1] rasterVis_0.27      hexbin_1.26.3       latticeExtra_0.6-26
>> lattice_0.20-24     RColorBrewer_1.0-5
>>  [6] ggmap_2.3           ggplot2_0.9.3.1     raster_2.2-31
>> rgdal_0.8-16        sp_1.0-14
>>
>> loaded via a namespace (and not attached):
>>  [1] colorspace_1.2-4    dichromat_2.0-0     digest_0.6.4
>> gtable_0.1.2        labeling_0.2
>>  [6] mapproj_1.2-1       maps_2.3-6          MASS_7.3-29
>> munsell_0.4.2       plyr_1.8
>> [11] png_0.1-7           proto_0.3-10        reshape2_1.2.2
>> RgoogleMaps_1.2.0.5 rjson_0.2.13
>> [16] RJSONIO_1.0-3       scales_0.2.3        stringr_0.6.2
>> tools_3.0.2         zoo_1.7-10
>>
>> $ uname -a
>> Linux Delia 3.8.0-35-generic #50-Ubuntu SMP Tue Dec 3 01:24:59 UTC
>> 2013 x86_64 x86_64 x86_64 GNU/Linux
>>
>>
>>
>> On Wed, Apr 23, 2014 at 2:09 PM, Roger Bivand <Roger.Bivand at nhh.no> wrote:
>>> On Wed, 23 Apr 2014, Agustin Lobo wrote:
>>>
>>>> Hi!
>>>>
>>>> Is there any project attempting to access remote geoservices such as
>>>> WMS in a similar way
>>>> as it is done with google maps (i.e. through ggmap:get_map()) ?
>>>
>>>
>>> I've no idea how ggmap does this, or whether it uses WMS. Your GDAL may have
>>> been built with a WMS driver - see gdalDrivers() to check. The CRAN Windows
>>> rgdal binary does not have this driver. For driver details see:
>>>
>>> http://www.gdal.org/frmt_wms.html
>>>
>>> which has examples of the short xml files needed to configure access to such
>>> services.
>>>
>>> Roger
>>>
>>>>
>>>> Agus
>>>>
>>>> _______________________________________________
>>>> R-sig-Geo mailing list
>>>> R-sig-Geo at r-project.org
>>>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>>>
>>>
>>> --
>>> Roger Bivand
>>> Department of Economics, Norwegian School of Economics,
>>> Helleveien 30, N-5045 Bergen, Norway.
>>> voice: +47 55 95 93 55; fax +47 55 95 91 00
>>> e-mail: Roger.Bivand at nhh.no
>>>
>>> _______________________________________________
>>> R-sig-Geo mailing list
>>> R-sig-Geo at r-project.org
>>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>
>> _______________________________________________
>> R-sig-Geo mailing list
>> R-sig-Geo at r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
>
>
> --
> Jonathan A. Greenberg, PhD
> Assistant Professor
> Global Environmental Analysis and Remote Sensing (GEARS) Laboratory
> Department of Geography and Geographic Information Science
> University of Illinois at Urbana-Champaign
> 259 Computing Applications Building, MC-150
> 605 East Springfield Avenue
> Champaign, IL  61820-6371
> Phone: 217-300-1924
> http://www.geog.illinois.edu/~jgrn/
> AIM: jgrn307, MSN: jgrn307 at hotmail.com, Gchat: jgrn307, Skype: jgrn3007
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo



More information about the R-sig-Geo mailing list