32
32
<td class="xml"> <Service name="<span class="value">WMS</span>"></td>
33
<td class="desc">Define what mini-driver to use, currently supported are: WMS, WorldWind, TileService, TMS. (required)</td>
33
<td class="desc">Define what mini-driver to use, currently supported are: WMS, WorldWind, TileService, TMS, TiledWMS or VirtualEarth. (required)</td>
36
36
<td class="xml"> <Version><span class="value">1.1.1</span></Version></td>
37
37
<td class="desc">WMS version. (optional, defaults to 1.1.1)</td>
40
<td class="xml"> <ServerURL><span class="value">http://onearth.jpl.nasa.gov/wms.cgi?</span></ServerUrl></td>
40
<td class="xml"> <ServerUrl><span class="value">http://onearth.jpl.nasa.gov/wms.cgi?</span></ServerUrl></td>
41
41
<td class="desc">WMS server URL. (required)</td>
60
60
<td class="xml"> <Layers><span class="value">modis,global_mosaic</span></Layers></td>
61
<td class="desc">Comma separated list of layers. (required)</td>
61
<td class="desc">Comma separated list of layers. (required, except for TiledWMS)</td>
64
<td class="xml"> <TiledGroupName><span class="value">Clementine</span></TiledGroupName></td>
65
<td class="desc">Comma separated list of layers. (required for TiledWMS)</td>
64
68
<td class="xml"> <Styles></Styles></td>
65
69
<td class="desc">Comma separated list of styles. (optional)</td>
78
82
<td class="xml"> <DataWindow></td>
79
<td class="desc">Define size and extents of the data. (required)</td>
83
<td class="desc">Define size and extents of the data. (required, except for TiledWMS and VirtualEarth)</td>
82
86
<td class="xml"> <UpperLeftX><span class="value">-180.0</span></UpperLeftX></td>
83
<td class="desc">X (longitude) coordinate of upper-left corner. (optional, defaults to -180.0)</td>
87
<td class="desc">X (longitude) coordinate of upper-left corner. (optional, defaults to -180.0, except for VirtualEarth)</td>
86
90
<td class="xml"> <UpperLeftY><span class="value">90.0</span></UpperLeftY></td>
87
<td class="desc">Y (latitude) coordinate of upper-left corner. (optional, defaults to 90.0)</td>
91
<td class="desc">Y (latitude) coordinate of upper-left corner. (optional, defaults to 90.0, except for VirtualEarth)</td>
90
94
<td class="xml"> <LowerRightX><span class="value">180.0</span></LowerRightX></td>
91
<td class="desc">X (longitude) coordinate of lower-right corner. (optional, defaults to 180.0)</td>
95
<td class="desc">X (longitude) coordinate of lower-right corner. (optional, defaults to 180.0, except for VirtualEarth)</td>
94
98
<td class="xml"> <LowerRightY><span class="value">-90.0</span></LowerRightY></td>
95
<td class="desc">Y (latitude) coordinate of lower-right corner. (optional, defaults to -90.0)</td>
99
<td class="desc">Y (latitude) coordinate of lower-right corner. (optional, defaults to -90.0, except for VirtualEarth)</td>
98
102
<td class="xml"> <SizeX><span class="value">2666666</span></SizeX></td>
142
146
<td class="xml"> <BlockSizeX><span class="value">1024</span></BlockSizeX></td>
143
<td class="desc">Block size in pixels. (optional, defaults to 1024)</td>
147
<td class="desc">Block size in pixels. (optional, defaults to 1024, except for VirtualEarth)</td>
146
150
<td class="xml"> <BlockSizeY><span class="value">1024</span></BlockSizeY></td>
147
<td class="desc">Block size in pixels. (optional, defaults to 1024)</td>
151
<td class="desc">Block size in pixels. (optional, defaults to 1024, except for VirtualEarth)</td>
150
154
<td class="xml"> <OverviewCount><span class="value">10</span></OverviewCount></td>
195
199
<td class="desc">Should requests, that otherwise would be partially outside of defined data window, be clipped resulting in smaller than block size request. (optional, defaults to true)</td>
202
<td class="xml"> <UserAgent><span class="value">GDAL WMS driver (http://www.gdal.org/frmt_wms.html)</span></UserAgent></td>
203
<td class="desc">HTTP User-agent string. Some servers might require a well-known user-agent such as "Mozilla/5.0" (optional, defaults to "GDAL WMS driver (http://www.gdal.org/frmt_wms.html)"). Added in GDAL 1.8.0</td>
206
<td class="xml"> <Referer><span class="value">http://example.foo/</span></Referer></td>
207
<td class="desc">HTTP Referer string. Some servers might require it (optional). Added in GDAL 1.9.0</td>
210
<td class="xml"> <ZeroBlockHttpCodes><span class="value">204,404</span></ZeroBlockHttpCodes></td>
211
<td class="desc">Comma separated list of HTTP response codes that will be interpreted as a 0 filled image (i.e. black for 3 bands, and transparent for 4 bands) instead of aborting the request. Added in GDAL 1.9.0. (optional, defaults to 204)</td>
214
<td class="xml"> <ZeroBlockOnServerException><span class="value">true</span></ZeroBlockOnServerException></td>
215
<td class="desc">Wether to treat a Service Exception returned by the server as a 0 filled image instead of aborting the request. Added in 1.9.0. (optional, defaults to false)</td>
198
218
<td class="xml"></GDAL_WMS></td>
199
219
<td class="desc"></td>
267
287
Two examples of usage of the TMS service are included in the examples below.
290
<h3>OnEarth Tiled WMS (GDAL 1.9.0 and later)</h3>
292
The OnEarth Tiled WMS minidriver supports the Tiled WMS specification
293
implemented for the JPL OnEarth driver per the specification at
294
<a href="http://onearth.jpl.nasa.gov/tiled.html">http://onearth.jpl.nasa.gov/tiled.html</a>.<p>
296
A typical OnEarth Tiled WMS configuration file might look like:
300
<Service name="TiledWMS">
301
<ServerUrl>http://onmoon.jpl.nasa.gov/wms.cgi?</ServerUrl>
302
<TiledGroupName>Clementine</TiledGroupName>
307
Most of the other information is automatically fetched from the remote
308
server using the GetTileService method at open time. <p>
310
<h3>VirtualEarth (GDAL 1.9.0 and later)</h3>
312
Access to web-based Virtual Earth tile services. Access is always tile based.<p>
313
<p>The ${quadkey} variable must be found in the ServerUrl element.<p>
314
<p>The DataWindow element might be omitted. The default values are :
316
<li>UpperLeftX = -20037508.34</li>
317
<li>UpperLeftY = 20037508.34</li>
318
<li>LowerRightX = 20037508.34</li>
319
<li>LowerRightY = -20037508.34</li>
320
<li>TileLevel = 19</li>
321
<li>OverviewCount = 18</li>
322
<li>SRS = EPSG:900913</li>
323
<li>BlockSizeX = 256</li>
324
<li>BlockSizeY = 256</li>
270
328
<h2>Examples</h2>
274
332
<a href="frmt_wms_onearth_global_mosaic.xml">onearth_global_mosaic.xml</a> - Landsat mosaic from a <a href="http://onearth.jpl.nasa.gov/">OnEarth</a> WMS server<br>
275
333
<pre>gdal_translate -of JPEG -outsize 500 250 onearth_global_mosaic.xml onearth_global_mosaic.jpg</pre>
276
334
<img src="http://sydney.freeearthfoundation.com/gdalwms/onearth_global_mosaic.jpg" alt="example output">
277
335
<pre>gdal_translate -of JPEG -projwin -10 55 30 35 -outsize 500 250 onearth_global_mosaic.xml onearth_global_mosaic2.jpg</pre>
278
336
<img src="http://sydney.freeearthfoundation.com/gdalwms/onearth_global_mosaic2.jpg" alt="example output">
281
340
<a href="frmt_wms_metacarta_wmsc.xml">metacarta_wmsc.xml</a> -
282
341
It is possible to configure a WMS Service conforming to a WMS-C cache by
283
342
specifying a number of overviews and specifying the 'block size' as the
285
344
a 19-level "Global Profile" WMS-C cache.
286
345
<pre>gdal_translate -of PNG -outsize 500 250 metacarta_wmsc.xml metacarta_wmsc.png</pre>
287
346
<img src="http://sydney.freeearthfoundation.com/gdalwms/metacarta_wmsc.png" alt="example output">
290
350
<a href="frmt_wms_tileservice_bmng.xml">tileservice_bmng.xml</a> - TileService, Blue Marble NG (January)<br>
291
351
<pre>gdal_translate -of JPEG -outsize 500 250 tileservice_bmng.xml tileservice_bmng.jpg</pre>
292
352
<img src="http://sydney.freeearthfoundation.com/gdalwms/tileservice_bmng.jpg" alt="example output">
295
356
<a href="frmt_wms_tileservice_nysdop2004.xml">tileservice_nysdop2004.xml</a> - TileService, NYSDOP 2004<br>
296
357
<pre>gdal_translate -of JPEG -projwin -73.687030 41.262680 -73.686359 41.262345 -outsize 500 250 tileservice_nysdop2004.xml tileservice_nysdop2004.jpg</pre>
297
358
<img src="http://sydney.freeearthfoundation.com/gdalwms/tileservice_nysdop2004.jpg" alt="example output">
300
362
<a href="frmt_wms_openstreetmap_tms.xml">OpenStreetMap TMS Service Example</a>: Connect to OpenStreetMap tile service. Note that this file takes advantage of the tile cache; more information about configuring the tile cache settings is available above.<br />
301
363
<tt>gdal_translate -of PNG -outsize 512 512 frmt_wms_openstreetmap_tms.xml openstreetmap.png</tt>
305
367
<a href="frmt_wms_metacarta_tms.xml">MetaCarta TMS Layer Example</a>, accessing the default MetaCarta TMS layer.<br />
306
368
<tt>gdal_translate -of PNG -outsize 512 256 frmt_wms_metacarta_tms.xml metacarta.png</tt>
372
<a href="frmt_wms_bluemarble_s3_tms.xml">BlueMarble Amazon S3 Example</a> accessed with the TMS minidriver.
376
<a href="frmt_wms_googlemaps_tms.xml">Google Maps</a> accessed with the TMS minidriver.
380
<a href="frmt_wms_arcgis_mapserver_tms.xml">ArcGIS MapServer Tiles</a> accessed with the TMS minidriver.
384
<a href="frmt_wms_swissgeo_tms.xml">Swiss Geoportal maps</a> accessed with the TMS minidriver (needs GDAL >= 1.9.0)
388
OnEarth Tiled WMS <a href="frmt_twms_Clementine.xml">Clementine</a>,
389
<a href="frmt_twms_daily.xml">daily</a>, and
390
<a href="frmt_twms_srtm.xml">srtm</a> examples.<p>
394
<a href="frmt_wms_virtualearth.xml">VirtualEarth Aerial Layer</a> accessed with the VirtualEarth minidriver.
400
The WMS driver can open :
403
a local service description XML file : <pre>gdalinfo description_file.xml</pre>
407
the content of a description XML file provided as filename :
408
<pre>gdalinfo "<GDAL_WMS><Service name=\"TiledWMS\"><ServerUrl>http://onearth.jpl.nasa.gov/wms.cgi?</ServerUrl><TiledGroupName>Global SRTM Elevation</TiledGroupName></Service></GDAL_WMS>"</pre>
412
(GDAL >= 1.9.0) the base URL of a WMS service, prefixed with <i>WMS:</i> :
413
<pre>gdalinfo "WMS:http://wms.geobase.ca/wms-bin/cubeserv.cgi"</pre><p>
414
A list of subdatasets will be returned, resulting from the parsing of the GetCapabilities request on that server.
418
(GDAL >= 1.9.0) a pseudo GetMap request, such as the subdataset name returned by the previous syntax :
419
<pre>gdalinfo "WMS:http://wms.geobase.ca/wms-bin/cubeserv.cgi?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=DNEC_250K:ELEVATION/ELEVATION&SRS=EPSG:42304&BBOX=-3000000,-1500000,6000000,4500000"</pre>
423
(GDAL >= 1.9.0) the base URL of a Tiled WMS service, prefixed with <i>WMS:</i> and with request=GetTileService as GET argument:
424
<pre>gdalinfo "WMS:http://onearth.jpl.nasa.gov/wms.cgi?request=GetTileService"</pre><p>
425
A list of subdatasets will be returned, resulting from the parsing of the GetTileService request on that server.
429
(GDAL >= 1.9.0) the URL of a REST definition for a ArcGIS MapServer:
430
<pre>gdalinfo "http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer?f=json&pretty=true"</pre><p>
313
437
<li><a href="http://www.opengeospatial.org/standards/wms">OGC WMS Standards</a></li>
314
<li><a href="http://wiki.osgeo.org/index.php/WMS_Tiling_Client_Recommendation">WMS Tiling Client Recommendation</a></li>
315
<li><a href="http://www.worldwindcentral.com/wiki/TileService">TileService</a></li>
438
<li><a href="http://wiki.osgeo.org/index.php/WMS_Tiling_Client_Recommendation">WMS Tiling Client Recommendation (WMS-C)</a></li>
439
<li><a href="http://www.worldwindcentral.com/wiki/TileService">WorldWind TileService</a></li>
440
<li><a href="http://wiki.osgeo.org/wiki/Tile_Map_Service_Specification">TMS Specification</a></li>
441
<li><a href="http://onearth.jpl.nasa.gov/tiled.html">OnEarth Tiled WMS specification</a></li>