On Tue, 12 May 2020 at 11:08, Pedro Venâncio <pedrongvenan...@gmail.com> wrote:
>
> Hi all,
>

>
> However, I was trying to give a more generic use to the model, and so I added 
> the 'Add geometry attributes' algorithm to it. With this, I cannot get the 
> coordinates anymore with the expression:
>
> concat(attributes( get_feature_by_id(@Add_geometry_attributes_OUTPUT, 
> 0))['xcoord'], ',', attributes( 
> get_feature_by_id(@Add_geometry_attributes_OUTPUT, 0))['ycoord'])
>

> This can be due to the fact that the intermediate result of 'Add geometry 
> attributes' is a memory layer? Is there any possibility of doing this in 
> another way?

No -- it's a limitation in models, that expressions CANNOT access
layers which have been created during the model execution. Only layers
present in the project at the start of the model execution can
(currently) be utilised by expressions in a model.

The fix is not trivial -- e.g. for myself I'd budget about 3 days to fix this.

Nyall
_______________________________________________
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to