Changes between Version 14 and Version 15 of MapGuideRfc106
- Timestamp:
- 04/07/11 02:22:16 (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
MapGuideRfc106
v14 v15 32 32 == Proposed Solution == 33 33 34 '''1) Enhance the !GetFeatureType operation to support mutiple GML formats'''[[BR]]34 '''1) Enhance the !GetFeatureType operation to support namespacePrefix and namespaceUrl'''[[BR]] 35 35 [[BR]] 36 I t'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.36 In order to pass the OGC certification, MapGuide should have the capability to support user-defnied namespacePrefix and namespaceUrl in the generated GML files. 37 37 [[BR]][[BR]] 38 38 39 A new !DescribeWfsFeature API should be added to handle the output GML format39 A new !DescribeWfsFeature API should be added to handle namespacePrefix and namespaceUrl 40 40 {{{ 41 41 //////////////////////////////////////////////////////////////////////////////////////////////////////// 42 42 /// \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. 46 44 /// 47 45 /// <!-- Syntax in .Net, Java, and PHP --> 48 46 /// \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); 50 48 /// \htmlinclude SyntaxBottom.html 51 49 /// \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); 53 51 /// \htmlinclude SyntaxBottom.html 54 52 /// \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); 56 54 /// \htmlinclude SyntaxBottom.html 57 55 /// … … 64 62 /// retrieve schema information. If this collection is null or empty, information 65 63 /// 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 71 68 /// 72 69 /// \return 73 70 /// Returns an MgByteReader containing the XML schema. 74 71 /// 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); 77 76 }}} 78 77 79 !HttpWfsGetFeatureType should be enhanced to obtain the output GML format and invoke the new API !DescribeWfsFeatureType with outputFormat parameter78 !HttpWfsGetFeatureType should be enhanced to obtain namespace prefix and url, and invoke the new API !DescribeWfsFeatureType with these parameters 80 79 81 80 {{{ … … 83 82 { 84 83 ...... 85 86 // Determine required output format87 CPSZ pszOutputFormat = Wfs.RequestParameter(MgHttpResourceStrings::reqWfsOutputFormat.c_str());88 STRING sOutputFormat = pszOutputFormat? pszOutputFormat : _("");89 90 ......91 84 92 Ptr<MgByteReader> response = pFeatureService->DescribeWfsFeatureType(&idResource,pFeatureClasses,s OutputFormat);85 Ptr<MgByteReader> response = pFeatureService->DescribeWfsFeatureType(&idResource,pFeatureClasses,sPrefix, sUrl); 93 86 94 87 ...... … … 98 91 '''2) Enhance the !GetFeature operation to support mutiple GML formats'''[[BR]] 99 92 [[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. 93 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. Same as !DescribeWfsFeatureType, namespacePrefix and namespaceUrl are also needed for OGC certification. 101 94 [[BR]][[BR]] 102 95 103 A new ! DescribeWfsFeature API should be added to handle the output GML format96 A new !GetWfsFeature API should be added to handle the output GML format 104 97 105 98 {{{ 106 ////////////////////////////////////////////////////////////////////////////////////////////////////////99 //////////////////////////////////////////////////////////////////////////////////////////////////////// 107 100 /// \brief 108 101 /// Retrieves feature information based on the supplied criteria with specified format. … … 112 105 /// <!-- Syntax in .Net, Java, and PHP --> 113 106 /// \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); 115 108 /// \htmlinclude SyntaxBottom.html 116 109 /// \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); 118 111 /// \htmlinclude SyntaxBottom.html 119 112 /// \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); 121 114 /// \htmlinclude SyntaxBottom.html 122 115 /// … … 137 130 /// The maximum number of features to retrieve. If the value is less 138 131 /// than or equal to zero, all features will be retrieved. 132 /// \param wfsVersion (String/string) 133 /// A string identifying the wfs version 139 134 /// \param outputFormat (String/string) 140 /// A string identifying the output format of 135 /// A string identifying the output format of 141 136 /// the retrieved feature information. 142 137 /// The supported values of output format are specified in OpenGIS Web Feature Service (WFS) Implementation Specification - section 9.2 143 138 /// 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 144 145 /// 145 146 /// \return 146 147 /// Returns an MgByteReader containing the requested feature information. 147 148 /// 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; 149 162 }}} 150 163 … … 155 168 { 156 169 ...... 157 158 STRING sOutputFormat = m_getFeatureParams->GetOutputFormat();159 160 ......161 170 162 171 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()); 164 174 165 175 ...... … … 167 177 }}} 168 178 [[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 173 179 174 180 == Implications ==