GispoCoding / eis_qgis_plugin

A QGIS plugin for mineral prospectivity mapping
https://eis-he.eu/
GNU General Public License v2.0
8 stars 1 forks source link

92 Enhancements to Create constant raster #102

Closed lehtonenp closed 2 months ago

lehtonenp commented 3 months ago

This pull request introduces updates to the create_constant_raster.py file. The key changes include:

The tool has been tested with the same inputs as the toolkit tests.

lehtonenp commented 3 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.

nmaarnio commented 3 months ago

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.

lehtonenp commented 3 months ago

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.

nmaarnio commented 3 months ago

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.

lehtonenp commented 3 months ago

I will divide the tool into 2. It grows the list of functions in the Plugin but creates clarity over which tool to use.

nmaarnio commented 2 months ago

Tested together with PR https://github.com/GispoCoding/eis_toolkit/pull/369 and works. Merging