[GRASS-dev] [GRASS GIS] #3632: Add a function to read parameters from a file to the parser
GRASS GIS
trac at osgeo.org
Thu Aug 30 10:22:54 PDT 2018
#3632: Add a function to read parameters from a file to the parser
-------------------------+-------------------------------------------------
Reporter: wenzeslaus | Owner: grass-dev@…
Type: | Status: new
enhancement |
Priority: normal | Milestone: 8.0.0
Component: Parser | Version: unspecified
Resolution: | Keywords: g.parser options parameters file
CPU: | long CLI
Unspecified | Platform: Unspecified
-------------------------+-------------------------------------------------
Comment (by mmetz):
Replying to [comment:1 mlennert]:
> As much as I've found the file option for r.series et al very useful, I
cannot say that I have been confronted with situations where I felt a need
for your proposed approach.
+1
> I definitely would not want it to replace the file option.
+1
>
> If we go for such a parameter file, I would suggest to keep it very
simple, i.e. one format, with my preference going to the one used in your
example with a simple parameter=value pair per line, maybe with a special
treatment of flags to create something like in the python parser, i.e.
with the possibility to cite several flags at once:
>
> {{{
> [...]
> flags=ng
> }}}
>
> instead of
>
>
> {{{
> [...]
> -n
> -g
> }}}
or simply:
{{{
-ng
}}}
the parser already handles something like `-ng`
Using the example
{{{
r.slope.aspect elevation=dtm slope=dtm_slope aspect=dtm_aspect -n
}}}
what is the advantage of the proposed approach over a file that contains
exactly this line and executing this file? This is already working and
handled by the OS.
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3632#comment:2>
GRASS GIS <https://grass.osgeo.org>
More information about the grass-dev
mailing list