QGIS API Documentation 3.32.0-Lima (311a8cb8a6)
qgswmslayerinfos.h
Go to the documentation of this file.
1/***************************************************************************
2 qgswmslayerinfos.h
3
4 Layer's information
5 ------------------------------------
6 begin : September 26 , 2022
7 copyright : (C) 2022 by René-Luc D'Hont and David Marteau
8 email : rldhont at 3liz doc com
9 dmarteau at 3liz dot com
10 ***************************************************************************/
11
12/***************************************************************************
13 * *
14 * This program is free software; you can redistribute it and/or modify *
15 * it under the terms of the GNU General Public License as published by *
16 * the Free Software Foundation; either version 2 of the License, or *
17 * (at your option) any later version. *
18 * *
19 ***************************************************************************/
20#ifndef QGSWMSLAYERINFOS_H
21#define QGSWMSLAYERINFOS_H
22
23#include "qgsrectangle.h"
25
27class QgsProject;
28
37{
38 public:
40 QString id;
41
43 QString name;
44
46 QString title;
47
49 QString abstract;
50
52 QStringList keywords;
53
56
58 QMap<QString, QgsRectangle> crsExtents;
59
61 QStringList styles;
62
64 QString legendUrl;
65
68
70 bool queryable = false;
71
74
76 double maxScale = -1.0;
77
79 double minScale = -1.0;
80
82 QString dataUrl;
83
85 QString attribution;
86
89
91 QList<QgsMapLayerServerProperties::MetadataUrl> metadataUrls;
92
95
96 public:
97
112 static QMap< QString, QgsWmsLayerInfos > buildWmsLayerInfos(
113 QgsServerInterface *serverIface,
114 const QgsProject *project,
115 const QList<QgsCoordinateReferenceSystem> &outputCrsList );
116
129 static QMap< QString, QgsRectangle > transformExtentToCrsList(
130 const QgsRectangle &extent,
131 const QgsCoordinateReferenceSystem &source,
132 const QList<QgsCoordinateReferenceSystem> &destinations,
133 const QgsCoordinateTransformContext &context );
134
149 const QgsRectangle &extent,
150 const QgsCoordinateReferenceSystem &source,
151 const QgsCoordinateReferenceSystem &destination,
152 const QgsCoordinateTransformContext &context,
153 const bool &ballparkTransformsAreAppropriate = false );
154
155}; // class QgsWmsLayerInfos
156
157#endif
LayerType
Types of layers that can be added to a map.
Definition: qgis.h:114
This class represents a coordinate reference system (CRS).
Contains information about the context in which a coordinate transform is executed.
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
Definition: qgsproject.h:107
A rectangle specified with double values.
Definition: qgsrectangle.h:42
QgsServerInterface Class defining interfaces exposed by QGIS Server and made available to plugins.
WMS Layer infos.
QString legendUrlFormat
WMS layer legend URL format.
QString title
WMS layer title.
QStringList styles
WMS layer styles.
QStringList keywords
WMS layer keywords.
QString legendUrl
WMS layer legend URL.
QString id
QGIS layer id.
QString abstract
WMS layer abstract.
static QgsRectangle transformExtent(const QgsRectangle &extent, const QgsCoordinateReferenceSystem &source, const QgsCoordinateReferenceSystem &destination, const QgsCoordinateTransformContext &context, const bool &ballparkTransformsAreAppropriate=false)
Returns a transformed extent.
QString attribution
WMS layer attribution.
QString dataUrl
WMS layer dataUrl.
double maxScale
WMS layer maximum scale (if negative, no maximum scale is defined)
QMap< QString, QgsRectangle > crsExtents
WMS layer CRS extents (can be empty)
QString attributionUrl
WMS layer attribution URL.
static QMap< QString, QgsRectangle > transformExtentToCrsList(const QgsRectangle &extent, const QgsCoordinateReferenceSystem &source, const QList< QgsCoordinateReferenceSystem > &destinations, const QgsCoordinateTransformContext &context)
Returns a map with CRS authid as key and the transformed extent as value.
Qgis::LayerType type
QGIS layer type.
QString name
WMS layer name.
static QMap< QString, QgsWmsLayerInfos > buildWmsLayerInfos(QgsServerInterface *serverIface, const QgsProject *project, const QList< QgsCoordinateReferenceSystem > &outputCrsList)
Returns the WMS layers definition to build WMS capabilities.
QList< QgsMapLayerServerProperties::MetadataUrl > metadataUrls
WMS layer metadata URLs.
bool hasScaleBasedVisibility
WMS layer has scale based visibility.
double minScale
WMS layer minimum scale (if negative, no maximum scale is defined)
bool queryable
WMS layer is queryable.
QgsRectangle wgs84BoundingRect
WMS layer WGS84 bounding rectangle (can be empty)