OGC WMS

The OpenGIS® Web Map Service Interface Standard (WMS) provides a simple HTTP interface for requesting geo-registered map images from one or more distributed geospatial databases.

A WMS request defines the geographic layer(s) and area of interest to be processed. The response to the request is one or more geo-registered map images (returned as JPEG, PNG, etc) that can be displayed in a browser application.

The interface also supports the ability to specify whether the returned images should be transparent so that layers from multiple servers can be combined or not.

SIS Desktop 9 can act as a client, accessing any OGC compliant WMS service. GeognoSIS Desktop 9 and Cadcorp ISAPI can act as OGC compliant WMS servers allowing any complaint client to access to the hosted data source.

The default version of OGC WMS requests is 1.3.0.

OGC Web Map Services support following requests:

GetCapabilties

The purpose of the GetCapabilities operation is to obtain service metadata, which is a machine-readable (and human-readable) description of the server’s information content and acceptable request parameter values. OGC WMS capabilities can be requested from the Add Overlay [Home > Map] dialog.

GetMap

The GetMap operation returns a map. Upon receiving a GetMap request, a WMS shall either satisfy the request or issue a service exception.

OGC WMS specific parameters:

The LastURL$ property of the WMS Image item stores the last GetMap request. The URL value held in this property can be copied from the item property to an internet browser.

Typically this could be:

http://ws.cadcorp.com/wms.exe?VERSION=1.3.0&SERVICE=WMS&REQUEST=GetMap&STYLES=&FORMAT=image%2fpng&CRS=EPSG:27700&LAYERS=OS_MiniScale_R12&BBOX=31395.9538936615,582280.199071842,536303.412914276,799629.477986771&WIDTH=1352&HEIGHT=582&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&EXCEPTIONS=XML

The WMSParams$ property of the WMS Image item stores the Get Feature Capabilities string.

Typically this could be:

GetMapURL="http://ws.cadcorp.com/wms.exe?",SrvService=WMS,SrvTitle="Cadcorp GeognoSIS Web Map Server",GetCapabilitiesURL="http://ws.cadcorp.com/wms.exe?",GetFeatureInfoURL="http://ws.cadcorp.com/wms.exe?",GetFeatureInfoFormats="text/html,text/xml",Queryable="0",Titles="OS MiniScale R12"

TIP: See http://www.opengeospatial.org/ for details of the WMS Get Feature Capabilities parameters.

Styled Layer Descriptors (SLD)

Styling can be described using a user-defined XML encoding of a map’s appearance called a Styled Layer Descriptor (SLD). These styled layer definitions may use named or user-defined layers and named or user-defined styling. Here is a simple SLD that corresponds to the first example from the previous section:

<StyledLayerDescriptorversion="1.1.0">

   <NamedLayer>

       <Name>Rivers</Name>

       <NamedStyle>

           <Name>CenterLine</Name>

       </NamedStyle>

   </NamedLayer>

   <NamedLayer>

       <Name>Roads</Name>

       <NamedStyle>

           <Name>CenterLine</Name>

       </NamedStyle>

   </NamedLayer>

   <NamedLayer>

       <Name>Houses</Name>

       <NamedStyle>

           <Name>Outline</Name>

       </NamedStyle>

   </NamedLayer>

</StyledLayerDescriptor>

 

The NamedLayer and NamedStyle elements correspond to the LAYERS and STYLES of the OGC WMS GetMap request. An SLD XML document can become much more complex with user-defined styling.

SLD styles can only be applied in the SIS Desktop 9 Desktop when the OGC WMS is added via the CreateDataSourceOverlay (API Method).

GetFeatureInfo

GetFeatureInfo is an optional operation. The canonical use case for GetFeatureInfo is that a user sees the response of a Map request and chooses a point (I,J) on that map for which to obtain more information. In the SIS Desktop 9 Desktop the user can use the Get Feature Info (Command) to send a request to an OGC WMS which is loaded in an overlay.

An OGC WMS responds to a GetFeatureInfo request with property information about features which are found within a tolerance of the defined point location (I,J).

The basic operation provides the ability for a client to specify which pixel is being asked about, which layer(s) should be investigated and what format the information should be returned in. Because the WMS protocol is stateless, the GetFeatureInfo request indicates to the WMS what map the user is viewing by including most of the original GetMap request parameters (all but VERSION and REQUEST). From the spatial context information (BBOX, CRS, WIDTH, HEIGHT) in that GetMap request, along with the I,J position.

Adding OGC Web Map Services

OGC Web Map Services can be added through Add Overlay [Home-Map] or via the CreateDataSourceOverlay (API Method).

OGC WMS requests are composed of the following parameters:

http://localhost/wms/wms.exe? URL prefix for the web service (e.g. Cadcorp.OGC.CGI.exe) OGC of the server where the Cadcorp.SIS.ISAPI.dll file resides.
REQUEST= GetCapabilities, GetMap, GetFeatureInfo, GetLegend.
VERSION= Version of the OGC WMS request. Default 1.3.0.
SRS= The Spatial Reference System defined by its EPSG code (e.g. 4326). VERSION=1.0.0. only.
CRS= The Coordinate Reference System defined by its EPSG code (e.g. 4326). VERSION=1.3.0. only.
LAYERS= Comma separated list of one or more map layers from the WMS capabilities.
BBOX= Bounding box defined as a set of comma-separated values (xmin, ymin,xmax, ymax). They must define an area that is contained within the BBOX as specified in the WMS capabilities for each layer in the LAYERS list.
WIDTH= Width in pixels of the map image.
HEIGHT= Height in pixels of the map image.
FORMAT= Output format of the rendered map image (e.g. GIF, JPEG, PNG, and TIFF).
SLD= The location of the Styled Layer Descriptor file.
STYLES= The style definitions from the SLD schema which should be applied to the LAYERS.

OGC WMS GetFeatureInfo requests have the following parameters:

INFO_FORMAT= Output format for GetFeatureInfo (e.g. text/xml).
I= Pixel from the left in the rendered image to be queried for GetFeatureInfo request.
J= Pixel from the top in the rendered image to be queried for GetFeatureInfo request.
FEATURE_COUNT= Number of features to be returned.
PIXEL_RADIUS= The spatial tolerance of the query (PIXEL_RADIUS=default is 6px).

GetLegend

Returns the legend image.

Parameters are:

VERSION=1.3.0 – the wms version
FORMAT=image/png; PhotometricInterpretation=RGB – the image format, it can be any of the supported image types. It must be escaped in the url. e.g. / is replaced by %2f
LAYERS=Wards – the layer to get the legend for
EXCEPTIONS=INIMAGE – how to cope with errors
SERVICE=WMS – service type
REQUEST=GetLegend – the type of the request

Compatibility:

  • Cadcorp SIS Desktop
  • Cadcorp SIS Desktop Express
  • Cadcorp SIS ActiveX Modeller
  • Cadcorp SIS ActiveX Manager
  • Cadcorp SIS ActiveX Viewer
  • Cadcorp GeognoSIS