Loading layers in QGIS involves two different steps, which are as follows:
- Load the layer. This step creates a variable with the layer information and related data.
- Register the layer in QGIS so that it can be used by other QGIS tools.
Loading a layer means loading a reference to the layer and its metadata. The layer is not necessarily loaded in memory, but is usually fetched only when data is accessed to be processed or visualized.
Loading and registering a layer are separate steps. A layer can be loaded, processed, and modified before it is visualized, or it can be loaded as temporary data for an algorithm. In this case, it's not necessary for the QGIS framework to be aware of the layer.
The iface object has shortcuts to load raster and vector layers in a single step instead of loading and registering them in separated steps.
Every layer type is...