QGIS API Documentation 3.38.0-Grenoble (exported)
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
QgsRasterLayer::LayerOptions Struct Reference

Setting options for loading raster layers. More...

#include <qgsrasterlayer.h>

Public Member Functions

 LayerOptions (bool loadDefaultStyle=true, const QgsCoordinateTransformContext &transformContext=QgsCoordinateTransformContext())
 Constructor for LayerOptions.
 

Public Attributes

bool loadDefaultStyle = true
 Sets to true if the default layer style should be loaded.
 
bool skipCrsValidation = false
 Controls whether the layer is allowed to have an invalid/unknown CRS.
 
QgsCoordinateTransformContext transformContext = QgsCoordinateTransformContext()
 Coordinate transform context.
 

Detailed Description

Setting options for loading raster layers.

Definition at line 113 of file qgsrasterlayer.h.

Constructor & Destructor Documentation

◆ LayerOptions()

QgsRasterLayer::LayerOptions::LayerOptions ( bool  loadDefaultStyle = true,
const QgsCoordinateTransformContext transformContext = QgsCoordinateTransformContext() 
)
inlineexplicit

Constructor for LayerOptions.

Definition at line 119 of file qgsrasterlayer.h.

Member Data Documentation

◆ loadDefaultStyle

bool QgsRasterLayer::LayerOptions::loadDefaultStyle = true

Sets to true if the default layer style should be loaded.

Definition at line 126 of file qgsrasterlayer.h.

◆ skipCrsValidation

bool QgsRasterLayer::LayerOptions::skipCrsValidation = false

Controls whether the layer is allowed to have an invalid/unknown CRS.

If true, then no validation will be performed on the layer's CRS and the layer layer's crs() may be invalid() (i.e. the layer will have no georeferencing available and will be treated as having purely numerical coordinates).

If false (the default), the layer's CRS will be validated using QgsCoordinateReferenceSystem::validate(), which may cause a blocking, user-facing dialog asking users to manually select the correct CRS for the layer.

Since
QGIS 3.10

Definition at line 147 of file qgsrasterlayer.h.

◆ transformContext

QgsCoordinateTransformContext QgsRasterLayer::LayerOptions::transformContext = QgsCoordinateTransformContext()

Coordinate transform context.

Since
QGIS 3.8

Definition at line 132 of file qgsrasterlayer.h.


The documentation for this struct was generated from the following file: