Closed nmaarnio closed 4 months ago
You could start working on this @lehtonenp when you have time. The EIS Toolkit function shouldn't undergo interface related changes anymore and I am currently working on the CLI functions for reclassificition. I can update you when I have something ready so you can take a look, but feel free to start working on this based on the toolkit functions
You could start working on this @lehtonenp when you have time. The EIS Toolkit function shouldn't undergo interface related changes anymore and I am currently working on the CLI functions for reclassificition. I can update you when I have something ready so you can take a look, but feel free to start working on this based on the toolkit functions
I will start working on this after the PR's about Surface derivatives and Local Moran's I are completed. I don't want to leave those hanging for a long time.
:+1: I can merge Surface derivatives now and Miikka will review Local Moran's I CLI function today – after that I can probably merge the Local Moran's I processing alg
@nmaarnio, I have now tried different approaches to the breaks
parameter. My current implementation is this:
breaks_param = QgsProcessingParameterRange( name=self.alg_parameters[4], description="Breaks" )
I don't know which QgsProcessingParameter I should use to let users create a list of breaks as the parameter.
Is this understandable at all? There doesn't seem to be many options for this kind of a parameter that in the toolkit is for example breaks=[20, 40, 60 80]
. So, I don't know how to replicate the toolkit parameter in QGIS Plugin.
Yes, list parameters with unknown length are really tricky in QGIS processing algorithms. Honestly, I think the best way to implement this would be to create a custom QgsProcessingParameter. However, it is quite troublesome task and maybe not a priority for us right now. I would probably go now with just a string parameter, where the user is expected to separate numbers using comma. We would then do a little bit parsing before sending the command to our CLI function. We could create an issue of creating a custom QgsProcessingParameter that would be table-like format with option to define number of columns, the widgets that go inside the table cells and a row addition + removal buttons. This could be implemented later.
@nmaarnio, I now saw the implementation of CLI functions for reclassify raster. Should I create separate tools for each of the reclassification methods as well?
That would be the most straightforward way. If we combined them into one processing alg, I would also combine all the toolkit functions into one parameterized function, but I'm not sure if it makes sense since they have different parameters. Let's go with separate algorithms
I am unsure whether this is an issue of this branch alone but I get errors on the QGIS plugin Log as follows: No such command 'reclassify-with-defined-intervals-cli'
. I have set the bands parameter to be a string instead of any list. Could that be the reason why I am getting the error? I am on the branch 329-add-cli-functions-for-reclassify-raster
on eis_toolkit.
Hard to say what's wrong. If you push your branch to GitHub I can try it out
Note: CLI function for Reclassify raster should be first implemented In EIS Toolkit.