QGIS API Documentation 4.1.0-Master (5bf3c20f3c9)
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( QgsServerInterface *serverIface, const QgsProject *project, const QList<QgsCoordinateReferenceSystem> &outputCrsList );
93
106 static QMap<QString, QgsRectangle> transformExtentToCrsList(
107 const QgsRectangle &extent, const QgsCoordinateReferenceSystem &source, const QList<QgsCoordinateReferenceSystem> &destinations, const QgsCoordinateTransformContext &context
108 );
109
124 const QgsRectangle &extent,
125 const QgsCoordinateReferenceSystem &source,
126 const QgsCoordinateReferenceSystem &destination,
127 const QgsCoordinateTransformContext &context,
128 const bool &ballparkTransformsAreAppropriate = false
129 );
130
131}; // class QgsWmsLayerInfos
132
133#endif
LayerType
Types of layers that can be added to a map.
Definition qgis.h:206
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:113
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).