1r.in.wms(1)                   Grass User's Manual                  r.in.wms(1)
2
3
4

NAME

6       r.in.wms   -  Downloads  and imports data from OGC WMS and OGC WMTS web
7       mapping servers.
8

KEYWORDS

10       raster, import, OGC web services, OGC WMS, OGC WMTS
11

SYNOPSIS

13       r.in.wms
14       r.in.wms --help
15       r.in.wms  [-cob]  url=string   output=name   layers=string[,string,...]
16       [styles=string[,string,...]]        [format=string]       [srs=integer]
17       [driver=string]         [wms_version=string]          [maxcols=integer]
18       [maxrows=integer]     [urlparams=string]    [username=string]    [pass‐
19       word=string]    [method=string]    [region=string]     [bgcolor=string]
20       [proxy=string]      [proxy_user_pw=string]     [capfile=name]     [cap‐
21       file_output=name]    [--overwrite]   [--help]   [--verbose]   [--quiet]
22       [--ui]
23
24   Flags:
25       -c
26           Get the server capabilities then exit
27
28       -o
29           Do not request transparent data
30
31       -b
32           Keep original bands (default: create composite)
33
34       --overwrite
35           Allow output files to overwrite existing files
36
37       --help
38           Print usage summary
39
40       --verbose
41           Verbose module output
42
43       --quiet
44           Quiet module output
45
46       --ui
47           Force launching GUI dialog
48
49   Parameters:
50       url=string [required]
51           Typically starts with "http://"
52
53       output=name [required]
54           Name for output raster map
55
56       layers=string[,string,...] [required]
57           Layer(s) to request from the map server
58
59       styles=string[,string,...]
60           Layer style(s) to request from the map server
61
62       format=string
63           Image format requested from the server
64           Options: geotiff, tiff, jpeg, gif, png, png8
65           Default: png
66
67       srs=integer
68           EPSG code of requested source projection
69           Default: 4326
70
71       driver=string
72           Driver used to communication with server
73           Options: WMS_GDAL,  WMS_GRASS,  WMTS_GRASS,  OnEarth_GRASS
74           Default: WMS_GRASS
75           WMS_GDAL: Download data using GDAL WMS driver
76           WMS_GRASS: Download data using native GRASS-WMS driver
77           WMTS_GRASS: Download data using native GRASS-WMTS driver
78           OnEarth_GRASS: Download data using native GRASS-OnEarth driver
79
80       wms_version=string
81           WMS standard version
82           Options: 1.1.0, 1.1.1, 1.3.0
83           Default: 1.1.1
84
85       maxcols=integer
86           Maximum columns to request at a time
87           Default: 512
88
89       maxrows=integer
90           Maximum rows to request at a time
91           Default: 512
92
93       urlparams=string
94           Additional query parameters to pass to the server
95
96       username=string
97           Username for server connection
98
99       password=string
100           Password for server connection
101
102       method=string
103           Interpolation method to use in reprojection
104           Options: nearest, linear, cubic, cubicspline
105           Default: nearest
106
107       region=string
108           Request  data  for  this named region instead of the current region
109           bounds
110
111       bgcolor=string
112           Background color
113           Format: 0xRRGGBB
114
115       proxy=string
116           HTTP proxy only GDAL driver (GDAL_HTTP_PROXY)
117           HTTP proxy
118
119       proxy_user_pw=string
120           User  and  password  for  HTTP   proxy   only   for   GDAL   driver
121           (GDAL_HTTP_PROXYUSERPWD). Must be in the form of [user name]:[pass‐
122           word].
123           User and password for HTTP proxy
124
125       capfile=name
126           Capabilities file to parse (input). It is relevant  for  WMTS_GRASS
127           and OnEarth_GRASS drivers
128
129       capfile_output=name
130           File where the server capabilities will be saved (’c’ flag)
131

DESCRIPTION

133       r.in.wms  handles all of downloading and importing raster data from OGC
134       WMS and OGC WMTS web mapping servers. It only needs be told the desired
135       data to collect (bounds and resolution) via a region, the server to get
136       the data from, and the layer or layers to get. It downloads the data in
137       tiles, reprojects it, imports it, and patches it back together.
138

NOTES

140       To  understand  the data you are getting it is necessary to look at the
141       capabilities of the WMS server. This should be available via a capabil‐
142       ities request (see examples)
143
144       If  possible, the EPSG code of the current location should be used with
145       the srs option to avoid unnecessary reprojection.
146
147       When using GDAL WMS driver (driver=WMS_GDAL), the GDAL library needs to
148       be built with WMS support, see GDAL WMS manual page for details.
149
150   Tiled WMS
151       Into  the  parameter  layers  the  name  of  the  TiledGroup need to be
152       inserted from Tile Service file. Time variable can be specified in url‐
153       params parameter, e.g: urlparams=’time=2012-1-1’.
154

EXAMPLES

156   General Get Capabilities Request
157       # Topographic WMS with OpenStreetMap by mundialis
158       r.in.wms -c url="http://ows.mundialis.de/services/service?"
159       r.in.wms -c url="http://ows.mundialis.de/services/service?" | grep Name
160       # Czech WMS
161       r.in.wms -c url="http://wms.cuzk.cz/wms.asp"
162
163   Download raster data from WMS server (GetMap request)
164   Open Street Map
165       # OSM
166       g.region n=90 s=-90 w=-180 e=180 res=0:10:00 -p
167       r.in.wms url="http://watzmann-geog.urz.uni-heidelberg.de/cached/osm" layers=osm_auto:all output=osm format=png
168       r.info osm
169       # OSM Overlay WMS (can be used as an overlay for other maps)
170       r.in.wms url="http://ows.mundialis.de/services/service?" layer=OSM-Overlay-WMS output=osm_overlay format=png
171       # TOPO-OSM-WMS
172       r.in.wms url="http://ows.mundialis.de/services/service?" layer=TOPO-OSM-WMS output=topo_osm format=png
173       r.info topo_osm
174       # TOPO-WMS
175       r.in.wms url="http://ows.mundialis.de/services/service?" layer=TOPO-WMS output=topo format=png
176       r.info topo
177
178       More OSM WMS servers can be found online, e.g. on the OSM wiki in a OSM
179       WMS Servers list and on the OSM-WMS-EUROPE page.
180
181   Countries and coastlines
182       r.in.wms url="http://www2.demis.nl/WMS/wms.asp" layers=Countries,Borders,Coastline output=countries srs=4326 format=png
183       r.info countries
184
185   Sentinel-2 satellite cloud free global coverage
186       # North Carolina sample data
187       g.region raster=elevation -p
188       r.in.wms url="https://tiles.maps.eox.at/wms?" layers=s2cloudless output=sentinel2 format=png
189       r.info sentinel2
190       Figure: Raleigh (NC, USA) seen by  Sentinel-2  (10m  resolution;  image
191       courtesy: EOX)
192
193   OGC WMTS Example
194       r.in.wms url="http://gpp3-wxs.ign.fr/yourAPIkey/geoportail/wmts" layers=ORTHOIMAGERY.ORTHOPHOTOS \
195                output=orthophoto srs=3857 format=jpeg driver=WMTS_GRASS style=normal password="*" username="*"
196       r.info orthophoto
197       Note:  username, password and API key can be obtained from IGN API web‐
198       site
199
200   Data covering the Czech Republic
201       r.in.wms url="http://wms.cuzk.cz/wms.asp" layers=prehledka_kraju-linie srs=4326 output=kn format=png
202       r.in.wms url="http://geoportal.cuzk.cz/WMTS_ORTOFOTO/WMTService.aspx" layers=orto output=orthophoto \
203                srs=3857 format=jpeg driver=WMTS_GRASS style=default
204       r.info orthophoto
205       Note: data are provided by Czech  office  for  surveying,  mapping  and
206       cadastre.
207
208   Satellite data covering Europe
209       Copernicus  Core003  View  Services  -  Optical  VHR2  coverage over EU
210       2011-2013 (provided by  JRC;  usage  is  restricted  to  non-commercial
211       activities):
212       # get WMS layer list
213       r.in.wms -c url="http://cidportal.jrc.ec.europa.eu/copernicus/services/ows/wms/public/core003?"
214       r.in.wms -c url="http://cidportal.jrc.ec.europa.eu/copernicus/services/ows/wms/public/core003?" | grep Name
215       # spatial subset of Europe
216       # enlarging maxcols and maxrows in order to minimize impact of copyright notice in map
217       g.region n=56 s=47 w=5 e=16 res=0:00:10 -pa
218       r.in.wms url="http://cidportal.jrc.ec.europa.eu/copernicus/services/ows/wms/public/core003?" \
219                layer="OI.Mosaic.NaturalColor.Feathering" output="jrc_copernicus_core003_mosaik" \
220                maxcols=3400 maxrows=3400
221       r.info jrc_copernicus_core003_mosaik
222

REQUIREMENTS

224       r.in.wms requires the gdalwarp utility from the GDAL/OGR library.
225

REFERENCES

227           ·   OGC WMS
228
229           ·   OGC WMTS
230

SEE ALSO

232        r.in.gdal, r.patch, r.colors, r.composite, v.in.wfs
233
234       See also WMS support in wxGUI.
235

AUTHOR

237       Stepan Turek, Czech Technical University in Prague, Czech Republic
238       (bachelor’s final project 2012, mentor: Martin Landa)
239

SOURCE CODE

241       Available at: r.in.wms source code (history)
242
243       Main  index  | Raster index | Topics index | Keywords index | Graphical
244       index | Full index
245
246       © 2003-2019 GRASS Development Team, GRASS GIS 7.8.2 Reference Manual
247
248
249
250GRASS 7.8.2                                                        r.in.wms(1)
Impressum