24 | | In the current design of the OSGeo FDO WMS Provider, no mechanism exists to allow a client to retrieve the supported CRS and Style names supported by specific WMS layer. In addition, no mechanism exists to allow an application to retrieve all the image format types supported by a WMS service. |
25 | | |
26 | | In order to resolve this oversight, the OSGeo WMS provider will be enhanced to provide an application with the ability to use the FDO command invocation system to retrieve the supported image formats, styles and CRS information from the WMS service. |
| 24 | In the current design of the OSGeo FDO WMS Provider, no mechanism exists to allow a client to retrieve the supported CRS and Style names supported by specific WMS layer. In addition, no mechanism exists to allow an application to retrieve all the image fromat types supported by a WMS service. |
| 25 | |
| 26 | In order to resolve this oversight, the OSGeo WMS provider will be enhanced to provide an application with the ability to use the FDO command invocation system to retrieve the supported image fromats, styles and CRS infromation from the WMS service. |
49 | | 3 new commands will be added to the FDO WMS Provider specification, allowing an application to request image format, style and CRS name information. These commands willonly be able to be invoked once a connection has successfully been made to the WMS provider and in turn to the specified WMS service. |
50 | | |
51 | | === Get Image Formats Command === |
52 | | |
53 | | {{{ |
54 | | class FdoWmsIGetImageFormats: public FdoICommand |
55 | | { |
56 | | public: |
57 | | /// \brief |
58 | | /// Executes the GetImageFormats command and returns a FdoStringCollection |
59 | | /// which contains all the image formats supported by the current WMS service. |
60 | | /// |
61 | | /// \return |
62 | | /// Returns the image format collection supported by WMS service |
| 52 | Managed API |
| 53 | {{{ |
| 54 | // This number is defined so our custom command would not clash with other |
| 55 | // custom provider commands. |
| 56 | #define WMS_FIRST_PROVIDER_COMMAND 1800 |
| 57 | |
| 58 | BEGIN_NAMESPACE_OSGEO_FDO_PROVIDERS_WMS |
| 59 | |
| 60 | /// <summary>The WmsCommandType enumeration defines the list of WMS Provider specific commands.</summary> |
| 61 | /// <param name="WmsCommandType_GetImagefromats">Represents the GetImagefromats command.</param> |
| 62 | /// <param name="WmsCommandType_GetFeatureClassStyles">Represents the GetFeatureClassStyles command.</param> |
| 63 | /// <param name="WmsCommandType_GetFeatureClassCRSNames">Represents the GetFeatureClassCRSNames command.</param> |
| 64 | public __value enum CommandType { |
| 65 | |
| 66 | WmsCommandType_GetImagefromats = NAMESPACE_OSGEO_FDO_COMMANDS::CommandType::CommandType_FirstProviderCommand + WMS_FIRST_PROVIDER_COMMAND, |
| 67 | WmsCommandType_GetFeatureClassStyles, |
| 68 | WmsCommandType_GetFeatureClassCRSNames |
| 69 | }; |
| 70 | |
| 71 | END_NAMESPACE_OSGEO_FDO_PROVIDERS_WMS |
| 72 | }}} |
| 73 | |
| 74 | 3 new commands will be added to the FDO WMS Provider specification, allowing an application to request image fromat, style and CRS name infromation. These commands willonly be able to be invoked once a connection has successfully been made to the WMS provider and in turn to the specified WMS service. |
| 75 | |
| 76 | === Get Image fromats Command === |
| 77 | Unmanaged API: |
| 78 | {{{ |
| 79 | class FdoWmsIGetImagefromats: public FdoICommand |
| 80 | { |
| 81 | public: |
| 82 | /// \brief |
| 83 | /// Executes the GetImagefromats command and returns a FdoStringCollection |
| 84 | /// which contains all the image fromats supported by the current WMS service. |
| 85 | /// |
| 86 | /// \return |
| 87 | /// Returns the image fromat collection supported by WMS service |
| 157 | Managed API |
| 158 | {{{ |
| 159 | BEGIN_NAMESPACE_OSGEO_FDO_PROVIDERS_WMS |
| 160 | |
| 161 | ///<summary> |
| 162 | /// This command get the styles list supportted by specified FeatureClass |
| 163 | /// from WMS service. |
| 164 | ///</summary> |
| 165 | public __gc __interface IGetFeatureClassStyles : public NAMESPACE_OSGEO_FDO_COMMANDS::ICommand |
| 166 | { |
| 167 | public: |
| 168 | /// <summary>Sets the name of the FeatureClass in WMS service. |
| 169 | /// This function is mandatory; if not specified, |
| 170 | /// execution of the command will throw exception. |
| 171 | /// </summary> |
| 172 | /// <param name="name">The FeatureClass name.</param> |
| 173 | /// <returns>Returns nothing.</returns> |
| 174 | __property System::Void set_FeatureClassName(System::String* name); |
| 175 | |
| 176 | /// <summary>Gets the name of FeatureClass to get the supportted styles. |
| 177 | /// </summary> |
| 178 | /// <returns>Returns the name of the FeatureClass name.</returns> |
| 179 | __property System::String* get_FeatureClassName(); |
| 180 | |
| 181 | /// <summary> |
| 182 | /// Executes the command. An exception is thrown if the feature class is NULL. |
| 183 | /// </summary> |
| 184 | /// <returns> |
| 185 | /// Return a StringCollection |
| 186 | /// which contains all styles supported by specified feature class |
| 187 | /// and all styles supported by its ancestors. WMS services support Style |
| 188 | /// declarations inherited by child Layers. |
| 189 | /// </returns> |
| 190 | NAMESPACE_OSGEO_COMMON::StringCollection* Execute(); |
| 191 | }; |
| 192 | |
| 193 | END_NAMESPACE_OSGEO_FDO_PROVIDERS_WMS |
| 194 | }}} |
| 195 | |
| 239 | Managed API |
| 240 | {{{ |
| 241 | BEGIN_NAMESPACE_OSGEO_FDO_PROVIDERS_WMS |
| 242 | |
| 243 | ///<summary> |
| 244 | /// This command get the CRS names list supportted by specified FeatureClass |
| 245 | /// from WMS service. |
| 246 | ///</summary> |
| 247 | public __gc __interface IGetFeatureClassCRSNames : public NAMESPACE_OSGEO_FDO_COMMANDS::ICommand |
| 248 | { |
| 249 | public: |
| 250 | /// <summary>Sets the name of the FeatureClass in WMS service. |
| 251 | /// This function is mandatory; if not specified, |
| 252 | /// execution of the command will throw exception. |
| 253 | /// </summary> |
| 254 | /// <param name="name">The FeatureClass name.</param> |
| 255 | /// <returns>Returns nothing.</returns> |
| 256 | __property System::Void set_FeatureClassName(System::String* name); |
| 257 | |
| 258 | /// <summary>Gets the name of FeatureClass to get the supportted CRS names. |
| 259 | /// </summary> |
| 260 | /// <returns>Returns the name of the FeatureClass name.</returns> |
| 261 | __property System::String* get_FeatureClassName(); |
| 262 | |
| 263 | /// <summary> |
| 264 | /// Executes the command. An exception is thrown if the feature class is NULL. |
| 265 | /// </summary> |
| 266 | /// <returns> |
| 267 | /// Returns an StringCollection |
| 268 | /// which contains all the CRS names supported by specified feature class. |
| 269 | /// and all CRS names supported by its ancestors. WMS services supports CRS |
| 270 | /// declarations inherited by child Layers. |
| 271 | /// </returns> |
| 272 | NAMESPACE_OSGEO_COMMON::StringCollection* Execute(); |
| 273 | }; |
| 274 | |
| 275 | END_NAMESPACE_OSGEO_FDO_PROVIDERS_WMS |
| 276 | |
| 277 | }}} |
| 278 | |