Skip to content

Batch commands #171

Closed Answered by semiautomaticgit
Lalikinelo asked this question in Q&A
Discussion options

You must be logged in to vote

Hello,
about your first issue it is related to the path. It seems that input_raster_path is not correct or the input raster is not found.

About the second issue, yes it is a " issue. You should escape the " such as \"DN\" .
Also there is a typo, 'flield_name' should be replaced by 'field_name' in your expression.

For instance this works for me (there is an error message about GDAL that can be ignored)
qgis_processing;command : 'native:fieldcalculator' ;parameters :'FIELD_LENGTH' : 3, 'FIELD_NAME' : 'newfield', 'FIELD_PRECISION' : 3, 'FIELD_TYPE' : 0, 'FORMULA' : 'CASE WHEN \"DN\"=1 THEN 1 WHEN \"DN\"=2 THEN 0.9 END', 'INPUT' : 'C:/Users/user/Desktop/shape.shp', 'OUTPUT' : 'C:/Users/user/D…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by semiautomaticgit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants