Open josephholler opened 4 years ago
This is actually a feature request -- the function is not designed for use in models, and it's just chance that it works occassionally.
Is this still the case? I made a model that works on many installations but not on others (e.g. works on 3.24.3 on Linux but not on Windows nor in 3.20.x on Linux, on different machines, all with fresh profiles) where I try to use layer_property(@raster_layer_input, 'id')
or ..., 'crs')
.
Is there any way of knowing which functions are guaranteed to work in models and which are not?
Any answer or clue for this question would be greatly appreciated:
Is there any way of knowing which functions are guaranteed to work in models and which are not?
The only inputs for which the field calculator
layer_property()
function is working in QGIS graphical modeler are for all features. In the attached model, I input layers, point layers, polygon layers, features, point features, and polygon features, and try to find the CRS for each input. The result isNULL
unless the input is of the type features and the 'selected features' option is not used.null
, except for features inputs for which you may have forgotten to exercise the 'selected features only' option.I thought that any of these inputs would have layer properties, including CRS metadata, and that the layer_property() function would be able query that metadata. It's necessary, e.g. in order to use the field calculator
transform()
function correctly. test_layerproperties.zipI suspect the same pattern of errors exists for using the
Execute SQL
algorithm, but need to do more testing.QGIS Version 3.8.2 on Windows 10