Changes between Version 9 and Version 10 of MapGuideRfc16


Ignore:
Timestamp:
Feb 22, 2007, 10:56:24 AM (17 years ago)
Author:
chrisclaydon
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • MapGuideRfc16

    v9 v10  
    3535The proposed solution contains modifications to: the layer definition XML schema, the MDF Model, the MDF Parser, the KML Service, and the Rendering/Stylization project.
    3636
    37 === Layer Definition Schema Changes ===
     37=== Layer Definition Schema Modifications ===
    3838
    3939The layer definition schema contains numerous !ExtendedData1 elements that allow the schema to be extended without breaking forward or backward compatibility. The changes proposed in this RFC would initially be added into one of these elements, and would eventually be moved to the main part of the schema whenever the next schema version update is carried out. See [wiki:MapGuideRfc10 MapGuide RFC 10] for more details.
     
    9797}}}
    9898
     99Descriptions of the key parameters are given below:
     100
     101||ZOffset||An expression that evaluates to the height of the base of the feature in meters||
     102||ZExtrusion||An expression that evaluates to the desired vertical extrusion (in meters) to be applied to the feature||
     103||ZOffsetType||A string value, either "!RelativeToGround" or "Absolute", that indicates how to interpret the ZOffset value||
     104
     105Additional !ExtendedData elements have been added to allow for future extensions to this part of the schema.
     106
     107=== MDF Model and Parser Modifications ===
     108
     109The MDF Model would require the addition of two new classes: !ElevationSettings and !VectorScaleRangeExtendedData1, corresponding to the <!ElevationSettings> and custom <!ExtendedData1> elements respectively. Similarly, the MDF Parser would require two new classes: IOElevationSettings and IOVectorScaleRangeExtendedData1.
     110
     111The parser classes would be responsible for reading and writing the elevation settings to/and from XML. The model classes would be used to store and access those settings. The methods implemented by each class would be very simple get/set or read/write functions.
     112
     113=== Rendering / Stylization Modifications ===
     114
     115A few changes would be required to the internal stylization interfaces in order to pass the elevation settings through the framework to the Stylize() methods of the affected !GeometryAdapters. Inside these methods, the offset and extrusion expressions would be evaluated for the current feature, and the resulting floating point values would be passed as additional parameters into the Renderer::!StartFeature() command. The method signature chages are as follows:
     116
     117!GeometryAdapter::Stylize() would be modified from this:
     118{{{
     119    virtual void Stylize(Renderer*                      /*renderer*/,
     120                         RS_FeatureReader*              /*features*/,
     121                         RS_FilterExecutor*             /*exec*/,
     122                         LineBuffer*                    /*lb*/,
     123                         MdfModel::FeatureTypeStyle*    /*style*/,
     124                         const MdfModel::MdfString*     /*tooltip = NULL*/,
     125                         const MdfModel::MdfString*     /*url = NULL*/)                         
     126}}}
     127to this:
     128{{{
     129    virtual void Stylize(Renderer*                      /*renderer*/,
     130                         RS_FeatureReader*              /*features*/,
     131                         RS_FilterExecutor*             /*exec*/,
     132                         LineBuffer*                    /*lb*/,
     133                         MdfModel::FeatureTypeStyle*    /*style*/,
     134                         const MdfModel::MdfString*     /*tooltip = NULL*/,
     135                         const MdfModel::MdfString*     /*url = NULL*/,
     136                         RS_ElevationSettings*          /*elevSettings = NULL*/)
     137}}}
     138where RS_ElevationSettings is a simple struct-like class that contains the elevation settings.
     139
     140Renderer::!StartFeature() would be modified from this:
     141{{{
     142    virtual void StartFeature (RS_FeatureReader* feature,
     143                               const RS_String*  tooltip = NULL,
     144                               const RS_String*  url = NULL,
     145                               const RS_String* theme = NULL) = 0;
     146}}}
     147to this:
     148{{{
     149    virtual void StartFeature (RS_FeatureReader* feature,
     150                               const RS_String*  tooltip = NULL,
     151                               const RS_String*  url = NULL,
     152                               const RS_String* theme = NULL,
     153                               double zOffset = 0,
     154                               double zExtrusion = 0,
     155                               RS_ElevationType zOffsetType = RS_ElevationType_RelativeToGround) = 0;
     156}}}
     157
    99158== Implications ==
    100159