mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-23 00:02:38 -05:00
This function (available only in Processing expressions for now), allows loading a map layer via a source string and provider name. It is designed to allow use of the expression functions which directly reference map layers (such as the aggregate functions) with a hardcoded layer path, eg. then permitting these functions to be used outside of a project (such as via the qgis_process tool)
20 lines
568 B
Plaintext
20 lines
568 B
Plaintext
{
|
|
"name": "load_layer",
|
|
"type": "function",
|
|
"groups": ["Map Layers"],
|
|
"description": "Loads a layer by source URI and provider name.",
|
|
"arguments": [{
|
|
"arg": "uri",
|
|
"description": "layer source URI string"
|
|
},
|
|
{
|
|
"arg": "provider",
|
|
"description": "layer data provider name"
|
|
}],
|
|
"examples": [{
|
|
"expression": "layer_property(load_layer('c:/data/roads.shp', 'ogr'), 'feature_count')",
|
|
"returns": "count of features from the c:/data/roads.shp vector layer"
|
|
}],
|
|
"tags": ["layer", "vector", "raster", "mesh", "point", "cloud"]
|
|
}
|