[Qgis-user] QGIS Modeling, using an model input layer name

Nicolas Cadieux njacadieux.gitlab at gmail.com
Fri Jan 7 14:23:36 PST 2022


Hi,

Thanks for you attention.  I was finally able using the following method:

Inputraster -> Export layer(s) information ->  Execute SQL (SELECT name 
FROM input1) -> List unique values -> use the following expression in 
the Field calculator @List_unique_values_UNIQUE_VALUES.  This gives me a 
string of the layer name of the model input file.

Not easy... :)

Nicolas


On 2022-01-07 2:42 p.m., Nicolas Cadieux wrote:
> Hi,
>
> I'am not trying to use the field calculator on the raster.  I am 
> trying to use the layer name of the raster as value.  This value then 
> goes into the field calculator.  This is in a QGIS model.
>
> Hope this is clearer.
>
> Thanks
>
> Nicolas
>
> On 2022-01-07 2:07 p.m., Kirk Schmidt wrote:
>> Hi Nicolas
>>
>> The field calculator will not process raster data.  Try using the 
>> raster calculator
>>
>> Kirk Schmidt
>>
>> On 1/7/2022 2:56 PM, Nicolas Cadieux wrote:
>>> Hi,
>>>
>>> I can figure this on out!!!  I want to use the layer name of the 
>>> input layer (a raster) as value for the field calculator.
>>>
>>> layer_property(@Inputraster , 'name')  does not work.  Any suggestions?
>>>
>>> Thanks
>>>
-- 
Nicolas Cadieux
https://gitlab.com/njacadieux



More information about the Qgis-user mailing list