2

I need to reclassify all the values of one field of my vector file in QGIS. I'm trying to use the function v.reclass, using a text file as a rule file. I get this error:

ERROR: Either 'rules' or 'column' must be specified

I don't get what I'm doing wrong. These are: 1. the field I want to change, 2. my rule file, 3. v.reclass settings :

This is the field I want to change:

This is my rule file:

These are the settings

1 Answer 1

1

The error message means that that one and only one of the parameters 'rules' and 'column' must be specified. You have specified both the parameters and this caused the error.

Please read the v.reclass manual at https://grass.osgeo.org/grass82/manuals/v.reclass.html

EDIT:

it looks like the QGIS processing algorithm for the v.reclass GRASS-GIS module has a bug: the 'column' parameter in the algorithm is not optional (while it should be) so you cannot specify a 'reclass' parameter without also specify the 'column' parameter.

To fix this bug you need to edit the v.reclass.txt file in the folder with path [QGIS installation dir]\apps\qgis\python\plugins\grassprovider\description\ or [QGIS installation dir]\apps\qgis-ltr\python\plugins\grassprovider\description\ (provided you are using QGIS 3.32 or QGIS LTR 3.28 on Windows) and to change the the sixth line from

QgsProcessingParameterField|column|The name of the column whose values are to be used as new categories|None|input|-1|False|False

to

QgsProcessingParameterField|column|The name of the column whose values are to be used as new categories|None|input|-1|False|True

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.