Changes between Version 14 and Version 15 of MapGuideRfc106


Ignore:
Timestamp:
04/07/11 02:22:16 (14 years ago)
Author:
liuar
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • MapGuideRfc106

    v14 v15  
    3232== Proposed Solution ==
    3333
    34 '''1) Enhance the !GetFeatureType operation to support mutiple GML formats'''[[BR]]
     34'''1) Enhance the !GetFeatureType operation to support namespacePrefix and namespaceUrl'''[[BR]]
    3535[[BR]]
    36 It's described in WFS 1.1.0 specification section 8.1 that the only mandatory output in response to a !DescribeFeatureType request is a GML3 application schema defined using XML Schema.  Because GML2 application schema is kept for backward compatibility, it is necessary for MapGuide to enhance the !HttpWfsGetFeatureType to handle different GML formats.
     36In order to pass the OGC certification, MapGuide should have the capability to support user-defnied namespacePrefix and namespaceUrl in the generated GML files.
    3737[[BR]][[BR]]
    3838
    39 A new !DescribeWfsFeature API should be added to handle the output GML format
     39A new !DescribeWfsFeature API should be added to handle namespacePrefix and namespaceUrl
    4040{{{
    4141    ////////////////////////////////////////////////////////////////////////////////////////////////////////
    4242    /// \brief
    43     /// Retrieves schema informationabout a set of feature classes for a given feature source  with specified format.
    44     ///
    45     /// \note1
     43    /// Retrieves schema informationabout a set of feature classes for a given feature source with specified namespace prefix and url.
    4644    ///
    4745    /// <!-- Syntax in .Net, Java, and PHP -->
    4846    /// \htmlinclude DotNetSyntaxTop.html
    49     /// virtual MgByteReader DescribeWfsFeatureType(MgResourceIdentifier featureSourceId, MgStringCollection featureClasses, string outputFormat);
     47    /// virtual MgByteReader DescribeWfsFeatureType(MgResourceIdentifier featureSourceId, MgStringCollection featureClasses, string namespacePrefix, string namespaceUrl);
    5048    /// \htmlinclude SyntaxBottom.html
    5149    /// \htmlinclude JavaSyntaxTop.html
    52     /// virtual MgByteReader DescribeWfsFeatureType(MgResourceIdentifier featureSourceId, MgStringCollection featureClasses, string outputFormat);
     50    /// virtual MgByteReader DescribeWfsFeatureType(MgResourceIdentifier featureSourceId, MgStringCollection featureClasses, string namespacePrefix, string namespaceUrl);
    5351    /// \htmlinclude SyntaxBottom.html
    5452    /// \htmlinclude PHPSyntaxTop.html
    55     /// virtual MgByteReader DescribeWfsFeatureType(MgResourceIdentifier featureSourceId, MgStringCollection featureClasse, string outputFormats);
     53    /// virtual MgByteReader DescribeWfsFeatureType(MgResourceIdentifier featureSourceId, MgStringCollection featureClasses, string namespacePrefix, string namespaceUrl);
    5654    /// \htmlinclude SyntaxBottom.html
    5755    ///
     
    6462    /// retrieve schema information. If this collection is null or empty, information
    6563    /// is returned for all feature classes.
    66     /// \param outputFormat (String/string)
    67     /// A string identifying the output format of
    68     /// the retrieved schema information.
    69     /// The supported values of output format are specified in OpenGIS Web Feature Service (WFS) Implementation Specification - section 8.2
    70     /// http://portal.opengeospatial.org/files/?artifact_id=8339
     64    /// \param namespacePrefix (String/string)
     65    /// A string identifying the namespace prefix in the output xml
     66    /// \param namespaceUrl (String/string)
     67    /// A string idenyifying the namespace url in the output xml
    7168    ///
    7269    /// \return
    7370    /// Returns an MgByteReader containing the XML schema.
    7471    ///
    75     virtual MgByteReader* DescribeWfsFeatureType(MgResourceIdentifier* featureSourceId, MgStringCollection* featureClasses, CREFSTRING outputFormat) = 0;
    76 
     72    virtual MgByteReader* DescribeWfsFeatureType(MgResourceIdentifier* featureSourceId,
     73                                                 MgStringCollection* featureClasses,
     74                                                 CREFSTRING namespacePrefix,
     75                                                 CREFSTRING namespaceUrl);
    7776}}}
    7877
    79 !HttpWfsGetFeatureType should be enhanced to obtain the output GML format and invoke the new API !DescribeWfsFeatureType with outputFormat parameter
     78!HttpWfsGetFeatureType should be enhanced to obtain namespace prefix and url, and invoke the new API !DescribeWfsFeatureType with these parameters
    8079
    8180{{{
     
    8382    {
    8483        ......
    85 
    86         // Determine required output format
    87         CPSZ pszOutputFormat = Wfs.RequestParameter(MgHttpResourceStrings::reqWfsOutputFormat.c_str());
    88         STRING sOutputFormat = pszOutputFormat? pszOutputFormat : _("");
    89 
    90         ......
    9184       
    92         Ptr<MgByteReader> response  = pFeatureService->DescribeWfsFeatureType(&idResource,pFeatureClasses,sOutputFormat);
     85        Ptr<MgByteReader> response  = pFeatureService->DescribeWfsFeatureType(&idResource,pFeatureClasses,sPrefix, sUrl);
    9386       
    9487        ......
     
    9891'''2) Enhance the !GetFeature operation to support mutiple GML formats'''[[BR]]
    9992[[BR]]
    100 In WFS 1.1.0 specification section 9.2:  ''The optional output format attribute specifies the format of the response to a !GetFeature request. The default value is text/xml;subtype=gml/3.1.1 indicating that a vald GML3 document, that validate s against a valid GML3 application schema, must be generated.  For backward compatibility, the value GML2 may be specified indicating that a valid GML2 document, that validates against a valid GML2 application schema, must be generated.'' So,it is necessary for MapGuide to enhance the !HttpWfsGetFeature to handle different GML formats.
     93In WFS 1.1.0 specification section 9.2:  ''The optional output format attribute specifies the format of the response to a !GetFeature request. The default value is text/xml;subtype=gml/3.1.1 indicating that a vald GML3 document, that validate s against a valid GML3 application schema, must be generated.  For backward compatibility, the value GML2 may be specified indicating that a valid GML2 document, that validates against a valid GML2 application schema, must be generated.'' So,it is necessary for MapGuide to enhance the !HttpWfsGetFeature to handle different GML formats. Same as !DescribeWfsFeatureType, namespacePrefix and namespaceUrl are also needed for OGC certification.
    10194[[BR]][[BR]]
    10295
    103 A new !DescribeWfsFeature API should be added to handle the output GML format
     96A new !GetWfsFeature API should be added to handle the output GML format
    10497
    10598{{{
    106     ////////////////////////////////////////////////////////////////////////////////////////////////////////
     99        ////////////////////////////////////////////////////////////////////////////////////////////////////////
    107100    /// \brief
    108101    /// Retrieves feature information based on the supplied criteria with specified format.
     
    112105    /// <!-- Syntax in .Net, Java, and PHP -->
    113106    /// \htmlinclude DotNetSyntaxTop.html
    114     /// virtual MgByteReader GetWfsFeature(MgResourceIdentifier featureSourceId, string featureClass, MgStringCollection requiredProperties, string srs, string filter, int maxFeatures, string outputFormat);
     107    /// virtual MgByteReader GetWfsFeature(MgResourceIdentifier featureSourceId, string featureClass, MgStringCollection requiredProperties, string srs, string filter, int maxFeatures, string wfsVersion, string outputFormat, string sortCriteria, string namespacePrefix, string namespaceUrl);
    115108    /// \htmlinclude SyntaxBottom.html
    116109    /// \htmlinclude JavaSyntaxTop.html
    117     /// virtual MgByteReader GetWfsFeature(MgResourceIdentifier featureSourceId, String featureClass, MgStringCollection requiredProperties, String srs, String filter, int maxFeatures, string outputFormat);
     110    /// virtual MgByteReader GetWfsFeature(MgResourceIdentifier featureSourceId, string featureClass, MgStringCollection requiredProperties, string srs, string filter, int maxFeatures, string wfsVersion, string outputFormat, string sortCriteria, string namespacePrefix, string namespaceUrl);
    118111    /// \htmlinclude SyntaxBottom.html
    119112    /// \htmlinclude PHPSyntaxTop.html
    120     /// virtual MgByteReader GetWfsFeature(MgResourceIdentifier featureSourceId, string featureClass, MgStringCollection requiredProperties, string srs, string filter, int maxFeatures, string outputFormat);
     113    /// virtual MgByteReader GetWfsFeature(MgResourceIdentifier featureSourceId, string featureClass, MgStringCollection requiredProperties, string srs, string filter, int maxFeatures, string wfsVersion, string outputFormat, string sortCriteria, string namespacePrefix, string namespaceUrl);
    121114    /// \htmlinclude SyntaxBottom.html
    122115    ///
     
    137130    /// The maximum number of features to retrieve. If the value is less
    138131    /// than or equal to zero, all features will be retrieved.
     132    /// \param wfsVersion (String/string)
     133    /// A string identifying the wfs version
    139134    /// \param outputFormat (String/string)
    140     /// A string identifying the output format of 
     135    /// A string identifying the output format of
    141136    /// the retrieved feature information.
    142137    /// The supported values of output format are specified in OpenGIS Web Feature Service (WFS) Implementation Specification - section 9.2
    143138    /// http://portal.opengeospatial.org/files/?artifact_id=8339
     139    /// \param sortCriteria (String/string)
     140    /// A string identifying the sort criteria
     141    /// \param namespacePrefix (String/string)
     142    /// A string identifying the namespace prefix in the output xml
     143    /// \param namespaceUrl (String/string)
     144    /// A string idenyifying the namespace url in the output xml
    144145    ///
    145146    /// \return
    146147    /// Returns an MgByteReader containing the requested feature information.
    147148    ///
    148     virtual MgByteReader* GetWfsFeature(MgResourceIdentifier* featureSourceId, CREFSTRING featureClass,MgStringCollection* requiredProperties, CREFSTRING srs, CREFSTRING filter, INT32 maxFeatures, CREFSTRING outputFormat) = 0;
     149    /// \exception MgInvalidArgumentException
     150    ///
     151    virtual MgByteReader* GetWfsFeature(MgResourceIdentifier* featureSourceId,
     152                                        CREFSTRING featureClass,
     153                                        MgStringCollection* requiredProperties,
     154                                        CREFSTRING srs,
     155                                        CREFSTRING filter,
     156                                        INT32 maxFeatures,
     157                                        CREFSTRING wfsVersion,
     158                                        CREFSTRING outputFormat,
     159                                        CREFSTRING sortCriteria,
     160                                        CREFSTRING namespacePrefix,
     161                                        CREFSTRING namespaceUrl) = 0;
    149162}}}
    150163
     
    155168    {
    156169        ......
    157 
    158         STRING sOutputFormat = m_getFeatureParams->GetOutputFormat();
    159 
    160         ......
    161170       
    162171       
    163         Ptr<MgByteReader> resultReader = featureService->GetWfsFeature(featureSourceId, ((sSchemaHash.size()==0) ? sClass : sSchemaHash + _(":") + sClass), requiredProperties, m_getFeatureParams->GetSrs(), filter, numFeaturesToRetrieve, sOutputFormat);
     172        Ptr<MgByteReader> resultReader = featureService->GetWfsFeature(featureSourceId, ((sSchemaHash.size()==0) ? sClass : sSchemaHash + _(":") + sClass),
     173                                requiredProperties, m_getFeatureParams->GetSrs(), filter, numFeaturesToRetrieve-1, sVersion, sOutputFormat, sSortCriteria, sPrefix, oFeatureTypes.GetNamespaceUrl());
    164174       
    165175        ......
     
    167177}}}
    168178[[BR]]
    169 '''3) Handle axis orientation for particular coordinate systems[[BR]]'''
    170 [[BR]]
    171 The same as WMS 1.3.0, WFS 1.1.0 also reversed the axis sequence for some EPSG code include EPSG:4326, which means for some EPSG SRS, the meaning of (x,y) is changed from (lon,lat) to (lat,lon) or even other orientations.
    172 
    173179
    174180== Implications ==