Changes between Version 5 and Version 6 of MapGuideRfc59


Ignore:
Timestamp:
Feb 4, 2009, 11:38:01 PM (15 years ago)
Author:
evan
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • MapGuideRfc59

    v5 v6  
    2424== Overview ==
    2525
    26 The purpose of this RFC is to add a new schema in Layer Definition XML schema for TIN (Triangulated Irregular Networks). TIN layer has many characteristics that are different from Vector and Grid layers, it’s necessary to create a new layer type for TIN.
     26The purpose of this RFC is to add a new type of layer element in Layer Definition XML schema for TIN (Triangulated Irregular Networks). TIN is used to simulate triangle based terrain. It has many characteristics that are different from vector data and raster data, it’s necessary to create a new layer type for TIN.
    2727
    2828== Motivation ==
    29 The existing Layer Definition XML schema does not contains a definition for TIN layer. So, currently we cannot show a real TIN surface. [[BR]]
    30 
    31 Adding TIN layer schema will make it easier to support TIN layer and there will be a real TIN surface. We can see points, edges and faces if we zoom into the surface.
     29There are several kinds of data as vector and raster. TIN is another kind of data that can describe terrain model. Some products such as Oracel Spacial support TIN data. However, MapGuide does not support it yet.  So, currently we cannot show a real TIN surface in MapGuide.
     30[[BR]]Adding TIN layer schema will make it easier to support TIN layer and there will be a real TIN surface. We can see points, edges and faces if we zoom into the surface.
     31[[BR]]In future, FDO Provider may support TIN.
    3232
    3333== Proposed Solution ==
    34 The proposed solution contains modifications to: the Layer Definition XML schema, the FDO provider, and the Stylization project.
     34The proposed solution contains modifications to the Layer Definition XML schema.  We will create following elements for the MapGuide LayerDefinition XML schema.
     35|| Type || ******* Annotation ******* ||
     36|| TinLayerDefinitionType || A layer for tin data. ||
     37|| TinScaleRangeType || The stylization for a specified scale range. ||
     38|| TinColorRuleType || Encapsulate a style for a tin source. ||
     39|| TinFaceType || Style rule for a face type. ||
     40|| TinHillShadeType || Specifies how to shade given a band and a light source. ||
    3541
    36 ==Layer Definition Schema Modifications==[[BR]]
     42 
     43* BaseLayerDefinitionType is an existing common type for all layer types.
     44* FeatureName, Geometry and Filter are the same as in Vector/Grid layer.
     45* The type for TinScaleRange is TinScaleRangeType.
     46  * MinScale and MaxScale elements are used to control the scale range.
     47  * Elevation element includes two elevation related factors:
     48    *ZeroValue element is the user defined zero value, Defaults to 0 if not specified.
     49    *ScaleFactor element determines how to scale the  elevation.  Defaults to 1.
     50  * The element type that specifies the style of Point and Edge in the layer definition schema is CompositeTypeStyle which already exists in schema, see [wiki:MapGuideRfc14 MapGuide RFC 14] for details.
     51  * The element type of Face is TinFaceType, see details as follow.
     52 
     53* HillShade element contains Azimuth and Altitude of the sun.
     54* TinColorRuleType likes GridColorRuleType of gird layer.
     55We can stylize surface by elevation, slope and aspect.
    3756
    38 TinLayerDefinitionType element was added in Layer Definition XML schema.
     57==Example: ==
     58[[BR]]Here is a TIN surface:
     59 
     60All points and triangles in the surface would be like this:
     61[[BR]] The XML snippet is would be:
    3962{{{
    40         <xs:annotation>
    41                 <xs:documentation>******************** Tin layer ********************</xs:documentation>
    42         </xs:annotation>
    43         <xs:complexType name="TinLayerDefinitionType">
    44                 <xs:annotation>
    45                         <xs:documentation>A layer for tin data.</xs:documentation>
    46                 </xs:annotation>
    47                 <xs:complexContent>
    48                         <xs:extension base="BaseLayerDefinitionType">
    49                                 <xs:sequence>
    50                                         <xs:element name="FeatureName" type="xs:string"/>
    51                                         <xs:element name="Geometry" type="xs:string">
    52                                                 <xs:annotation>
    53                                                         <xs:documentation>Specifies the geometry property that should be used to get the geometries.</xs:documentation>
    54                                                 </xs:annotation>
    55                                         </xs:element>
    56                                         <xs:element name="Filter" type="xs:string" minOccurs="0">
    57                                                 <xs:annotation>
    58                                                         <xs:documentation>A boolean FDO expression that specifies which features to return.  No filter means pass all features through.</xs:documentation>
    59                                                 </xs:annotation>
    60                                         </xs:element>
    61                                         <xs:element name="TinScaleRange" type="TinScaleRangeType" maxOccurs="unbounded"/>
    62                                         <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
    63                                 </xs:sequence>
    64                         </xs:extension>
    65                 </xs:complexContent>
    66         </xs:complexType>
    67         <xs:complexType name="TinScaleRangeType">
    68                 <xs:annotation>
    69                         <xs:documentation>The stylization for a specified scale range.</xs:documentation>
    70                 </xs:annotation>
    71                 <xs:sequence>
    72                         <xs:element name="MinScale" type="xs:double" minOccurs="0">
    73                                 <xs:annotation>
    74                                         <xs:documentation>The zoomed in part of the scale range.  Defaults to 0 if not specified.  Inclusive.</xs:documentation>
    75                                 </xs:annotation>
    76                         </xs:element>
    77                         <xs:element name="MaxScale" type="xs:double" minOccurs="0">
    78                                 <xs:annotation>
    79                                         <xs:documentation>The zoomed out part of the scale range.  Defaults to the application's maximum value if not specified.  Exclusive.</xs:documentation>
    80                                 </xs:annotation>
    81                         </xs:element>
    82                         <xs:element name="Elevation" minOccurs="0">
    83                                 <xs:annotation>
    84                                         <xs:documentation>The elevation information of tin surface.</xs:documentation>
    85                                 </xs:annotation>
    86                                 <xs:complexType>
    87                                         <xs:sequence>
    88                                                 <xs:element name="ZeroValue" type="xs:double" minOccurs="0">
    89                                                         <xs:annotation>
    90                                                                 <xs:documentation>The user defined zero value. Defaults to 0 if not specified. </xs:documentation>
    91                                                         </xs:annotation>
    92                                                 </xs:element>
    93                                                 <xs:element name="ScaleFactor" type="xs:double" minOccurs="0">
    94                                                         <xs:annotation>
    95                                                                 <xs:documentation>Determines how to scale the  elevation.  Defaults to 1 if not specified.</xs:documentation>
    96                                                         </xs:annotation>
    97                                                 </xs:element>
    98                                         </xs:sequence>
    99                                 </xs:complexType>
    100                         </xs:element>
    101                         <xs:element name="Point" type="CompositeTypeStyle" minOccurs="0">
    102                                 <xs:annotation>
    103                                         <xs:documentation>All points in tin surface.</xs:documentation>
    104                                 </xs:annotation>
    105                         </xs:element>
    106                         <xs:element name="Edge" type="CompositeTypeStyle" minOccurs="0">
    107                                 <xs:annotation>
    108                                         <xs:documentation>All edges in tin surface.</xs:documentation>
    109                                 </xs:annotation>
    110                         </xs:element>
    111                         <xs:element name="Face" type="TinFaceType" minOccurs="0">
    112                                 <xs:annotation>
    113                                         <xs:documentation>All triangles faces in tin surface.</xs:documentation>
    114                                 </xs:annotation>
    115                         </xs:element>
    116                         <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
    117                 </xs:sequence>
    118         </xs:complexType>
    119         <xs:complexType name="TinColorRuleType">
    120                 <xs:annotation>
    121                         <xs:documentation>Encapsulate a style for a tin source.</xs:documentation>
    122                 </xs:annotation>
    123                 <xs:sequence>
    124                         <xs:element name="LegendLabel" type="xs:string">
    125                                 <xs:annotation>
    126                                         <xs:documentation>The label for the Rule to be displayed in the legend.</xs:documentation>
    127                                 </xs:annotation>
    128                         </xs:element>
    129                         <xs:element name="Filter" type="xs:string" minOccurs="0">
    130                                 <xs:annotation>
    131                                         <xs:documentation>A filter for the Rule.  This is a boolean FDO expression.  Any features that pass this filter are styled using this rule's stylization.</xs:documentation>
    132                                 </xs:annotation>
    133                         </xs:element>
    134                         <xs:element name="Label" type="TextSymbolType" minOccurs="0">
    135                                 <xs:annotation>
    136                                         <xs:documentation>A label for the Rule.  Does not apply to tin ColorRule.</xs:documentation>
    137                                 </xs:annotation>
    138                         </xs:element>
    139                         <xs:element name="Color" type="xs:string">
    140                                 <xs:annotation>
    141                                         <xs:documentation>The color to use.</xs:documentation>
    142                                 </xs:annotation>
    143                         </xs:element>
    144                         <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
    145                 </xs:sequence>
    146         </xs:complexType>
    147         <xs:complexType name="TinFaceType">
    148                 <xs:annotation>
    149                         <xs:documentation>Style rule for a face type.</xs:documentation>
    150                 </xs:annotation>
    151                 <xs:sequence minOccurs="0">
    152                         <xs:element name="HillShade" type="TinHillShadeType" minOccurs="0"/>
    153                         <xs:element name="ColorRule" type="TinColorRuleType" minOccurs="0" maxOccurs="unbounded"/>
    154                         <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
    155                 </xs:sequence>
    156         </xs:complexType>
    157         <xs:complexType name="TinHillShadeType">
    158                 <xs:annotation>
    159                         <xs:documentation>Specifies how to shade given a band and a light source.</xs:documentation>
    160                 </xs:annotation>
    161                 <xs:sequence>
    162                         <xs:element name="Azimuth" type="xs:double">
    163                                 <xs:annotation>
    164                                         <xs:documentation>Azimuth of the sun in degrees.</xs:documentation>
    165                                 </xs:annotation>
    166                         </xs:element>
    167                         <xs:element name="Altitude" type="xs:double">
    168                                 <xs:annotation>
    169                                         <xs:documentation>Altitude of the sun in degrees.</xs:documentation>
    170                                 </xs:annotation>
    171                         </xs:element>
    172                         <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
    173                 </xs:sequence>
    174         </xs:complexType>
     63<TinLayerDefinition>
     64  <ResourceId>fsd://Tin_1</ResourceId>
     65  <FeatureName>tin: Surface</FeatureName>
     66  <Geometry>Tin</Geometry>
     67  <TinScaleRange>
     68    <MaxScale>10000</MaxScale>
     69<Elevation>
     70  <ZeroValue>100</ZeroValue>
     71  <ScaleFactor>1.5</ScaleFactor>
     72</Elevation>
     73    <Point>
     74      <CompositeTypeStyle >...</CompositeTypeStyle >
     75      <ShowInLegend>true</ShowInLegend>
     76    </Point>
     77    <Edge>
     78      <CompositeTypeStyle >...</CompositeTypeStyle >
     79      <ShowInLegend> true </ShowInLegend>
     80    </Edge>
     81    <Face>
     82      <HillShade>
     83        <Azimuth>45</Azimuth>
     84        <Altitude>45</Altitude>
     85      </HillShade>
     86      <ColorRule>
     87        <LegendLabel>-1.79e+308 to 1.79e+308</LegendLabel>
     88        <Filter>(Height(1) &gt; -1.7976931348623158e+308) AND (Height(1) &lt; 1.7976931348623158e+308)</Filter>
     89        <!-- or it could be:
     90        <Filter>(Aspect(1) &gt; 0) AND (Aspect(1) &lt; 20)</Filter>
     91        or:
     92        <Filter>(Slope(1) &gt; 0) AND (Slope(1) &lt; 20)</Filter>
     93        -->
     94        <Color>
     95          <ExplicitColor>FF00FF00</ExplicitColor>
     96        </Color>
     97      </ColorRule>
     98      <ColorRule>
     99        <LegendLabel>{DEFAULT}</LegendLabel>
     100        <Color>
     101          <ExplicitColor>FF006423</ExplicitColor>
     102        </Color>
     103      </ColorRule>
     104    </Face>
     105  </TinScaleRange>
     106  <TinScaleRange>
     107    ...
     108  </TinScaleRange>
     109  ...
     110</TinLayerDefinition>
    175111}}}
    176 ==== Example ===
    177 
    178 == FDO Provider Modifications ==[[BR]]
    179 
    180 TIN FDO Provider will be added to connect to TIN files.
    181112== Implications ==
    182113The new TIN layer definition will have an impact on the LayerDefinition XML schema. Backwards compatibility should be maintained and will not break any existing applications. That is to say, applications with later version can completely open files created by applications with former version, while applications with former version should ignore TIN layer when opening file created by applications with later version.  Documentation will need to be updated for the new functionality.
    183 In future, FDO Provider will be changed to support TIN connection.
    184114== Test Plan ==
    185 Unit tests should include creating TIN layers, stylizing TIN layers and TIN FDO Provider.
    186 Backward compatibility should be tested. Files created by new application should not break existing applications.
     115* Unit tests should include creating TIN layers.
     116* Backward compatibility should be tested. Files created by new application should not break existing applications.
    187117== Funding/Resources ==
    188118Autodesk to provide resources/funding.