QGIS API Documentation
4.3.0-Master (1c7cf7431bd)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
server
services
wms
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 "
qgsmaplayerserverproperties.h
"
24
#include "
qgsrectangle.h
"
25
26
class
QgsCoordinateReferenceSystem
;
27
class
QgsCoordinateTransformContext
;
28
class
QgsServerInterface
;
29
class
QgsProject
;
30
38
class
QgsWmsLayerInfos
39
{
40
public
:
42
QString
id
;
43
45
QString
name
;
46
48
QgsRectangle
wgs84BoundingRect
;
49
51
QMap<QString, QgsRectangle>
crsExtents
;
52
54
QStringList
styles
;
55
57
QString
legendUrl
;
58
60
QString
legendUrlFormat
;
61
63
bool
queryable
=
false
;
64
66
bool
hasScaleBasedVisibility
=
false
;
67
69
double
maxScale
= -1.0;
70
72
double
minScale
= -1.0;
73
75
Qgis::LayerType
type
;
76
77
public
:
92
static
QMap<QString, QgsWmsLayerInfos>
buildWmsLayerInfos
(
QgsServerInterface
*serverIface,
const
QgsProject
*project,
const
QList<QgsCoordinateReferenceSystem> &outputCrsList );
93
107
static
QMap<QString, QgsWmsLayerInfos>
buildWmsLayerInfos
(
QgsServerInterface
*serverIface,
const
QgsProject
*project );
108
121
static
QMap<QString, QgsRectangle>
transformExtentToCrsList
(
122
const
QgsRectangle
&extent,
const
QgsCoordinateReferenceSystem
&source,
const
QList<QgsCoordinateReferenceSystem> &destinations,
const
QgsCoordinateTransformContext
&context
123
);
124
138
static
QgsRectangle
transformExtent
(
139
const
QgsRectangle
&extent,
140
const
QgsCoordinateReferenceSystem
&source,
141
const
QgsCoordinateReferenceSystem
&destination,
142
const
QgsCoordinateTransformContext
&context,
143
const
bool
&ballparkTransformsAreAppropriate =
false
144
);
145
146
};
// class QgsWmsLayerInfos
147
148
#endif
Qgis::LayerType
LayerType
Types of layers that can be added to a map.
Definition
qgis.h:206
QgsCoordinateReferenceSystem
Represents a coordinate reference system (CRS).
Definition
qgscoordinatereferencesystem.h:216
QgsCoordinateTransformContext
Contains information about the context in which a coordinate transform is executed.
Definition
qgscoordinatetransformcontext.h:61
QgsProject
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
Definition
qgsproject.h:114
QgsRectangle
A rectangle specified with double values.
Definition
qgsrectangle.h:47
QgsServerInterface
Defines interfaces exposed by QGIS Server and made available to plugins.
Definition
qgsserverinterface.h:61
QgsWmsLayerInfos
WMS Layer infos.
Definition
qgswmslayerinfos.h:39
QgsWmsLayerInfos::legendUrlFormat
QString legendUrlFormat
WMS layer legend URL format.
Definition
qgswmslayerinfos.h:60
QgsWmsLayerInfos::styles
QStringList styles
WMS layer styles.
Definition
qgswmslayerinfos.h:54
QgsWmsLayerInfos::legendUrl
QString legendUrl
WMS layer legend URL.
Definition
qgswmslayerinfos.h:57
QgsWmsLayerInfos::id
QString id
QGIS layer id.
Definition
qgswmslayerinfos.h:42
QgsWmsLayerInfos::transformExtent
static QgsRectangle transformExtent(const QgsRectangle &extent, const QgsCoordinateReferenceSystem &source, const QgsCoordinateReferenceSystem &destination, const QgsCoordinateTransformContext &context, const bool &ballparkTransformsAreAppropriate=false)
Returns a transformed extent.
Definition
qgswmslayerinfos.cpp:37
QgsWmsLayerInfos::maxScale
double maxScale
WMS layer maximum scale (if negative, no maximum scale is defined).
Definition
qgswmslayerinfos.h:69
QgsWmsLayerInfos::crsExtents
QMap< QString, QgsRectangle > crsExtents
WMS layer CRS extents (can be empty).
Definition
qgswmslayerinfos.h:51
QgsWmsLayerInfos::transformExtentToCrsList
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.
Definition
qgswmslayerinfos.cpp:47
QgsWmsLayerInfos::type
Qgis::LayerType type
QGIS layer type.
Definition
qgswmslayerinfos.h:75
QgsWmsLayerInfos::name
QString name
WMS layer name.
Definition
qgswmslayerinfos.h:45
QgsWmsLayerInfos::buildWmsLayerInfos
static QMap< QString, QgsWmsLayerInfos > buildWmsLayerInfos(QgsServerInterface *serverIface, const QgsProject *project, const QList< QgsCoordinateReferenceSystem > &outputCrsList)
Returns the WMS layers definition to build WMS capabilities.
Definition
qgswmslayerinfos.cpp:143
QgsWmsLayerInfos::hasScaleBasedVisibility
bool hasScaleBasedVisibility
WMS layer has scale based visibility.
Definition
qgswmslayerinfos.h:66
QgsWmsLayerInfos::minScale
double minScale
WMS layer minimum scale (if negative, no maximum scale is defined).
Definition
qgswmslayerinfos.h:72
QgsWmsLayerInfos::queryable
bool queryable
WMS layer is queryable.
Definition
qgswmslayerinfos.h:63
QgsWmsLayerInfos::wgs84BoundingRect
QgsRectangle wgs84BoundingRect
WMS layer WGS84 bounding rectangle (can be empty).
Definition
qgswmslayerinfos.h:48
qgsmaplayerserverproperties.h
qgsrectangle.h
Generated on
for QGIS API Documentation by
1.17.0