#822: enhance "Save display to graphic file" in wxGUI
-------------------------+--------------------------------------------------
Reporter: neteler | Owner: grass-dev@lists.osgeo.org
Type: enhancement | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-trunk
Keywords: | Platform: All
Cpu: All |
-------------------------+--------------------------------------------------
In wxGUI, the "Save display to graphic file" is yet rather limited
with respect to what gis.m provided (disk symbol).
Idea: Since d.out.file already generates wxpython code, it could be
recycled in the GUI.
Glynn mentioned on the list:
d.out.file requires a monitor from which to obtain the list of
displayed maps (i.e. d.save). It doesn't have to be an X monitor.
Obviously, the GUI has this information somewhere.
Actually, it has the code as well; see Layer.Render and Map.Render in
render.py.
#822: enhance "Save display to graphic file" in wxGUI
--------------------------+-------------------------------------------------
Reporter: neteler | Owner: grass-dev@lists.osgeo.org
Type: enhancement | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-trunk
Resolution: | Keywords:
Platform: All | Cpu: All
--------------------------+-------------------------------------------------
Comment (by cmbarton):
I quit using d.out.file when the interface dropped the xmonitors for a
TclTk canvas. So I haven't followed subsequent updates to the script. What
additional functionality does it have beyond setting resolution?
#822: enhance "Save display to graphic file" in wxGUI
--------------------------+-------------------------------------------------
Reporter: neteler | Owner: grass-dev@lists.osgeo.org
Type: enhancement | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-trunk
Resolution: | Keywords:
Platform: All | Cpu: All
--------------------------+-------------------------------------------------
Comment (by neteler):
The d.out.file stuff was only an idea. The point of the enhancement
request is an equivalent of
this code chunk in maptool.tcl to be added to the wxGUI:
{{{
# menu for saving display
set savefile [menu $mapsave.sf -type normal]
set jpgfile [menu $savefile.jpg -type normal]
#822: enhance "Save display to graphic file" in wxGUI
--------------------------+-------------------------------------------------
Reporter: neteler | Owner: grass-dev@lists.osgeo.org
Type: enhancement | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-trunk
Resolution: | Keywords:
Platform: All | Cpu: All
--------------------------+-------------------------------------------------
Comment (by cmbarton):
The formats to which saving is permitted is determined by the canvas
software (wxPython in this case). It looks like we can easily save to:
bmp, pcx, pnm, and xpm; jpg doesn't work. At least this is what is usable
on my Mac. Do you want this added to 6.4, 6.5, or 7?
#822: enhance "Save display to graphic file" in wxGUI
--------------------------+-------------------------------------------------
Reporter: neteler | Owner: grass-dev@lists.osgeo.org
Type: enhancement | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-trunk
Resolution: | Keywords:
Platform: All | Cpu: All
--------------------------+-------------------------------------------------
Comment (by glynn):
Replying to [comment:3 cmbarton]:
> The formats to which saving is permitted is determined by the canvas
software (wxPython in this case).
Or you can convert the PPM/PGM files (from g.pnmcomp) which are displayed
in the canvas using an external package such as !ImageMagick or NetPBM. Or
you can make PIL (Python Imaging Library) an optional dependency and use
that.
But it would be better to re-run the layer commands within an appropriate
environment. This would allow you to use the cairo driver for !PostScript,
PDF or SVG output (or the PS driver for !PostScript output), rather than
being limited to bitmap formats.
#822: enhance "Save display to graphic file" in wxGUI
--------------------------+-------------------------------------------------
Reporter: neteler | Owner: grass-dev@lists.osgeo.org
Type: enhancement | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-trunk
Resolution: | Keywords:
Platform: All | Cpu: All
--------------------------+-------------------------------------------------
Comment (by cmbarton):
Except that I can't develop this yet since no one has yet worked out how
to get Cairo for Mac working with GRASS.
Adding more output formats is easy at the moment, although it doesn't
offer the kind of quality that you're talking about. This is also
something to consider for a cartography module for the GUI.
#822: enhance "Save display to graphic file" in wxGUI
-------------------------+--------------------------------------------------
Reporter: neteler | Owner: grass-dev@…
Type: enhancement | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-trunk
Keywords: | Platform: All
Cpu: All |
-------------------------+--------------------------------------------------
Comment(by hamish):
see also #977
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/822#comment:6>
GRASS GIS <http://grass.osgeo.org>
Commonly referred to as GRASS, this is free Geographic Information System (GIS) software used for geospatial data management and analysis, image processing, graphics/maps production, spatial modeling, and visualization. GRASS is currently used in academic and commercial settings around the world, as well as by many governmental agencies and environmental consulting companies. GRASS is an official project of the Open Source Geospatial Foundation.
#822: enhance "Save display to graphic file" in wxGUI
-------------------------+--------------------------------------------------
Reporter: neteler | Owner: grass-dev@…
Type: enhancement | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-trunk
Keywords: | Platform: All
Cpu: All |
-------------------------+--------------------------------------------------
Comment(by neteler):
In the gis.m is a functionality "Constrain map to region geometry" which
would help to
match computational region and display region in order to produce the
correct world file.
#822: enhance "Save display to graphic file" in wxGUI
-------------------------------------------------+--------------------------
Reporter: neteler | Owner: grass-dev@…
Type: enhancement | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-trunk
Keywords: d.out.file, save image, map display | Platform: All
Cpu: All |
-------------------------------------------------+--------------------------
Changes (by wenzeslaus):
* keywords: => d.out.file, save image, map display
Comment:
neteler, cmbarton and hamish, how current functionality and G7:d.out.file
(r59010 and r59011, announced in [http://lists.osgeo.org/pipermail/grass-
dev/2014-February/067362.html d.out.file] at grass-dev) influences your
requests here? Can you rephrase requirements? (I really don't know what
''`gis.m` (disk symbol)'' is.)
Apparently, the implementation is not the one suggested by glynn in
comment:4. And #977 is not implemented either.
By the way, who likes the word "graphic" in "Save display to graphic
file"?
#822: enhance "Save display to graphic file" in wxGUI
-------------------------------------------------+--------------------------
Reporter: neteler | Owner: grass-dev@…
Type: enhancement | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-trunk
Keywords: d.out.file, save image, map display | Platform: All
Cpu: All |
-------------------------------------------------+--------------------------
Comment(by annakrat):
Replying to [comment:9 neteler]:
> Replying to [comment:8 wenzeslaus]:
> > By the way, who likes the word "graphic" in "Save display to graphic
file"?
>
> The word "graphic" is very confusing, better to be changed.
#822: enhance "Save display to graphic file" in wxGUI
-------------------------------------------------+--------------------------
Reporter: neteler | Owner: grass-dev@…
Type: enhancement | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-trunk
Keywords: d.out.file, save image, map display | Platform: All
Cpu: All |
-------------------------------------------------+--------------------------
Comment(by wenzeslaus):
Replying to [comment:11 martinl]:
> Replying to [comment:10 annakrat]:
>
> > > The word "graphic" is very confusing, better to be changed.
> >
> > done in r59203
>
> Probably "Save display content to image file" would be more informative?
The one point is that is should be short.
The other is that it should be easy to understand. "image file" is the
same as "graphic file" it does not add any information, to which kind of
file would I want to save an image and what is that image file anyway,
`.img`? So, to where is clear "file". Alternatively we can leave out the
whole to part. So, we would get "Save display" (my browser also says only
"Save page", it is clear that it will be file or files on the disk).
What to save is more difficult. It is "display", "display content",
"displayed image", "image", "map"? I'm not sure but one word should be
enough. Current "display" is pretty common word in GRASS describes
everything related to displaying maps, so it is OK here I would say. On
the other hand "display" is strange for everybody else.
#822: enhance "Save display to graphic file" in wxGUI
-------------------------------------------------+--------------------------
Reporter: neteler | Owner: grass-dev@…
Type: enhancement | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-trunk
Keywords: d.out.file, save image, map display | Platform: All
Cpu: All |
-------------------------------------------------+--------------------------
Comment(by cmbarton):
'Save display' or 'save window' is better, at least in English.
'Save image' could be confusing (what image?) and possibly misleading
(save the GIS/image file?). What is being done is that what you see in the
display window (technically a graphic canvas) is being written to a
graphic format file of your choice.
In GRASS, most of what goes on is not a display. You can display selected
maps in a window (graphic canvas), of course. Also, this function is
called from a button on the top of that display window. so I don't think
that display is overly generic or confusing in this context. 'Save
Display' is probably the most accurate and descriptive with the fewest
words.