Closed nmaarnio closed 6 months ago
A simple, last-resort option is to just implement those parameters in the processing algorithm as LineEdit widgets where the user just has to know the right format, and the input text will be parsed with some logic.
Hi Niko.
I think the minimum for this tool would be to have the possibility to create the CBA matrix with one layer, in which case the cell_size
parameter could be a simple integer/float input, the column
parameter could be a selection from a drop-down list of features from the selected input with the possibility to choose none.
The subset_target_attribute_values
should be optional and if possible a tickable list of unique values for this attribute (like the one for the "Fields to add" in the "Join Attribute by Location" tool) or a manuel text input. add_name
and add_buffer
would be optional text and integer/float input.
Adding more data to the matrix could be either another tool, with the same process for each data (except the cell size), or if integrated within the same tool, i think it would require a tabular entry. I don't know if it is possible in QGIS, but it was the least painful way i found when using Tkinter for a similar tool.
I'ts a little bit janky in this example, but with tabular inputs, it should be possible to add multiple layer and add for each one the parameters (optional or not) without making it too difficult to understand for the user. I think this table could be under a spoiler ("add additional layer"), while the main layer (used for creating the grid) should be apart using the template described above.
The resulting table could look similar to the one shown when running a tool with batch processing.
I'm not really familiar with CLI function, so I'm not sure if I can be of any help for it.
Thanks for the reply, I think this already helps me! I will start with bringing the tool in QGIS so that only one layer can be used, and it can be later improved.
Hey @AlVella , could you help with bringing this tool to the EIS QGIS Plugin? I think the best starting point is to think how should a processing algorithm in QGIS look like for this tool. I am having a little bit difficulties thinking how the
column
,subset_target_attribute_values
,add_name
andadd_buffer
parameters should be displayed in QGIS, since list parameters can be a bit tricky there. If you have any ideas regarding how the tool should look like in QGIS, or the CLI function (you can take a look at other CLI functions incli.py
of EIS Toolkit for examples), I would be glad to hear them. Just for clarification, how the tool pipeline goes is EIS Toolkit function -> EIS CLI function -> EIS QGIS processing algorithm -> EIS Wizard interface, and what exists now is just the first step.