-
Notifications
You must be signed in to change notification settings - Fork 1
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
92 Enhancements to Create constant raster #102
Conversation
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.
I see you tried to match the CLI definition as closely as possible, which is what I had advised, but now I remember this was a bit oddly designing tool in itself which causes problems. I would say there are two core issues in this tool overall: 1) It is too modular as it allows for 3 different methods at the same time and 2) the bounds are too clunky to use this way.
The bounds can be handled with the QgsProcessingParameterExtent
which was previously used in this algorithm (this is by far the most convenient way to set the bounds).
About the methods, I think we can leave out the 2. raster creation method from this QGIS tool as I don't see why anyone would like that over using template raster or defining the extent. I don't really like the idea of incorporating even just two very different methods into one algorithm, but that could be still done. So then you would have parameters for: template raster, extent, crs, pixel size, nodata value, constant value and output. The other option is to divide this into 2 tools: create constant raster from template raster
and create constant raster manually
(or some other, better name). Up to you which one you think is better
@nmaarnio, I now tried to set the extent parameter to be solely the |
The CLI function does not have |
…mbering of parameters
The easy way out could be to use a parameter named |
The So in short, no need to worry about any tricks to convert any parameters. It is just about making the CLI definition to match what we have here. |
I will divide the tool into 2. It grows the list of functions in the Plugin but creates clarity over which tool to use. |
Tested together with PR GispoCoding/eis_toolkit#369 and works. Merging |
This pull request introduces updates to the
create_constant_raster.py
file. The key changes include:setHelp()
method to parameter variables. This means that theQgsProcessingParameters
have changed by how the parameters are initialized and added to the parameter list.The tool has been tested with the same inputs as the toolkit tests.