36 #ifdef HAVE_SERVER_PYTHON_PLUGINS
40 const QDomDocument *describeDocument =
nullptr;
42 #ifdef HAVE_SERVER_PYTHON_PLUGINS
44 if ( cacheManager && cacheManager->
getCachedDocument( &doc, project, request, accessControl ) )
46 describeDocument = &doc;
56 describeDocument = &doc;
60 describeDocument = &doc;
62 response.
setHeader(
"Content-Type",
"text/xml; charset=utf-8" );
63 response.
write( describeDocument->toByteArray() );
76 #ifdef HAVE_SERVER_PYTHON_PLUGINS
83 QDomElement coveDescElement = doc.createElement( QStringLiteral(
"CoverageDescription" ) );
84 coveDescElement.setAttribute( QStringLiteral(
"xmlns" ),
WCS_NAMESPACE );
85 coveDescElement.setAttribute( QStringLiteral(
"xmlns:xsi" ), QStringLiteral(
"http://www.w3.org/2001/XMLSchema-instance" ) );
86 coveDescElement.setAttribute( QStringLiteral(
"xsi:schemaLocation" ),
WCS_NAMESPACE +
" http://schemas.opengis.net/wcs/1.0.0/describeCoverage.xsd" );
87 coveDescElement.setAttribute( QStringLiteral(
"xmlns:gml" ),
GML_NAMESPACE );
88 coveDescElement.setAttribute( QStringLiteral(
"xmlns:xlink" ), QStringLiteral(
"http://www.w3.org/1999/xlink" ) );
89 coveDescElement.setAttribute( QStringLiteral(
"version" ), QStringLiteral(
"1.0.0" ) );
90 coveDescElement.setAttribute( QStringLiteral(
"updateSequence" ), QStringLiteral(
"0" ) );
91 doc.appendChild( coveDescElement );
96 QMap<QString, QString>::const_iterator cove_name_it = parameters.constFind( QStringLiteral(
"COVERAGE" ) );
97 if ( cove_name_it != parameters.constEnd() )
99 coveNames = cove_name_it.value();
101 if ( coveNames.isEmpty() )
103 QMap<QString, QString>::const_iterator cove_name_it = parameters.constFind( QStringLiteral(
"IDENTIFIER" ) );
104 if ( cove_name_it != parameters.constEnd() )
106 coveNames = cove_name_it.value();
110 QStringList coveNameList;
111 if ( !coveNames.isEmpty() )
113 coveNameList = coveNames.split(
',' );
114 for (
int i = 0; i < coveNameList.size(); ++i )
116 coveNameList.replace( i, coveNameList.at( i ).trimmed() );
121 for (
int i = 0; i < wcsLayersId.size(); ++i )
132 #ifdef HAVE_SERVER_PYTHON_PLUGINS
138 QString name = layer->
name();
141 name = name.replace(
' ',
'_' );
143 if ( coveNameList.size() == 0 || coveNameList.contains( name ) )