[Qgis-user] Retrieve programmatically the layer metadata info using python

Andrea Peri aperi2007 at gmail.com
Tue Nov 3 01:23:17 PST 2015


Hi Alessandro,

your hint is working.
Effectivelly I was not thinking that the title and abstract was
directly accessible from individual getters on layer class.

Thx for help,

A.



2015-11-03 9:17 GMT+01:00 Alessandro Pasotti <apasotti at gmail.com>:
> 2015-11-03 9:03 GMT+01:00 Andrea Peri <aperi2007 at gmail.com>:
>>
>> Hi,
>>
>> I'm try to retrieve the lists of layer metadata information using a python
>> code.
>>
>> (see the image for sample).
>>
>> I found the QgsProviderMetadata, but I'm not sure it is the right class.
>> To retrieve the layer level - metadata from qgis project.
>>
>> Any hints is welcome
>>
>> Thx.
>>
>>
>
>
> You can either call layer.metadata() that returns an HTML formatted list, or
> call the individual getters, like layer.attribution(), layer.title() etc.
> etc.
>
> AFAIK there is not any dict-returning function that gives back the kvp
> metadata.
>
> Regards
>
> --
> Alessandro Pasotti
> w3:   www.itopen.it



-- 
-----------------
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-----------------



More information about the Qgis-user mailing list