QGIS API Documentation 3.43.0-Master (c67cf405802)
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
47
49 QMap<QString, QgsRectangle> crsExtents;
50
52 QStringList styles;
53
55 QString legendUrl;
56
59
61 bool queryable = false;
62
65
67 double maxScale = -1.0;
68
70 double minScale = -1.0;
71
74
75 public:
90 static QMap<QString, QgsWmsLayerInfos> buildWmsLayerInfos(
91 QgsServerInterface *serverIface,
92 const QgsProject *project,
93 const QList<QgsCoordinateReferenceSystem> &outputCrsList
94 );
95
108 static QMap<QString, QgsRectangle> transformExtentToCrsList(
109 const QgsRectangle &extent,
110 const QgsCoordinateReferenceSystem &source,
111 const QList<QgsCoordinateReferenceSystem> &destinations,
112 const QgsCoordinateTransformContext &context
113 );
114
129 const QgsRectangle &extent,
130 const QgsCoordinateReferenceSystem &source,
131 const QgsCoordinateReferenceSystem &destination,
132 const QgsCoordinateTransformContext &context,
133 const bool &ballparkTransformsAreAppropriate = false
134 );
135
136}; // class QgsWmsLayerInfos
137
138#endif
LayerType
Types of layers that can be added to a map.
Definition qgis.h:169
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.
Defines interfaces exposed by QGIS Server and made available to plugins.
WMS Layer infos.
QString legendUrlFormat
WMS layer legend URL format.
QStringList styles
WMS layer styles.
QString legendUrl
WMS layer legend URL.
QString id
QGIS layer id.
static QgsRectangle transformExtent(const QgsRectangle &extent, const QgsCoordinateReferenceSystem &source, const QgsCoordinateReferenceSystem &destination, const QgsCoordinateTransformContext &context, const bool &ballparkTransformsAreAppropriate=false)
Returns a transformed extent.
double maxScale
WMS layer maximum scale (if negative, no maximum scale is defined)
QMap< QString, QgsRectangle > crsExtents
WMS layer CRS extents (can be empty)
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.
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)