Nyall Dawson b23eb1d250 [feature] New function "load_layer"
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)
2023-01-09 14:35:50 +10:00

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"]
}