QGIS/resources/function_help/json/layer_property
Nyall Dawson 709c14391b Change expression help from free form html files to structured json
A new script then parses these json help files into the html help
contents, in a standardised manner. Previously, the function help
was a bunch of different formats and structures.

Now, a custom stylesheet can be applied (and later tweaked!) to
format these help. Eg, this commit colors variables and function
names in the syntax section for greater readability.
2015-09-02 14:22:50 +10:00

12 lines
1.4 KiB
Plaintext

{
"function": "layer_property",
"description": "Returns a matching layer property or metadata value.",
"arguments": [ {"variable_name":"layer","description":"a string, representing either a layer name or layer ID"},
{"variable_name":"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>crs: layer CRS</li><li>crs_definition: layer CRS full definition</li> <li>extent: layer extent (as a geometry object)</li><li>type: layer type, eg Vector or Raster</li><li>storage_type: storage format (vector layers only)</li><li>geometry_type: geometry type, eg Point (vector layers only)</li><li>feature_count: approximate feature count for layer (vector layers only)</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'"}
]
}