mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-26 00:02:08 -05:00
[Server][WFS] Update DescribeFeatureType 1.1.0
This commit is contained in:
parent
c8a4407d7a
commit
d7a48c6a92
@ -22,6 +22,7 @@
|
||||
#include "qgswfsutils.h"
|
||||
#include "qgsserverprojectutils.h"
|
||||
#include "qgswfsdescribefeaturetype.h"
|
||||
#include "qgswfsparameters.h"
|
||||
|
||||
#include "qgsproject.h"
|
||||
#include "qgsexception.h"
|
||||
@ -53,6 +54,13 @@ namespace QgsWfs
|
||||
QDomDocument doc;
|
||||
|
||||
QgsServerRequest::Parameters parameters = request.parameters();
|
||||
QgsWfsParameters wfsParameters( parameters );
|
||||
QgsWfsParameters::Format oFormat = wfsParameters.outputFormat();
|
||||
|
||||
// test oFormat
|
||||
if ( oFormat == QgsWfsParameters::Format::NONE )
|
||||
throw QgsBadRequestException( QStringLiteral( "Invalid WFS Parameter" ),
|
||||
"OUTPUTFORMAT " + wfsParameters.outputFormatAsString() + "is not supported" );
|
||||
|
||||
QgsAccessControl *accessControl = serverIface->accessControls();
|
||||
|
||||
@ -71,7 +79,10 @@ namespace QgsWfs
|
||||
//xsd:import
|
||||
QDomElement importElement = doc.createElement( QStringLiteral( "import" )/*xsd:import*/ );
|
||||
importElement.setAttribute( QStringLiteral( "namespace" ), GML_NAMESPACE );
|
||||
importElement.setAttribute( QStringLiteral( "schemaLocation" ), QStringLiteral( "http://schemas.opengis.net/gml/2.1.2/feature.xsd" ) );
|
||||
if ( oFormat == QgsWfsParameters::Format::GML2 )
|
||||
importElement.setAttribute( QStringLiteral( "schemaLocation" ), QStringLiteral( "http://schemas.opengis.net/gml/2.1.2/feature.xsd" ) );
|
||||
else if ( oFormat == QgsWfsParameters::Format::GML3 )
|
||||
importElement.setAttribute( QStringLiteral( "schemaLocation" ), QStringLiteral( "http://schemas.opengis.net/gml/3.1.1/base/gml.xsd" ) );
|
||||
schemaElement.appendChild( importElement );
|
||||
|
||||
QStringList typeNameList;
|
||||
|
Loading…
x
Reference in New Issue
Block a user