[GRASS-dev] [GRASS GIS] #1463: Legend, Zoom to map, Map analysis and Map query does not work in Python wxgui using command line d.mon + d.rast

GRASS GIS trac at osgeo.org
Fri Oct 14 17:50:49 EDT 2011


#1463: Legend, Zoom to map, Map analysis and Map query does not work in Python
wxgui using command line d.mon + d.rast
-------------------------+--------------------------------------------------
 Reporter:  huhabla      |       Owner:  grass-dev@…              
     Type:  defect       |      Status:  new                      
 Priority:  major        |   Milestone:  7.0.0                    
Component:  wxGUI        |     Version:  svn-trunk                
 Keywords:  d.mon        |    Platform:  Unspecified              
      Cpu:  Unspecified  |  
-------------------------+--------------------------------------------------
 Some important GUI features are missing when displaying raster maps using
 d.mon and d.rast from command line.

 1.) Raster map legends are not displayed, error:

 {{{
   File "/home/soeren/src/grass7.0/grass_trunk/dist.x86_64-unknown-linux-
 gnu/etc/gui/wxpython/gui_modules/mapdisp.py", line 1528, in OnAddLegend
     if self.tree.layer_selected and \
 AttributeError: 'NoneType' object has no attribute 'layer_selected'
 }}}

 2.) Zoom to selected map layers does not work

 3.) Query raster/vector maps does not work, error:

 {{{
   File "/home/soeren/src/grass7.0/grass_trunk/dist.x86_64-unknown-linux-
 gnu/etc/gui/wxpython/gui_modules/mapdisp_window.py", line 1107, in
 MouseActions
     self.OnLeftUp(event)
   File "/home/soeren/src/grass7.0/grass_trunk/dist.x86_64-unknown-linux-
 gnu/etc/gui/wxpython/gui_modules/mapdisp_window.py", line 1297, in
 OnLeftUp
     self.parent.QueryVector(self.mouse['begin'][0],
 self.mouse['begin'][1])
   File "/home/soeren/src/grass7.0/grass_trunk/dist.x86_64-unknown-linux-
 gnu/etc/gui/wxpython/gui_modules/mapdisp.py", line 1067, in QueryVector
     if not self.tree.layer_selected or \
 AttributeError: 'NoneType' object has no attribute 'layer_selected'
 }}}

 4.) Analyze map does not work, error:

 {{{
   File "/home/soeren/src/grass7.0/grass_trunk/dist.x86_64-unknown-linux-
 gnu/etc/gui/wxpython/gui_modules/mapdisp.py", line 1427, in OnScatterplot
     for layer in self.tree.GetSelections():
 AttributeError: 'NoneType' object has no attribute 'GetSelections'
 }}}

 It seems to me that "self.tree" object is not initialized when mapdisp.py
 is run from command line?

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/1463>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list