Closed lehtonenp closed 2 months ago
@nmaarnio, I now tried to set the extent parameter to be solely the QgsProcessingParameterExtent
. Toolkit runs into the issue of an unknown parameter --extent
. Is this desired? I might need some more guidance with this.
The CLI function does not have extent
parameter at the moment. Let me know how you intend to implement this processing alg and I can modify the CLI functions accordingly.
The easy way out could be to use a parameter named extent
that is a string. Like this: 'extent' : '384744.000000000,384836.000000000,6671272.000000000,6671384.000000000 [EPSG:3067]'
. However, I could parse the string in eis_processing_algorithm.py
based on the name of the parameter. But then there would be the problem of setting the coord_north, _east, _south and _west correctly. I think the easiest way would be the most feasible as well.
The QgsProcessingParameterExtent
is the best way to implement this and can be actually handled in the CLI easily – you can take a look at IDW interpolation processing alg/CLI function. What I mainly meant with my previous comment is just the final combination of parameters and whether it will be 1 or 2 separate tools.
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 https://github.com/GispoCoding/eis_toolkit/pull/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.