Partial funding for construction/maintenance of this website was provided
under a grant from FEMA's Grant Programs Directorate, U.S. Department of
Homeland Security, and the Oklahoma Office of Homeland Security. Points of
view or opinions expressed on this website do not necessarily represent
the official position or policies of FEMA's Grant Programs Directorate, the
U.S. Department of Homeland Security, or the Oklahoma Office of Homeland
Security.
Web Map Service (WMS)
OKMaps implements WMS 1.1.1 using GeoServer 1.7.6.
We expect users to leverage WMS when they are satisfied with the layer
symbolization provided and do not require analysis of the underlying features. WMS should
be the most rapid way to display data from OKMaps.
The Open Geospatial Consortium (OGC) Web Map
Service Interface Standard (WMS) specifies a means for a client to request a rendered, projected, and
cartographically styled map image from an Internet map server for display purposes. The standard also
specifies means for a client to request information about the server capailities, individuals layers,
and attribute information about individual features within a layer.
Each of the topics below presents an overview of different client-side WMS requests. For more
information on WMS in general, see the
Web Map Service (WMS) Implementation Specification.
Many commercial and open source GIS and mapping software have client-side support for WMS. Several
examples of harnessing these capabilities with common GIS software are also provided below.
Overview and Request Examples
Click each topic to expand/collapse.
A WMS request uses a HTTP GET request to retrieve information from an internet map server.
Common WMS Get requests include GetMap, GetCapabilities, and GetFeatureInfo.
-
GetMap
Retrieves a map consisting of one or more layers from a WMS site
-
GetCapabilities
Provides service metadata in an XML document
-
GetFeatureInfo
Prodives information about a feature on a map based on pixel location
Each request will consist of a series of parameters specifying the map server. service, the
WMS version, the request type, output format, and rendering options.
The following are required parameters for most WMS requests.
-
Service
Which service types at a particular server are being invoked
-
Version
Request version. Valid values are 1.0.0, 1.1.0, 1.1.1, and 1.3.0
-
Request
Request name. Valid values include GetMap, GetCapabilities, and GetFeatureInfo
Additionally, each Get request will contain a series of required and optional parameters. These parameters
vary by request as well as version. For specifics, see the
Web Map Service (WMS) Implementation Specification and each of the GET examples below.
The following URL requests a transparent map with two layers in png format from the OGI map server:
http://ogi.state.ok.us/geoserver/wms?VERSION=1.1.1&REQUEST=GetMap&SERVICE=WMS&LAYERS=ogi:okcounties,ogi:okcities&SRS=EPSG:4326&BBOX=-104.5005,32.7501,-94.01,37.20&WIDTH=800&HEIGHT=300&FORMAT=image/png&STYLES=&TRANSPARENT=TRUE
The resulting image of this request:
The the table below lists the parameters used in the above request:
Parameter |
Required? |
Value |
SERVER |
Y |
http://ogi.state.ok.us/geoserver/wms? |
REQUEST |
Y |
GetMap |
VERSION |
Y |
1.1.1 |
SERVICE |
Y |
WMS |
LAYERS |
Y |
okcounties,ogi:okcities |
SRS (spatial reference) |
Y |
EPSG:4326 |
BBOX (minx,miny,maxx, maxy) |
Y |
-104.5005,32.7501,-94.01,37.20 |
WIDTH (output width) |
Y |
800 |
HEIGHT (output height) |
Y |
300 |
FORMAT (output format) |
Y |
image/png |
STYLES (for each layer) |
Y |
(blank--uses the default SLD for the layer |
TRANSPARENT (true|false) |
N |
TRUE |
To retrieve attribute information of a particular WMS layer, use a URL similar to the
following.
http://ogi.state.ok.us/geoserver/wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&SRS=EPSG:4326&BBOX=-104.5005,32.7501,-94.01,37.20&WIDTH=800&HEIGHT=300&LAYERS=ogi:okcounties&QUERY_LAYERS=ogi:okcounties&STYLES=&X=550&Y=105&
The above request queries the Oklahoma Counties (ogi:okcounties) layer at a specified
location, resulting in the following response:
The GetFeatureInfo includes most of the original GetMap request parameters plus several
additional parameters.
Parameter |
Required? |
Value |
SERVER |
Y |
http://ogi.state.ok.us/geoserver/wms? |
SERVICE |
Y |
WMS |
VERSION |
Y |
1.1.1 |
REQUEST |
Y |
GetFeatureInfo |
SRS (spatial reference) |
Y |
EPSG:4326 |
BBOX (minx,miny,maxx, maxy) |
Y |
-104.5005,32.7501,-94.01,37.20 |
WIDTH (output width) |
Y |
800 |
HEIGHT (output height) |
Y |
300 |
LAYERS |
Y |
okcounties |
QUERY_LAYERS (output format) |
Y |
okcounties |
STYLES (for each layer) |
Y |
(blank--uses the default SLD for the layer |
X (pixel column) |
Y |
550 |
Y (pixel row) |
N |
105 |
Software Specific Examples
Click each topic to expand/collapse.
ArcGIS Desktop is a suite of
desktop GIS applications designed for geospatial data management, viewing, editing, and
analysis.
Note: Different versions of ArcGIS handle WMS requests differently, though the
connection steps are virtually identicial. The following instructions are for ArcGIS 9.3.
To add a WMS layer to ArcGIS, you must first establish a connection with a map server. This can
be done with ArcCatalog or directly within ArcMap.
In ArcCatalog:
- Expand the GIS Servers folder in the catalog tree
- Double click Add WMS Server
- In the URL text box, enter http://ogi.state.ok.us/geoserver/wms?
- Click the Get Layers button
- If the connection is successful, click the OK button
|
|
In ArcMap:
- Click the Add Data button
- From the Look in: list, select GIS Servers
If you already added a connection in ArcCatlog, select that connection, otherwise:
- Double-click Add WMS Server
- In the URL text box, enter http://ogi.state.ok.us/geoserver/wms?
- Click the Get Layers button
- If the connection is successful, click the OK button
|
To add a WMS layer to ArcMap:
- Double-click the WMS server in the GIS Servers list
- Double click GeoServer Web Map Server
- Double click GeoServer Web Map Server again
- Select the layer(s) from the list you wish to add
Note: In 9.1 and below, you cannot add individual layers, only the entire
service.
|
ArcGIS automatically performs the GetMap and GetFeatureInfo requests, thereby
enabling you to not only to view map layers stored on a remote server, but also acquire
attribute information about each feature in the selected layer(s).
Google Earth is a virtual globe designed
for viewing a range of geographic features. With Google Earth, it is possible to add
WMS overlays from various WMS-enabled Internet map servers.
Once Google Earth is launched:
- (Optional, but recommended) Zoom into the area of interest
- Select Image Overlay from the Add dropdown menu (Ctl+Shift+O)
- Enter a unique name in the Name text box (e.g. OGI)
- In the New Image Overlay window, select the Refresh tab
- Click the WMS Parameters button
- Click the Add... button next to the WMS Server dropdown list
- In the URL text box, enter http://ogi.state.ok.us/geoserver/wms?
Once the connection parameters are set:
- Select the layer(s) you wish to add from the layers list
- Click Add-> button
- Click the OK button
- (Optional, but recommended) Set a Time-Based and View-Based refresh rate
- Click the OK button again
|
|
Though Google Earh has WMS support, OKMaps permits direct export of layers to
a Google Earth format (KML).
|
ArcGIS Explorer
is a free virtual globe/GIS viewer for visualization of geographic information.
To add WMS layers to ArcGIS Explorer:
Launch ArcGIS Explorer:
- Select Open from the File dropdown menu (Ctl+O)
- In the Open Content window, select Servers
- Click the WMS button
- In the Server text box, enter http://ogi.state.ok.us/geoserver/wms?
- Click the OK button
Once the connection parameters are set:
- Expand the connection
- Select a raster cell size, then click the Next > button
- From the layers list, select the layer(s) you wish to add
- Click the arrow button to add it to the Layers to add list
- Click the Next > button
- Select the appropriate imagery format, then click the Next > button
- Select an appropriate disk caching option
- Click the Finish button
|
|
NASA World Wind is a virtual
globe developed by NASA that provides support WMS overlays.
Once NASA World Wind is launched (and set to Earth viewer):
- Select Import WMS url to layer... from the Tools dropdown menu
- In the Enter WMS url: text box, enter http://ogi.state.ok.us/geoserver/wms?
- Click the Get WMS Tree button
Once the connection parameters are set:
- Click the Save as XML button
- Close the WMS Importer window
- Click the Layer Manager Button
- Expand the WMS connection node
- Select the layer(s) you wish to draw
|
|
Quantum GIS (QGIS)is an Open Source GIS
project of the Open Source Geospatial
Foundation (OSGeo). QGIS runs on Linux, Unix, Mac, and Windows platforms and
has built-in WMS support.
The instructions for adding a WMS layer to QGIS are based on version 1.0.2. "Kore" running
on a Windows platform. Steps may vary with different versions and/or platforms.
In Quantum GIS:
- Click the Add WMS Layer button
- In the Add Layer(s) from a Server dialog window, click te New button
- In the Name tex box, enter a unique name for you connection(e.g. OGI)
- In the URL text box, enter http://ogi.state.ok.us/geoserver/wms?
- Click the OK button
Once the connection parameters are set:
- Select the Server Connection from the dropdown list
- Click the Connect button
- Select the layer(s) you wish to add from the list
- Click the Add button
|
|
Quantum GIS automatically performs the GetMap and GetFeatureInfo requests, thereby
enabling you to not only to view map layers stored on a remote server, but also acquire
attribute information about each feature in the selected layer(s).
|
uDIG (or User-friendly Desktop Internet GIS) is an
open source desktop application for Windows, Mac, and Linux. uDIG is designed to easily
consume standard geospatial web services, such as WMS and WFS, and may be used as a
stand-alone application or a plug-in to other Eclipse Rich Client (RCP) applications.
In uDIG:
- Select Add... from the Layer dropdown menu
- In the Data Sources window, select Web Map Server, then click the Next button
- In the URL text box, enter http://ogi.state.ok.us/geoserver/wms?
- Click the Next button
Once the connection parameters are set:
- Select the layer(s) you wish to add from the list
- Click the Finish button
|
|
Once a WMS connection is established with uDIG, the map service should appear in the
uDIG catalog list. To add addtional WMS layers from this service, expand the service and
select the layers.
uDIG automatically performs the GetMap and GetFeatureInfo requests, thereby
enabling you to not only to view map layers stored on a remote server, but also acquire
attribute information about each feature in the selected layer(s).
|
gvSIG is a free and
open source desktop GIS designed for managing geographic data. gvSIG supports numerous vector
and raster spatial data formats and can consume standard geospatial web services, such as
WMS, WFS, and WCS.
In gvSIG:
- Open a View
- (Recommended) change coordinate system from UTM N Zone 30 to GCS WGS 84 (EPSG:4326)--see below
- Select Add Layer (Alt+O) from the View drop down menu
- Click the WMS tab
- In the Server text box, enter http://ogi.state.ok.us/geoserver/wms?
- Click the Connect button
- Click the Next button
Once the connection is established:
- Select the Layers tab
- Select the layer(s) you wish to add
- Click the Add button
- Click the Formats Tab
- Select an image format (e.g. image/png)
- Select the correct SRS (spatial reference system)--all OKMaps vector layers are EPSG:4326
- Click the OK button
Note: gvSIG is a Spanish project and the default coordinate system for all new views is
UTM Zone 30 N (EPSG:23030). It is highly recommended you change the View to GCS WGS 84 (EPSG:4326)
or a more appropriate coordinate system for Oklahoma data prior to adding WMS layers from OKMaps.
|
|