OSGeo / grass

GRASS GIS - free and open-source geospatial processing engine
https://grass.osgeo.org
Other
853 stars 311 forks source link

[Feat] add the ability to use function parameter files for all the GRASS functions with runtime overrides #4714

Open spaine916 opened 1 week ago

spaine916 commented 1 week ago

Is your feature request related to a problem? Please describe.

Description In both the command line and GUI environments there are often very complex settings created for many of the GRASS functions. As a result, settings for the flags and parameters of a function can be easily lost or forgotten. This costs a lot of time and can introduce errors in processing jobs. It is also difficult to try out various options as all the parameters have to be entered each time.

Describe the solution you'd like

This proposed enhancement would add the ability to use function parameter files for all the GRASS functions with runtime overrides. The text files would hold the values of the flags and parameters for a function as keyword value pairs. There could be multiple configuration files defined for each function. Each file would need a unique name with the function name and user defined configuration name concatenated with an underbar. The files would need to be stored where the system can access them for execution and a user can easily access them for editing.

Describe alternatives you've considered

Manual creation of a parameters file with copies of the parameters for various functions I am using and them pasting them onto the command line or reading them for reentry in the GUI.

Additional context

Requirements Function configuration files could be created manually with a text editor or by running the function’s GUI. There should be the ability to: • Create • Save • Recall • Edit • Override function parameter files from the command line and GUI levels.

Command Line Operations The command line parser could read a parameter file to get the settings for the function.
If any of the settings were also entered on the command line then they would override the file settings at run time but would not overwrite the settings in the file. The creation, saving and editing would be done with a text editor or if the GUI if the GUI option has been implemented. See below.

GUI Operations In the function GUI there would need to be an editable scrolling field for defining or selecting a parameter file and a Save button. These two new fields would be added to all the function GUIs in the GIS.
The GUI could be used to create a file by filling in the parameters in the GUI, typing a file name into the parameter file field and hitting Save.
A user could also select an existing parameter file from the parameter file scrolling field which would populate the appropriate fields in the GUI. Then the function could be executed.
If any values from the file were changed in the GUI they would be used at run time but they would not be saved in the selected parameter file unless the Save button was selected. This would permit run time overrides for any parameters.

Implementation The parameter file functionality could be developed in stages with the command line working first to establish the file handling and execution and then the GUI functionality could be added in a later release.

neteler commented 22 hours ago

(comment moved up into Issue description; title fixed)