[GRASS-dev] [GRASS GIS] #2409: last call for options keys consolidation
GRASS GIS
trac at osgeo.org
Sun Jan 11 13:46:38 PST 2015
#2409: last call for options keys consolidation
----------------------------------+-----------------------------------------
Reporter: martinl | Owner: grass-dev@…
Type: task | Status: new
Priority: blocker | Milestone: 7.0.0
Component: Default | Version: unspecified
Keywords: standardized options | Platform: Unspecified
Cpu: Unspecified |
----------------------------------+-----------------------------------------
Comment(by wenzeslaus):
Replying to [comment:186 neteler]:
> Replying to [comment:184 cmbarton]:
> > Replying to [comment:183 neteler]:
> > > * r.mapcalculator: outfile -> output? (any implications in the
wxGUI?)
> >
> > Yes. This will break the GUI map calculator.
Perhaps some !Tcl/Tk one, I don't know. wxGUI raster map calculator is
using `r.mapcalc`. `r.mapcalculator` is not used anywhere in GRASS GIS
according to my knowledge and `grep` search.
> > Why the change? Doesn't the map calculator always create a new file?
>
> I propose the change for consistency. Isn't the result a map rather than
a file (we use that for eg ASCII file output)? So the parameter name
should be "output" then.
It should be changed to "output". Any option which is name of some kind of
output should be named "output" by default. Reason to name it different
would be for example more than one option which is a name of something on
output. Also, we are not using "file" to "denote raster map" (for various
reasons).
> Replying to [comment:185 annakrat]:
> > Replying to [comment:183 neteler]:
> > > The following issues are open (TODO):
> > >
> > > * r.mapcalculator: outfile -> output? (any implications in the
wxGUI?)
> >
> > what is r.mapcalculator?
>
> No idea, I found it in the QGIS processing scripts being used.
> In GRASS, it is here:
> scripts/r.mapcalculator/r.mapcalculator
QGIS processing needs to use `r.mapcalculator` instead of `r.mapcalc`
because it needs to convert input maps and output maps to and from GRASS
GIS but in case of `r.mapcalc`, map names are hidden in the expression.
`r.mapcalculator` on the other hand, has several options which are map
names and output is not part of the expression but also an option as it
would be for other modules.
Similar issues applies to more modules as I posted here or to the
basename/prefix ticket. I recently fixed `r.ros`. I learned about these
issues and `r.mapcalculator` in [http://lists.osgeo.org/pipermail/grass-
dev/2014-August/070342.html GRASS-dev QGIS Processing & GRASS].
`r.mapcalculator` may create some confusion because is not part of
standard GRASS GIS distribution (compilation switched off by default). It
is also not in the documentation. I don't know if the confusion is also on
the QGIS site. Another issue is that it is in Shell, not Python, so it
should not work in GRASS 7 on MS Windows as far as I understand. Finally,
so revision of messages is needed, error message "Calculating
$GIS_OPT_OUTFILE. Try expert mode." shown after `r.mapcalc` failed just
caught my eye.
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2409#comment:187>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list