-
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
Support PROJECT_PATH and ELLIPSOID arguments when using JSON input #111
Conversation
The arguments ELLIPSOID and PROJECT_PATH must be turned into their own keys in the JSON object, and not belong to the 'inputs' key.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me! Should there also be a test with an algorithm that requires it? You could add a test.qgs to the folder where the other test data lives. (But don't feel that you have to if this is hard!)
Is 982fe46 OK for you? I added a new project that uses some longlake layers from the package, in order to not depend on the external WFS used in |
That's awesome! You can |
Well, OK for me to look into it a bit, but currently I don't see what causes this. It says Error in basename(filename) : a character vector argument expected; I presume this has to do with |
When I run this locally I get a segfault:
I think you're safe to skip this on MacOS for now (perhaps keeping the segfault issue open). |
Thanks for checking in MacOS. Still quite obscure, and something which should work anyway. I cannot debug in MacOS interactively since I have no access to such installation. It would be good to know whether Can you try something like below in a shell: $ wget -O test.qgs https://gist.githubusercontent.com/paleolimbot/f2fa6f409c48c3d18fe5462fb29f8996/raw/3c1e14b7834c2175acbb6cb1b6f646906f9f89ed/test.qgs
$
$ myJSON=$(</dev/stdin)
{
"inputs": {
"LAYOUT": "Layout 1",
"TEXT_FORMAT": 0,
"OUTPUT": "output.pdf"
},
"project_path": "test.qgs"
}
$
$ echo $myJSON | qgis_process run native:printlayouttopdf -
$
$ ls output.pdf # check that it exists |
I hope to come back to the MacOS problem later in #68. For now, skipping on MacOS since no immediate solution comes up. |
Fixes a partial problem of #68. This should solve the problem with
PROJECT_PATH
andELLIPSOID
arguments when using JSON input (which is default for QGIS >= 3.23) (#68 (comment)). They must go into separate keys in the JSON string, not in theinputs
key .Related to qgis/QGIS#49972.
Created on 2022-08-26 by the reprex package (v2.0.1)
Session info