#669: let users save/load mapcalc expressions
--------------------------+-------------------------------------------------
Reporter: timmie | Owner: grass-dev@lists.osgeo.org
Type: enhancement | Status: new
Priority: normal | Milestone: 6.5.0
Component: wxGUI | Version: svn-develbranch6
Resolution: | Keywords:
Platform: Linux | Cpu: x86-32
--------------------------+-------------------------------------------------
Comment (by martinl):
wxGUI in GRASS >= 65 uses combobox for showing history of commands. It can
probably help. Also take a look at raster mapcalculator dialog (Raster ->
Map calculator).
#669: let users save/load mapcalc expressions
--------------------------+-------------------------------------------------
Reporter: timmie | Owner: grass-dev@lists.osgeo.org
Type: enhancement | Status: new
Priority: normal | Milestone: 6.5.0
Component: wxGUI | Version: svn-develbranch6
Resolution: | Keywords:
Platform: Linux | Cpu: x86-32
--------------------------+-------------------------------------------------
Comment (by timmie):
@hamish:
I was talking about the GUI version
'''Raster -> Map calculator'''
I know that I can save shell expressions or history to a text file.
Replying to [comment:3 martinl]:
> wxGUI in GRASS >= 65 uses combobox for showing history of commands. It
can probably help. Also take a look at raster mapcalculator dialog (Raster
-> Map calculator).
Yes, the combobox-history is helpful.
I mean in the ''Raster -> Map calculator'' there could be a button save
and another for load where one can just save the expression.
It could then be shared among projects and users.
Replying to [ticket:669 timmie]:
> The mapcalc expressions are sometimes long.
> Please enable a save/laod option.
> The mapcalc expression files may have placefolders for raster files or
reference particular rasters.
This is already possible when using the command-line interface. Consider,
e. g.:
{{{
bash$ (r=baz ; a=foo ; b=bar ; r.mapcalc "\"$r\" = \"$a\" + \"$b\"")
}}}
Note that you can rely on all the Bash facilities here, like, e. g.,
looping constructs:
{{{
bash$ (for i in $(seq 1 10) ; do
r.mapcalc "\"result${i}\" = \"baz\" * \"foo${i}\" +
\"bar${i}\""
done)
}}}
After the snippet of code is tested, it may easily be shared with the
colleagues using either:
* shared local filesystem;
* shared NFS or SMB/CIFS volume;
* shared VCS or your own public DVCS repository;
* a mailing list, a newsgroup or a Wiki page;
* a WWW page;
* or a sheer variety of other means.
IOW, all the requested functionality is, in fact, present in GRASS (except
for the sharing part, but why should it be?) Therefore, I'm suggesting
'''wontfix''' for this one.
Replying to [comment:6 1gray]:
> This is already possible when using the command-line interface.
Consider, e. g.:
{{{
bash$ (r=baz ; a=foo ; b=bar ; r.mapcalc "\"$r\" = \"$a\" + \"$b\"")
}}}
Note that r.mapcalc allows map names to be quoted using either single or
double quotes, so the above can be written as:
Replying to [comment:6 1gray]:
> Replying to [ticket:669 timmie]:
> > The mapcalc expressions are sometimes long.
> > Please enable a save/laod option.
> > The mapcalc expression files may have placefolders for raster files or
reference particular rasters.
>
> This is already possible when using the command-line interface.
Consider, e. g.:
When talking about saving I meant from the wxGUI based map calculator. See
below my component selection.
the SQL Builder GUI is another similar place where save-a-string might be
useful as part of a GRASS Notepad collection.
{{{
|
|
|- [-] Mapcalc expressions
| |
| |-- A + B + sin(C)
| |-- sqrt(A^2 + B^2)
|
|- [+] SQL expressions
}}}
#669: let users save/load mapcalc expressions
---------------------------------------+------------------------------------
Reporter: timmie | Owner: timmie
Type: enhancement | Status: new
Priority: normal | Milestone: 6.5.0
Component: wxGUI | Version: svn-develbranch6
Keywords: map calculator, r.mapcalc | Platform: Linux
Cpu: x86-32 |
---------------------------------------+------------------------------------
Comment(by timmie):
> Next time please attach a diff file (generated by 'svn diff') rather
then full file...
Thanks for remembering!
Do you wnat to receive a diff?
Is use a BZR mirror. but the diff schould be the same.
#669: let users save/load mapcalc expressions
---------------------------------------+------------------------------------
Reporter: timmie | Owner: timmie
Type: enhancement | Status: new
Priority: normal | Milestone: 6.5.0
Component: wxGUI | Version: svn-develbranch6
Keywords: map calculator, r.mapcalc | Platform: Linux
Cpu: x86-32 |
---------------------------------------+------------------------------------
Comment(by timmie):
Sorry for instisting, but does this qualify or is there something wrong
with my patch?
I would welcome this feature a lot. Tired of copy paste to editors or
taking screenshot of mapcalculator.
Hello,
is there anything wrog with my patch?
Do you not like it because of design issues?
Regards,
Timmie
#669: let users save/load mapcalc expressions
---------------------------------------+------------------------------------
Reporter: timmie | Owner: timmie
Type: enhancement | Status: new
Priority: normal | Milestone: 6.5.0
Component: wxGUI | Version: svn-develbranch6
Keywords: map calculator, r.mapcalc | Platform: Linux
Cpu: x86-32 |
---------------------------------------+------------------------------------
Comment(by timmie):
Sorry for instisting, but does this qualify or is there something wrong
with my patch?
I would welcome this feature a lot. Tired of copy paste to editors or
taking screenshot of mapcalculator.
Replying to [comment:17 timmie]:
> Sorry for instisting, but does this qualify or is there something wrong
with my patch?
> I would welcome this feature a lot. Tired of copy paste to editors or
taking screenshot of mapcalculator.
Modified patch committed in r44068, testing welcomed. Thanks for the
patch. Martin