QGIS API Documentation 3.99.0-Master (2fe06baccd8)
Loading...
Searching...
No Matches
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
24#include "qgsrectangle.h"
25
29class QgsProject;
30
39{
40 public:
42 QString id;
43
45 QString name;
46
49
51 QMap<QString, QgsRectangle> crsExtents;
52
54 QStringList styles;
55
57 QString legendUrl;
58
61
63 bool queryable = false;
64
67
69 double maxScale = -1.0;
70
72 double minScale = -1.0;
73
76
77 public:
92 static QMap<QString, QgsWmsLayerInfos> buildWmsLayerInfos(
93 QgsServerInterface *serverIface,
94 const QgsProject *project,
95 const QList<QgsCoordinateReferenceSystem> &outputCrsList
96 );
97
110 static QMap<QString, QgsRectangle> transformExtentToCrsList(
111 const QgsRectangle &extent,
112 const QgsCoordinateReferenceSystem &source,
113 const QList<QgsCoordinateReferenceSystem> &destinations,
114 const QgsCoordinateTransformContext &context
115 );
116
131 const QgsRectangle &extent,
132 const QgsCoordinateReferenceSystem &source,
133 const QgsCoordinateReferenceSystem &destination,
134 const QgsCoordinateTransformContext &context,
135 const bool &ballparkTransformsAreAppropriate = false
136 );
137
138}; // class QgsWmsLayerInfos
139
140#endif
LayerType
Types of layers that can be added to a map.
Definition qgis.h:190
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:109
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).