Version 6 (modified by 14 years ago) ( diff ) | ,
---|
The Web Map Service file format
Accessing several different types of web image services is possible using the WMS format in GDAL. Services are accessed by creating a local service description XML file.
The official GDAL documentation for the WMS file format is http://www.gdal.org/frmt_wms.html.
Introduction
Given a particular WMS server, it should always be possible to query its capabilities through the GetCapabilities request. From this information it is possible to build a reasonable service description XML file for GDAL. In particular, the following relevant data is usually discernible:
- server URL and version (<ServiceURL> and <Version> tags);
- image projection (<SRS>, <CRS>, <Projection> tags);
- image extent (<UpperLeftX>, <UpperLeftY>, <LowerRightX>, <LowerRightY> tags);
- available layers (<Layers> tag);
- available styles (<Styles> tag)
What is missing is the image size in pixels (<SizeX> and <SizeY> tags) and, since it is a mandatory parameter, it should be found somewhere else or... 'guessed'.
In the following, there are some examples of complete service description XML files ready to be used with GDAL, using different WMS mini-drivers. This list is meant to extend the examples given in the official documentation at http://www.gdal.org/frmt_wms.html
TerraServer-USA (US)
The main website is http://terraservice.net/ and the web services are described at http://terraservice.net/webservices.aspx
The capabilities url is http://terraservice.net/ogccapabilities.ashx?version=1.1.1&request=getcapabilities&service=wms
All maps can be reprojected on the fly to EPSG:4326, but the image size in pixels is easily derivable only for the single UTM zones: 2m/pixel, EPSG:26904 - EPSG:26919, i.e. NAD83 / UTM Zone 4N-19N. So, instead of a single XML file, we need a specific file for each zone.
In the following, the files for accessing the DRG layer (USGS Raster Graphics Topo Maps) with default style:
- EPSG:26904 NAD83 / UTM Zone 4N: wms_terra_drg_04N.xml
- EPSG:26905 NAD83 / UTM Zone 5N: wms_terra_drg_05N.xml
- EPSG:26910 NAD83 / UTM Zone 10N: wms_terra_drg_10N.xml
- EPSG:26911 NAD83 / UTM Zone 11N: wms_terra_drg_11N.xml
- EPSG:26912 NAD83 / UTM Zone 12N: wms_terra_drg_12N.xml
- EPSG:26913 NAD83 / UTM Zone 13N: wms_terra_drg_13N.xml
- EPSG:26914 NAD83 / UTM Zone 14N: wms_terra_drg_14N.xml
- EPSG:26915 NAD83 / UTM Zone 15N: wms_terra_drg_15N.xml
- EPSG:26916 NAD83 / UTM Zone 16N: wms_terra_drg_16N.xml
- EPSG:26917 NAD83 / UTM Zone 17N: wms_terra_drg_17N.xml
- EPSG:26918 NAD83 / UTM Zone 18N: wms_terra_drg_18N.xml
- EPSG:26919 NAD83 / UTM Zone 19N: wms_terra_drg_19N.xml
Portale Cartografico Nazionale (Italy)
The main website is http://www.pcn.minambiente.it/PCN/ and the web services are described at http://www.pcn.minambiente.it/PCNDYN/catalogowms.jsp?lan=en
The following files provide topo maps at 1:25000 and 1:100000 scales for Italy. The image size in pixel is just an almost random guess.
- IGM 1:25000 wms_pcn_igm025.xml
- IGM 1:100000 wms_pcn_igm100.xml
Attachments (14)
-
wms_terra_drg_04N.xml
(660 bytes
) - added by 14 years ago.
EPSG:26904 NAD83 / UTM Zone 4N
-
wms_terra_drg_05N.xml
(659 bytes
) - added by 14 years ago.
EPSG:26905 NAD83 / UTM Zone 5N
-
wms_terra_drg_10N.xml
(660 bytes
) - added by 14 years ago.
EPSG:26910 NAD83 / UTM Zone 10N
-
wms_terra_drg_11N.xml
(660 bytes
) - added by 14 years ago.
EPSG:26911 NAD83 / UTM Zone 11N
-
wms_terra_drg_12N.xml
(660 bytes
) - added by 14 years ago.
EPSG:26912 NAD83 / UTM Zone 12N
-
wms_terra_drg_13N.xml
(744 bytes
) - added by 14 years ago.
EPSG:26913 NAD83 / UTM Zone 13N
-
wms_terra_drg_14N.xml
(661 bytes
) - added by 14 years ago.
EPSG:26914 NAD83 / UTM Zone 14N
-
wms_terra_drg_15N.xml
(661 bytes
) - added by 14 years ago.
EPSG:26915 NAD83 / UTM Zone 15N
-
wms_terra_drg_16N.xml
(661 bytes
) - added by 14 years ago.
EPSG:26916 NAD83 / UTM Zone 16N
-
wms_terra_drg_17N.xml
(661 bytes
) - added by 14 years ago.
EPSG:26917 NAD83 / UTM Zone 17N
-
wms_terra_drg_18N.xml
(660 bytes
) - added by 14 years ago.
EPSG:26918 NAD83 / UTM Zone 18N
-
wms_terra_drg_19N.xml
(743 bytes
) - added by 14 years ago.
EPSG:26919 NAD83 / UTM Zone 19N
-
wms_pcn_igm025.xml
(662 bytes
) - added by 14 years ago.
IGM 1:25000
-
wms_pcn_igm100.xml
(663 bytes
) - added by 14 years ago.
IGM 1:100000
Download all attachments as: .zip