QGIS API Documentation  3.4.15-Madeira (e83d02e274)
qgswmsutils.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgswms.h
3 
4  Define WMS service utility functions
5  ------------------------------------
6  begin : December 20 , 2016
7  copyright : (C) 2007 by Marco Hugentobler ( parts from qgswmshandler)
8  (C) 2014 by Alessandro Pasotti ( parts from qgswmshandler)
9  (C) 2016 by David Marteau
10  email : marco dot hugentobler at karto dot baug dot ethz dot ch
11  a dot pasotti at itopen dot it
12  david dot marteau at 3liz dot com
13  ***************************************************************************/
14 
15 /***************************************************************************
16  * *
17  * This program is free software; you can redistribute it and/or modify *
18  * it under the terms of the GNU General Public License as published by *
19  * the Free Software Foundation; either version 2 of the License, or *
20  * (at your option) any later version. *
21  * *
22  ***************************************************************************/
23 #ifndef QGSWMSUTILS_H
24 #define QGSWMSUTILS_H
25 
26 #include "qgsmodule.h"
27 #include "qgswmsserviceexception.h"
28 
29 class QgsRectangle;
30 
36 namespace QgsWms
38 {
41  {
43  PNG,
48  };
49 
53  QString ImplementationVersion();
54 
58  QUrl serviceUrl( const QgsServerRequest &request, const QgsProject *project );
59 
64  ImageOutputFormat parseImageFormat( const QString &format );
65 
69  void writeImage( QgsServerResponse &response, QImage &img, const QString &formatStr,
70  int imageQuality = -1 );
71 
79  QgsRectangle parseBbox( const QString &bboxstr );
80 
84  void readLayersAndStyles( const QgsServerRequest::Parameters &parameters, QStringList &layersList, QStringList &stylesList );
85 
86 } // namespace QgsWms
87 
88 #endif
89 
90 
A rectangle specified with double values.
Definition: qgsrectangle.h:40
void writeImage(QgsServerResponse &response, QImage &img, const QString &formatStr, int imageQuality)
Write image response.
QgsRectangle parseBbox(const QString &bboxStr)
Parse bbox parameter.
QString ImplementationVersion()
Returns the highest version supported by this implementation.
Definition: qgswmsutils.cpp:32
Reads and writes project states.
Definition: qgsproject.h:89
void readLayersAndStyles(const QgsServerRequest::Parameters &parameters, QStringList &layersList, QStringList &stylesList)
Reads the layers and style lists from the parameters LAYERS and STYLES.
Median cut implementation.
QgsServerRequest Class defining request interface passed to services QgsService::executeRequest() met...
QUrl serviceUrl(const QgsServerRequest &request, const QgsProject *project)
Returns WMS service URL.
Definition: qgswmsutils.cpp:37
ImageOutputFormat
Supported image output format.
Definition: qgswmsutils.h:40
QgsServerResponse Class defining response interface passed to services QgsService::executeRequest() m...
ImageOutputFormat parseImageFormat(const QString &format)
Parse image format parameter.
Definition: qgswmsutils.cpp:75
QMap< QString, QString > Parameters