20 #ifndef QGSWMSRENDERER_H 21 #define QGSWMSRENDERER_H 26 #include <QDomDocument> 35 class QgsConfigParser;
90 typedef QHash<QgsVectorLayer *, SymbolSet>
HitTest;
96 QImage *
getMap( HitTest *hitTest =
nullptr );
114 QByteArray
getPrint(
const QString &formatString );
125 void initRestrictedLayers();
128 QList<QgsMapLayer *> highlightLayers( QList<QgsWmsParametersHighlightLayer> params );
131 void initNicknameLayers();
133 void initLayerGroupsRecursive(
const QgsLayerTreeGroup *group,
const QString &groupName );
137 QString layerNickname(
const QgsMapLayer &layer )
const;
141 bool layerScaleVisibility(
const QgsMapLayer &layer,
double scaleDenominator )
const;
144 void removeUnwantedLayers( QList<QgsMapLayer *> &layers,
double scaleDenominator = -1 )
const;
147 void removeNonIdentifiableLayers( QList<QgsMapLayer *> &layers )
const;
150 QPainter *layersRendering(
const QgsMapSettings &mapSettings, QImage &image, HitTest *hitTest =
nullptr )
const;
153 void annotationsRendering( QPainter *painter )
const;
156 QList<QgsMapLayer *> stylizedLayers(
const QList<QgsWmsParametersLayer> ¶ms );
159 QList<QgsMapLayer *> sldStylizedLayers(
const QString &sld )
const;
162 void setLayerOpacity(
QgsMapLayer *layer,
int opacity )
const;
165 void setLayerFilter(
QgsMapLayer *layer,
const QList<QgsWmsParametersFilter> &filters );
168 void setLayerAccessControlFilter(
QgsMapLayer *layer )
const;
171 void setLayerSelection(
QgsMapLayer *layer,
const QStringList &fids )
const;
177 QImage *scaleImage(
const QImage *image )
const;
180 void checkLayerReadPermissions(
QgsMapLayer *layer )
const;
186 qreal dotsPerMm()
const;
196 QImage *createImage(
int width = -1,
int height = -1,
bool useBbox =
true )
const;
205 void configureMapSettings(
const QPaintDevice *paintDevice,
QgsMapSettings &mapSettings,
bool mandatoryCrsParam =
true )
const;
207 QDomDocument featureInfoDocument( QList<QgsMapLayer *> &layers,
const QgsMapSettings &mapSettings,
208 const QImage *outputImage,
const QString &version )
const;
228 QDomDocument &infoDocument,
229 QDomElement &layerElement,
232 const QString &version,
240 QDomDocument &infoDocument,
241 QDomElement &layerElement,
242 const QString &version )
const;
245 void runHitTest(
const QgsMapSettings &mapSettings, HitTest &hitTest )
const;
252 bool testFilterStringSafety(
const QString &filter )
const;
254 static void groupStringList( QStringList &list,
const QString &groupString );
259 bool checkMaximumWidthHeight()
const;
262 void convertFeatureInfoToSia2045( QDomDocument &doc )
const;
265 QByteArray convertFeatureInfoToHtml(
const QDomDocument &doc )
const;
268 QByteArray convertFeatureInfoToText(
const QDomDocument &doc )
const;
270 QDomElement createFeatureGML(
279 QStringList *attributes =
nullptr )
const;
282 static QString replaceValueMapAndRelation(
QgsVectorLayer *vl,
int idx,
const QVariant &attributeVal );
290 QgsMapLayer *createExternalWMSLayer(
const QString &externalLayerId )
const;
292 void removeTemporaryLayers();
312 #ifdef HAVE_SERVER_PYTHON_PLUGINS 320 QStringList mRestrictedLayers;
321 QMap<QString, QgsMapLayer *> mNicknameLayers;
322 QMap<QString, QList<QgsMapLayer *> > mLayerGroups;
323 QList<QgsMapLayer *> mTemporaryLayers;
324 QStringList flattenedQueryLayers()
const;
QByteArray getFeatureInfo(const QString &version="1.3.0")
Creates an xml document that describes the result of the getFeatureInfo request.
Layer tree group node serves as a container for layers and further groups.
A rectangle specified with double values.
Base class for all map layer types.
Abstract base class for all rendered symbols.
int getWMSPrecision() const
Returns the precision to use for GetFeatureInfo request.
This class provides qgis with the ability to render raster datasets onto the mapcanvas.
A class to represent a 2D point.
QgsRenderer(QgsServerInterface *serverIface, const QgsProject *project, QgsWmsParameters ¶meters)
Constructor.
A geometry is the spatial representation of a feature.
Provides a way to retrieve settings by prioritizing according to environment variables, ini file and default values.
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
const QgsCoordinateReferenceSystem & crs
The QgsMapSettings class contains configuration for rendering of the map.
As part of the API refactoring and improvements which landed in the Processing API was substantially reworked from the x version This was done in order to allow much of the underlying Processing framework to be ported into c
QImage * getMap(HitTest *hitTest=nullptr)
Returns the map as an image (or a null pointer in case of error).
The QgsLayerTreeModel class is model implementation for Qt item views framework.
QHash< QgsVectorLayer *, SymbolSet > HitTest
QByteArray getPrint(const QString &formatString)
Returns printed page as binary.
QgsDxfExport getDxf(const QMap< QString, QString > &options)
Returns the map as DXF data.
Namespace with helper functions for layer tree operations.
A feature filter provider allowing to set filter expressions on a per-layer basis.
Provides an interface to retrieve and manipulate WMS parameters received from the client...
QImage * getLegendGraphics()
Returns the map legend as an image (or a null pointer in case of error).
Reads and writes project states.
Median cut implementation.
A cache for capabilities xml documents (by configuration file path)
QSet< QString > SymbolSet
QgsServerInterface Class defining interfaces exposed by QGIS Server and made available to plugins...
Map renderer for WMS requests.
Contains information about the context of a rendering operation.
This class represents a coordinate reference system (CRS).
A helper class that centralizes restrictions given by all the access control filter plugins...
Print layout, a QgsLayout subclass for static or atlas-based layouts.
Represents a vector layer which manages a vector based data sets.
int getImageQuality() const
Returns the image quality to use for getMap request.
Raster renderer pipe that applies colors to a raster.