mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-23 00:02:38 -05:00
25 lines
2.2 KiB
Plaintext
25 lines
2.2 KiB
Plaintext
{
|
|
"name": "layer_property",
|
|
"type": "function",
|
|
"groups": ["Map Layers"],
|
|
"description": "Returns a matching layer property or metadata value.",
|
|
"arguments": [{
|
|
"arg": "layer",
|
|
"description": "a string, representing either a layer name or layer ID"
|
|
}, {
|
|
"arg": "property",
|
|
"description": "a string corresponding to the property to return. Valid options are:<br /><ul><li>name: layer name</li><li>id: layer ID</li><li>title: metadata title string</li><li>abstract: metadata abstract string</li><li>keywords: metadata keywords</li><li>data_url: metadata URL</li><li>attribution: metadata attribution string</li><li>attribution_url: metadata attribution URL</li><li>source: layer source</li><li>min_scale: minimum display scale for layer</li><li>max_scale: maximum display scale for layer</li><li>is_editable: if layer is in edit mode</li><li>crs: layer CRS</li><li>crs_definition: layer CRS full definition</li><li>crs_description: layer CRS description</li><li>crs_ellipsoid: acronym of the layer CRS ellipsoid</li><li>extent: layer extent (as a geometry object)</li><li>distance_units: layer distance units</li><li>type: layer type, e.g., Vector or Raster</li><li>storage_type: storage format (vector layers only)</li><li>geometry_type: geometry type, e.g., Point (vector layers only)</li><li>feature_count: approximate feature count for layer (vector layers only)</li><li>path: File path to the layer data source. Only available for file based layers.</li></ul>"
|
|
}],
|
|
"examples": [{
|
|
"expression": "layer_property('streets','title')",
|
|
"returns": "'Basemap Streets'"
|
|
}, {
|
|
"expression": "layer_property('airports','feature_count')",
|
|
"returns": "120"
|
|
}, {
|
|
"expression": "layer_property('landsat','crs')",
|
|
"returns": "'EPSG:4326'"
|
|
}],
|
|
"tags": ["property", "matching", "metadata", "layer name", "layer id", "title", "abstract", "keywords", "data url", "attribution", "attribution url", "layer source", "minimum scale", "min scale", "maximum scale", "max scale", "is editable", "crs", "crs definition", "crs description", "crs ellipsoid", "layer extent", "distance units", "layer type", "storage type", "geometry type", "feature count", "file path"]
|
|
}
|