wiki:FDORfc10

Version 1 (modified by klain, 17 years ago) ( diff )

--

FDO RFC 5 - Modify Fdo API FdoFunctionDefinition

This page contains a request for comments document (RFC) for the FDO Open Source project. More FDO RFCs can be found on the RFCs page.

Status

RFC Template Version(1.0)
Submission Date
Last ModifiedKlain Qin Timestamp
AuthorKlain Qin
RFC StatusDraft
Implementation Status Under Development
Proposed Milestone3.3.0.0
Assigned PSC guide(s)Greg Boone
Voting History
+1
+0
-0
-1

Overview

The purpose is to add support to additional parameters and bit-depth variations to image formats.

Currently, WMS Provider supports four image formats: image/png, image/jpg, image/tif, image/gif. They are defined as: enum FdoWmsOvFormatType{

FdoWmsOvFormatType_Png = 0, FdoWmsOvFormatType_Tif, FdoWmsOvFormatType_Jpg, FdoWmsOvFormatType_Gif

};

This enhancement will support additional parameters and bit-depth variations such as:

image/png; PhotometricInterpretation=PaletteColor image/png; PhotometricInterpretation=RGB image/png; mode=24bit

Proposed Solution

WMS 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.

This section outlines the necessary code changes in the unmanaged and managed code.

Unmanaged Code

/// \brief
///
/// The FdoWmsOvRasterDefinition class defines the physical overrides for a raster property in a WMS FDO schema.
class FdoWmsOvRasterDefinition : public FdoPhysicalElementMapping
{
...
    /// \brief
    /// Gets the format type in which the WMS image will be generated.
    /// 
    /// \remarks
    /// Allowed map formats are "picture" formats . Picture formats constitute 
    /// a rectangular pixel array of fixed size. Picture formats include file types such 
    /// as Portable Network Graphics (PNG), Joint Photographics Expert Group (JPEG) 
    /// and file types such as Tagged Image File Format (TIFF).
    /// 
    /// \return
    /// Returns the WMS format type.
    /// 
    FDOWMS_API FdoString* GetFormatType(void) const;

    /// \brief
    /// Sets the format type in which the WMS image will be generated.
    /// 
    /// \remarks
    /// Allowed map formats are "picture" formats . Picture formats constitute 
    /// a rectangular pixel array of fixed size. Picture formats include file types such 
    /// as Portable Network Graphics (PNG), Joint Photographics Expert Group (JPEG) 
    /// and file types such as Tagged Image File Format (TIFF).
    /// 
    /// \return
    /// Returns nothing.
    /// 
    FDOWMS_API void SetFormatType(FdoString* value);
...
}

Managed Code

/// <summary> 
/// The FdoWmsOvRasterDefinition class defines the physical overrides for a raster property in a WMS FDO schema.
/// </summary>
public __gc class OvRasterDefinition : public NAMESPACE_OSGEO_FDO_COMMANDS_SCHEMA::PhysicalElementMapping
{
...
    /// <summary>Gets the format type in which the WMS image will be generated.</summary>
    /// <returns>Returns the WMS format type.</returns> 
    /// <remarks>Allowed map formats are "picture" formats . Picture formats constitute 
    /// a rectangular pixel array of fixed size. Picture formats include file types such 
    /// as Portable Network Graphics (PNG), Joint Photographics Expert Group (JPEG) 
    /// and file types such as Tagged Image File Format (TIFF).</remarks> 
    __property System::String* get_FormatType();

    /// <summary>Sets the format type in which the WMS image will be generated.</summary>
    /// <returns>Returns nothing.</returns> 
    /// <remarks>Allowed map formats are "picture" formats . Picture formats constitute 
    /// a rectangular pixel array of fixed size. Picture formats include file types such 
    /// as Portable Network Graphics (PNG), Joint Photographics Expert Group (JPEG) 
    /// and file types such as Tagged Image File Format (TIFF).</remarks> 
    __property System::Void set_FormatType(System::String* value);
...
}

Implications

This change will not cause any side-effects, nor any compatibility problems.

Test Plan

Existing unit tests will be expanded to test those changes.

Funding/Resources

Autodesk to provide resources / funding to update WMS Override API.

Note: See TracWiki for help on using the wiki.