37  const bool &ballparkTransformsAreAppropriate
 
   41  transformer.setBallparkTransformsAreAppropriate( ballparkTransformsAreAppropriate );
 
   43  return transformer.transformBoundingBox( extent );
 
 
   49  const QList<QgsCoordinateReferenceSystem> &destinations,
 
   62    crsExtents[destination.authid()] = crsTransform.transformBoundingBox( extent );
 
 
   74  const QList<QgsCoordinateReferenceSystem> &outputCrsList
 
   90      if ( ml->
crs() != project->
crs() )
 
 
  142  const QList<QgsCoordinateReferenceSystem> &outputCrsList
 
  145  QMap<QString, QgsWmsLayerInfos> wmsLayers;
 
  146#ifdef HAVE_SERVER_PYTHON_PLUGINS 
  149  ( void ) serverIface;
 
  159    if ( !ml || restrictedLayers.contains( ml->name() ) ) 
 
  164#ifdef HAVE_SERVER_PYTHON_PLUGINS 
  172    pLayer.
id = ml->id();
 
  177    bool hasExtent = 
true;
 
  188    if ( hasExtent && !
setBoundingRect( project, pLayer, ml, wmsExtent, wgs84, outputCrsList ) )
 
  192    pLayer.
type = ml->type();
 
  194    pLayer.
name = ml->name();
 
  197      pLayer.
name = ml->id();
 
  199    else if ( !ml->serverProperties()->shortName().isEmpty() )
 
  201      pLayer.
name = ml->serverProperties()->shortName();
 
  206    pLayer.
styles = ml->styleManager()->styles();
 
  208    pLayer.
legendUrl = ml->serverProperties()->legendUrl();
 
  212    if ( ml->hasScaleBasedVisibility() )
 
  215      pLayer.
maxScale = ml->maximumScale();
 
  216      pLayer.
minScale = ml->minimumScale();
 
  219    wmsLayers[pLayer.
id] = pLayer;
 
 
@ Warning
Warning message.
 
static QString geographicCrsAuthId()
Geographic coordinate system auth:id string for a default geographic CRS (EPSG:4326).
 
A helper class that centralizes restrictions given by all the access control filter plugins.
 
bool layerReadPermission(const QgsMapLayer *layer) const
Returns the layer read right.
 
Represents a coordinate reference system (CRS).
 
static QgsCoordinateReferenceSystem fromOgcWmsCrs(const QString &ogcCrs)
Creates a CRS from a given OGC WMS-format Coordinate Reference System string.
 
QgsRectangle bounds() const
Returns the approximate bounds for the region the CRS is usable within.
 
Contains information about the context in which a coordinate transform is executed.
 
Custom exception class for Coordinate Reference System related exceptions.
 
Base class for all map layer types.
 
QgsRectangle wgs84Extent(bool forceRecalculate=false) const
Returns the WGS84 extent (EPSG:4326) of the layer according to ReadFlag::FlagTrustLayerMetadata.
 
virtual QgsRectangle extent() const
Returns the extent of the layer.
 
QgsCoordinateReferenceSystem crs
 
@ Identifiable
If the layer is identifiable using the identify map tool and as a WMS layer.
 
static void logMessage(const QString &message, const QString &tag=QString(), Qgis::MessageLevel level=Qgis::MessageLevel::Warning, bool notifyUser=true, const char *file=__builtin_FILE(), const char *function=__builtin_FUNCTION(), int line=__builtin_LINE())
Adds a message to the log instance (and creates it if necessary).
 
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
 
QgsCoordinateTransformContext transformContext
 
QgsCoordinateReferenceSystem crs
 
QMap< QString, QgsMapLayer * > mapLayers(const bool validOnly=false) const
Returns a map of all registered layers by layer ID.
 
A rectangle specified with double values.
 
Defines interfaces exposed by QGIS Server and made available to plugins.
 
virtual QgsAccessControl * accessControls() const =0
Gets the registered access control filters.
 
static QgsRectangle wmsExtent(const QgsProject &project)
Returns the WMS Extent restriction.
 
static bool wmsUseLayerIds(const QgsProject &project)
Returns if layer ids are used as name in WMS.
 
static QStringList wmsRestrictedLayers(const QgsProject &project)
Returns the restricted layer name list.
 
Represents a vector layer which manages a vector based dataset.
 
Q_INVOKABLE Qgis::WkbType wkbType() const FINAL
Returns the WKBType or WKBUnknown in case of error.
 
QString legendUrlFormat
WMS layer legend URL format.
 
QStringList styles
WMS layer styles.
 
QString legendUrl
WMS layer legend URL.
 
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)
 
bool setBoundingRect(const QgsProject *project, QgsWmsLayerInfos &pLayer, QgsMapLayer *ml, const QgsRectangle &wmsExtent, const QgsCoordinateReferenceSystem &wgs84, const QList< QgsCoordinateReferenceSystem > &outputCrsList)