1r.in.wms(1) Grass User's Manual r.in.wms(1)
2
3
4
6 r.in.wms - Downloads and imports data from WMS servers.
7
9 wms
10
12 r.in.wms
13 r.in.wms help
14 r.in.wms [-ldockp] [output=string] mapserver=string [lay‐
15 ers=string[,string,...]] [styles=string[,string,...]] [srs=string]
16 format=string [wmsquery=string] maxcols=integer maxrows=integer
17 [tileoptions=string] [region=string] [folder=string] [wgetop‐
18 tions=string] [curloptions=string] method=string [v=integer]
19 [--overwrite] [--verbose] [--quiet]
20
21 Flags:
22 -l
23 List available layers and exit
24
25 -d
26 Skip to downloading (to resume downloads faster)
27
28 -o
29 Don't request transparent data.
30
31 -c
32 Clean existing data out of download directory.
33
34 -k
35 Keep band numbers instead of using band color names.
36
37 -p
38 Don't reproject the data, just patch it.
39
40 --overwrite
41 Allow output files to overwrite existing files
42
43 --verbose
44 Verbose module output
45
46 --quiet
47 Quiet module output
48
49 Parameters:
50 output=string
51 Name for output raster map
52
53 mapserver=string
54 Mapserver to request data from
55
56 layers=string[,string,...]
57 Layers to request from map server
58
59 styles=string[,string,...]
60 Styles to request from map server
61
62 srs=string
63 Source projection to request from server
64 Default: EPSG:4326
65
66 format=string
67 Image format requested from the server
68 Options: geotiff,tiff,jpeg,gif,png
69 Default: geotiff
70
71 wmsquery=string
72 Addition query options for server
73 Default: version=1.1.1
74
75 maxcols=integer
76 Maximum columns to request at a time
77 Default: 1024
78
79 maxrows=integer
80 Maximum rows to request at a time
81 Default: 1024
82
83 tileoptions=string
84 Additional options for r.tileset
85
86 region=string
87 Named region to request data for. Current region used if omitted
88
89 folder=string
90 Folder to save downloaded data to
91
92 wgetoptions=string
93 Additional options for wget
94 Default: -c -t 5 -nv
95
96 curloptions=string
97 Additional options for curl
98 Default: -C - --retry 5 -s -S
99
100 method=string
101 Reprojection method to use
102 Options: nearest,bilinear,cubic,cubicspline
103 Default: nearest
104
105 v=integer
106 Verbosity level
107 Default: 1
108
110 r.in.wms handles all of downloading and importing raster data from an
111 OpenGIS "WMS" web mapping server. It need only be told the desired data
112 to collect (bounds and resolution) via a region, the server to get the
113 data from, and the layer or layers to get. It downloads the data in
114 tiles, reprojects it, imports it, and patches it back together.
115
117 By default data is downloaded to $GISDBASE/wms_download. This can be
118 changed by setting the folder= option when using r.in.wms.
119
120 To understand the data you are getting it is necessary to look at the
121 capabilities of the WMS server. This should be available via a capabil‐
122 ities request. This is an example capabilities request to NASA's
123 OnEarth server.
124
125 Some brain-dead servers will only talk to certain web browsers. You can
126 fool these by adding "--user-agent=MSIE5.5" to wgetoptions or for curl
127 adding "-A "MSIE5.5" to curloptions.
128
130 General Get Capabilities Request
131 A capabilities request like
132 http://wms.jpl.nasa.gov/wms.cgi?request=GetCapabilities is where you
133 should start. It tells you what data is offered, the projections it is
134 in, where to find meta data, resolutions, scales, and bounds for data,
135 etc.
136
137 NASA OnEarth server: Get Capabilities Request
138
139 r.in.wms mapserver=http://wms.jpl.nasa.gov/wms.cgi -l
140 Lists the layers available from the NASA OnEarth server. The output is
141 more reliable if xml2 is installed.
142
143 US NED Elevation from OnEarth server download (metric units)
144 Set the resolution to 30 (assuming you're in metric units):
145 g.region res=30 -ap
146 r.in.wms output=elevation_meters
147 mapserver=http://wms.jpl.nasa.gov/wms.cgi \
148 layers=us_ned styles=real -o
149 Downloads real number meter elevation from OnEarth to cover the cur‐
150 rent region. Uses -o for opaque to get smaller download.
151
152 US NED Elevation from OnEarth server download (feet units)
153 Set the resolution to 90 (assuming you're in feet units) a save this
154 region with a name; this makes resuming downloads possible or rather
155 easier:
156 g.region res=90 -ap
157 g.region save=panhandle-90ft
158 r.in.wms output=elevation_feet
159 mapserver=http://wms.jpl.nasa.gov/wms.cgi \
160 layers=us_ned styles=feet_real -o region=panhandle-90ft
161 Downloads real number feet elevation from OnEarth to cover the current
162 region. Uses -o for opaque to get smaller download. Using a named
163 region lets us resume later easily.
164 r.in.wms output=elevation_feet
165 mapserver=http://wms.jpl.nasa.gov/wms.cgi \
166 layers=us_ned styles=feet_real -o region=panhandle-90ft -d
167 method=cubic
168
169 -d skips ahead to downloading. This could be used to try downloading
170 again (if some files failed last time) or to import the data differ‐
171 ently. Since downloaded files are remembered those already received
172 successfully are not re-requested. In this case we are reimporting the
173 data using the cubic interpolation method instead of nearest neighbor.
174
175 LANDSAT from OnEarth server download
176 Set the resolution to 30 meters for LANDSAT:
177 g.region res=30 -ap
178 r.in.wms layers=global_mosaic mapserver=http://wms.jpl.nasa.gov/wms.cgi
179 \
180 output=wms_global_mosaic
181 Downloads LANDSAT color scene.
182
183 DRG from Terraserver server download
184 Set the resolution to 1.2 meters for DRGs. Their native resolution is
185 2.4 meters, so this is some pretty hefty oversampling:
186 g.region res=1.2 -ap
187 g.region save=drg-resolution
188 r.in.wms output=terraserver-drg mapserver=http://terraserver.micro‐
189 soft.com/ogcmap6.ashx \
190 layers=DRG region=drg-resolution format=jpeg srs=EPSG:26910
191 Downloads digital raster graphics from Microsoft TerraServer. Note
192 that srs will need to be changed to a projection that is appropriate
193 for your region.
194
196 r.in.wms requires the following programs to work:
197
198 wget: An http download program, or
199
200 curl: Alternate http download program
201
202 bc: A calculator program
203
204 sed, grep: Unix string processing and search programs
205
206 gdalwarp: A reprojection tool, needed only if data is
207 projected into this location.
208
209 xml2: An xml parser. Enables more accurate listing of
210 layers on the server.
211
213 r.tileset, r.in.gdal, r.patch
214
216 Soeren Gebbert, Jachym Cepicky, and Cedric Shock
217
218 Last changed: $Date: 2007-12-17 14:53:55 +0100 (Mon, 17 Dec 2007) $
219
220 Full index
221
222 © 2003-2008 GRASS Development Team
223
224
225
226GRASS 6.3.0 r.in.wms(1)