[GRASS-dev] [GRASS GIS] #1719: GRASS 7 Monitor command line support

GRASS GIS trac at osgeo.org
Mon Sep 3 22:10:54 PDT 2012


#1719: GRASS 7 Monitor command line support
-------------------------+--------------------------------------------------
 Reporter:  annalisapg   |       Owner:  grass-dev@…              
     Type:  enhancement  |      Status:  new                      
 Priority:  normal       |   Milestone:  7.0.0                    
Component:  wxGUI        |     Version:  svn-trunk                
 Keywords:  d.mon        |    Platform:  Unspecified              
      Cpu:  Unspecified  |  
-------------------------+--------------------------------------------------
Changes (by hamish):

 * cc: hamish (added)


Comment:

 Hi,

 I'm with annalisapg on this one. There are some refinements to wx0 which
 would help (top toolbar replaced by a right-click menu, status bar at the
 bottom optional, make query tool functional, but most importantly make
 display region invisible to the user and have it be responsive to
 g.region/WIND).


 fwiw, I keep a little script called 'x0' in my addons dir which does:

 {{{
 #!/bin/sh

 if [ -z "$GISBASE" ] ; then
    echo "You need to be in GRASS to use this"
    exit 1
 fi

 export GRASS_WIDTH=720
 export GRASS_HEIGHT=585

 GR_MAJ_VER=`g.version | cut -f2 -d' ' | cut -f1 -d'.'`

 if [ "$GR_MAJ_VER" = "7" ] ; then
    echo "# Run this:"
    echo "export GRASS_WIDTH=720 GRASS_HEIGHT=585"
    d.mon2 -b width=$GRASS_WIDTH height=$GRASS_HEIGHT
 else
    d.mon start=x0
    d.mon sel=x0
 fi
 }}}


 d.mon2(.py) is available in grass7 addons.


 when you run it from trunk you get text printed to the terminal like:

 {{{
 # Run this:
 export GRASS_WIDTH=720 GRASS_HEIGHT=585
 GRASS_PNGFILE="/home/hamish/grassdata/nc_spm_08/grass7/.tmp/ocean6/5684.0.bmp"
 GRASS_RENDER_IMMEDIATE=PNG
 GRASS_PNG_MAPPED=TRUE
 GRASS_PNG_READ=TRUE
 export GRASS_PNGFILE GRASS_WIDTH GRASS_HEIGHT GRASS_RENDER_IMMEDIATE
 GRASS_PNG_MAPPED GRASS_PNG_READ;
 d.erase bgcolor=white;
 wximgview
 image="/home/hamish/grassdata/nc_spm_08/grass7/.tmp/ocean6/5684.0.bmp"
 percent=10 &
 }}}

 which sets up wximgview with a cut and paste*. No access d.zoom, d.where,
 or d.what, but it is responsive to g.region, d.rast, d.vect, and d.erase,
 and fulfills my minimalistic wishes.

 [*] or ximgview, wxpyimgview, qiv as per handler option of d.mon2.py


 regards,
 Hamish

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/1719#comment:4>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list