-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check if the the FIELDS_MAPPING type can be passed to qgis_process #40
Comments
Are you sure that your quotes are lined up correctly for your FIELDS_MAPPING value? They look a bit off from here but that could be a copy/paste error. That said I have a feeling this won't work until we implement the JSON interface for the command-line runner, since the FIELDS_MAPPING value isn't a simple string->object conversion. |
I copied the field mapping argument from a python file where it runs just fine. So, I guess it could be the second reason you gave. Thanks |
Yes, but in R you probably have a problem because you have nested single and double quotes (so you might have to escape all the double quotes). (But it probably is the second reason I gave...) |
Closing this to keep track of in #56! |
I'm trying to use the refactor fields algorithm in R (Win 10) but can't make it work. The code I'm using is:
test<- qgis_run_algorithm(
"native:refactorfields",
INPUT = shape,
FIELDS_MAPPING = "[{'expression': '"id"','length': 10,'name': 'id','precision': 0,'type': 4},{'expression': '"nom"','length': 80,'name': 'nom','precision': 0,'type': 10},{'expression': '"clon"','length': 80,'name': 'clon','precision': 0,'type': 10},{'expression': '"use"','length': 80,'name': 'use','precision': 0,'type': 10},{'expression': '"date"','length': 10,'name': 'date','precision': 0,'type': 14},{'expression': '"area"','length': 10,'name': 'area','precision': 1,'type': 6}]",
#OUTPUT = TRUE,
.quiet = TRUE
)
The FIELDS_MAPPING argument was copied directly from QGIS. The error I get is:
Error in processx::run(path, ...) :
System command 'qgis_process-qgis-ltr.bat' failed, exit status: 1, stderr:
E> ERROR: An error was encountered while checking parameter values
E> Incorrect parameter value for FIELDS_MAPPING
Any feedback will be appreciated.
Best
CM
The text was updated successfully, but these errors were encountered: