Changes between Version 13 and Version 14 of FDORfc10


Ignore:
Timestamp:
Oct 24, 2007, 2:44:46 PM (17 years ago)
Author:
gregboone
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • FDORfc10

    v13 v14  
    1010||RFC Template Version||(1.0)||
    1111||Submission Date||||
    12 ||Last Modified||Klain Qin [[Timestamp]]||
     12||Last Modified||Greg Boone [[Timestamp]]||
    1313||Author||Klain Qin||
    1414||RFC Status||Draft||
     
    1717||Assigned PSC guide(s)||Greg Boone||
    1818||'''Voting History'''|| ||
    19 ||+1||Haris,Greg,Orest,Mateusz,Bob,Jason,Frank||
     19||+1||||
    2020||+0||||
    2121||-0||||
     
    5050WMS Override API will accept a string instead of the enumeration for image format. It will only accept server defined format strings that contain ‘png’, ‘tiff’, ‘jpeg’ or ‘gif’ in their definitions.
    5151
    52 For example, by calling {{{SetImageFormat("image/png; PhotometricInterpretation=PaletteColor")}}}, WMS Provider will return raster stream in palette model. And by calling {{{SetImageFormat("image/png; PhotometricInterpretation=RGB")}}}, the raster stream will be returned in RGB model.
    53 
    54 In this way, WMS Provider could fully make use of the server capability to support different bit-depth. These additional parameters will go into the configuration file like:
    55 {{{
    56 <RasterDefinition name="Image">
    57   <Format>image/png;PhotometricInterpretation=PaletteColor</Format>
     52For example, by calling
     53
     54{{{
     55SetImageFormat("image/png; PhotometricInterpretation=PaletteColor")
     56}}}
     57
     58The WMS Provider will return raster stream in palette model. And by calling
     59
     60{{{
     61SetImageFormat("image/png; PhotometricInterpretation=RGB")
     62}}}
     63
     64the raster stream will be returned in RGB model.
     65
     66In this way, WMS Provider could fully make use of the server capability to support different bit-depth. These additional parameters will go into the configuration file in a NEW WMS configuration element <!FormatType>:
     67
     68{{{
     69<RasterDefinition name="Image">
     70  <FormatType>image/png;PhotometricInterpretation=PaletteColor</FormatType>
    5871  ...
    5972</RasterDefinition>
    6073}}}
     74
    6175However, still only four image file formats are supported: png, tiff, jpeg, and gif. If the user passed a string that contains other image formats like "bmp", "wbmp", etc, an exception will be thrown.
    6276
     
    132146
    133147
    134 == Implications ==
    135 
    136 •   The change is backwards compatible with existing config files. Existing config files will be readable by the updated WMS provider.
    137 
    138 •   The change is not forwards compatible. New config files created by the updated provider are not readable by earlier versions of the WMS provider.
    139 
    140 This is a problem because earlier versions of the WMS override API will do a strict check on parsing <Image> ... </Image> in the configuration file. It could only recognize "png", "jpg", "Gif", or "tif", as they are hard-coded in the code:
    141 {{{
    142     static FdoString* g_WmsImageFormatPng                   = L"PNG";
    143     static FdoString* g_WmsImageFormatTif                   = L"TIF";
    144     static FdoString* g_WmsImageFormatJpg                   = L"JPG";
    145     static FdoString* g_WmsImageFormatGif                   = L"GIF";
    146 }}}
     148In order to make the proposed change both backwards and forwards compatible. Configuration files created by the 3.3.0 version of the WMS Provider will continue to write the value of the <Format> element as was previously done in FDO 3.2.2. This would allow continued compatibility with applications written for 3.2.2. At the same time the FDO 3.3 WMS provider configuration file would be modified to contain a new <!FormatType> element that would only be evaluated by the 3.3 version of the WMS provider and subsequent releases. FDO 3.3 would look for <!FormatType> first and if not found evaluate <Format>. FDO 3.2.2 would continue to evaluate <Format>  and ignore <!FormatType>. There would some duplication of information, but applications written on both versions of the WMS Provider should continue to work as designed. The <Format> would be deemed deprecated and removed once forward compatibility support is no longer required.
     149
     150The resulting 3.3 WMS configuration xml document would take the form of...
     151
     152{{{
     153<RasterDefinition name="Image">
     154  <Format>PNG</Format> // Deprecated element. This one is consistent with FDO 3.2.2
     155  <FormatType>image/png;PhotometricInterpretation=PaletteColor</FormatType>
     156...
     157</RasterDefinition>
     158}}}
     159
     160
     161'''For the 3.2.2 FDO WMS configuration API'''....
     162
     163Calls to
     164
     165{{{
     166void FdoWmsOvRasterDefinition::SetFormatType(FdoWmsOvFormatType value);
     167}}}
     168
     169would continue to result in the generation of XML content that contained only the FORMAT element as follows
     170
     171{{{
     172<RasterDefinition name="Image">
     173  <Format>PNG</Format>
     174  ...
     175</RasterDefinition>
     176}}}
     177
     178
     179Calls to
     180
     181{{{
     182FdoWmsOvFormatType FdoWmsOvRasterDefinition::GetFormatType(void) const;
     183}}}
     184
     185would continue to result in the return of the expected !FdoWmsOvFormatType enumeration type
     186
     187
     188'''For the 3.3 FDO WMS configuration API'''....
     189
     190Calls to
     191
     192{{{
     193void SetImageFormat(FdoString* value);
     194}}}
     195
     196would result in the generation of XML content that contained both <Format> and <!FormatType>
     197
     198{{{
     199<RasterDefinition name="Image">
     200  <Format>PNG</Format>
     201  <FormatType>image/png;PhotometricInterpretation=PaletteColor</Format>
     202  ...
     203</RasterDefinition>
     204}}}
     205
     206where the content of <!FormatType> is the content passed through the call to !SetImageFormat() and the content of <Format> is interpreted and set form the allowed values of <!FormatType>, with a default value of PNG being used no valid interpretation can be made.
     207
     208Calls to
     209
     210{{{
     211FdoString* GetImageFormat(void) const;
     212}}}
     213
     214would result in the return of the expected string set through the call to !SetImageFormat() and/or the value contained in the <!FormatType> element. The content in <Format> would not be returned or evaluated.
    147215
    148216== Test Plan ==
    149217
    150 Existing unit tests will be expanded to test those changes.
     218Existing unit tests will be expanded to test those changes. Regression testing will be performed against applications using FDO 3.2.2.
    151219
    152220== Funding/Resources ==