wiki:FdoOGCVersionHandling

FDO-OGC Enhanced Version Handling

Overview

In the current design of the OSGeo OGC FDO Provider(s) connection process, no mechanism exists to allow a client to specify which OGC version should be used when establishing a connection with a server and retrieving its capabilities. This is true for both the WFS and WMS providers. In the absence of any user-specified information, both providers hard-code the version numbers used when issuing its GetCapabilities requests. For WMS, this value is hard-coded to be 1.3.0. For WFS, this value is hard-coded to be 1.1.0.

Let’s use WMS as an example. If 1.3.0 is hard-coded as the initial OGC version number, the WMS server is supposed to (as specified in the OGC WMS specification) respond to the request with a capabilities document that corresponds to version 1.3.0 or the next lowest WMS version supported by the server. If a server supports WMS versions 1.1.1 and 1.3.0 or does not recognize version 1.3.0, there is no means of allowing a user to request that the provider use the WMS capabilities that corresponds to version 1.1.1. The same behavior is true for WFS servers.

In testing the WMS Provider with real world WMS servers, we found that certain servers support multiple WMS versions, each corresponding to a different set of capabilities and resulting layers. We also found out that certain servers do not recognize version 1.3.0 and will not return a valid capabilities document when it is used to retrieve the server’s capabilities. We had to introduce a workaround into FDO that would allow the user to specify version 1.1.1. Without this workaround the entire WMS site was unusable.

In order to resolve this issue the WMS and WFS providers should be enhanced to allow the specification of an optional version number as a connection property. Users would be allowed to specify this value as a part of the WMS and WFS Provider connection process.

While no defects exist for the WFS, the Version property should also be added to the WFS provider so that both the WMS and WFS providers’ connection property remain consistent.

Description

The Version number connection property will be added to the FDO WMS and WFS Providers list of available connection properties as follows.

WMS Version Connection Property

PropertyValue
NameVersion
LocalizedNameVersion (English)
DefaultValue1.3.0
IsRequiredNo
IsProtectedNo
IsEnumerableNo
IsFileNameNo
IsFilePathNo
IsDatastoreNameNo

WMS Version Example Usage

The following is an example of how the Version property would be used if included as a part of a user-defined value passed to FdoIConnection::SetConnectionString.

FdoPtr<FdoIConnection> connection = GetConnection ();
FdoStringP connString = 
    L"FeatureServer=http://www.myserver.com/wms;
      Username=guest;
      Password=guest;
      DefaultImageHeight=400;
      Version=1.1.1");
connection->SetConnectionString(connString);
FdoConnectionState state = connection->Open ();

The following is an example of how the Version property would be used if specified using the FdoIConnectionPropertyDictionary.

FdoPtr<FdoIConnection> conn = GetConnection ();
FdoPtr<FdoIConnectionInfo> info = conn->GetConnectionInfo();
FdoPtr<FdoIConnectionPropertyDictionary> props = info->GetConnectionProperties();
props->SetProperty(L"FeatureServer", L"http://www.myserver.com/wms");
props->SetProperty(L"Username", L"guest");
props->SetProperty(L"Password", L"guest");
props->SetProperty(L"DefaultImageHeight", L"400");
props->SetProperty(L"Version", L"1.1.0");
FdoConnectionState state = connection->Open ();

WFS Version Connection Property

PropertyValue
NameVersion
LocalizedNameVersion (English)
DefaultValue1.1.0
IsRequiredNo
IsProtectedNo
IsEnumerableNo
IsFileNameNo
IsFilePathNo
IsDatastoreNameNo

WFS Version Example Usage

The following is an example of how the Version property would be used if included as a part of a user-defined value passed to FdoIConnection::SetConnectionString.

FdoPtr<FdoIConnection> connection = GetConnection ();
FdoStringP connString = 
    L"FeatureServer=http://www.myserver.com/wfs;
      Username=guest;
      Password=guest;
      Version=1.1.1");
connection->SetConnectionString(connString);
FdoConnectionState state = connection->Open ();

The following is an example of how the Version property would be used if specified using the FdoIConnectionPropertyDictionary.

FdoPtr<FdoIConnection> conn = GetConnection ();
FdoPtr<FdoIConnectionInfo> info = conn->GetConnectionInfo();
FdoPtr<FdoIConnectionPropertyDictionary> props = info->GetConnectionProperties();
props->SetProperty(L"FeatureServer", L"http://www.myserver.com/wfs");
props->SetProperty(L"Username", L"guest");
props->SetProperty(L"Password", L"guest");
props->SetProperty(L"Version", L"1.1.0");
FdoConnectionState state = connection->Open ();
Last modified 10 years ago Last modified on Oct 18, 2007 12:57:11 PM