[GRASS-dev] wxgrass prototype

Michael Barton michael.barton at asu.edu
Thu Mar 22 01:02:17 EDT 2007


Moritz,

See below...

On 3/21/07 7:04 AM, "Moritz Lennert" <mlennert at club.worldonline.be> wrote:

> On 21/03/07 00:30, Michael Barton wrote:
>> I just committed the last pieces to having a pretty much fully
>> functional (most of the time) GUI prototype in wxPython.
> 
> Congratulations !
> 
> Some very first remarks (all messages appear in the terminal window):
> 
> - I have to do a 'ln -s Gism gism', otherwise I get:
> 
> ValueError: unknown url type:
> /usr/lib/grass/etc/wx/gism//grass-interface.dtd
> 
> - I still get the following at startup:
> 
> GRASS_INFO_ERROR(21763,1): region for current mapset is not set
> GRASS_INFO_ERROR(21763,1): run "g.region"
> GRASS_INFO_END(21763,1)

Fixed by Glynn

> 
> 
> - Everytime I change the value of transparency, I get:
> 
> GRASS_INFO_WARNING(21970,1): 'vector/communes' was found in more mapsets
> (also found in mlennert).
> GRASS_INFO_END(21970,1)

This is a function of the "error" messages that I've been griping about that
don't really do much except clutter up the screen. At least they are less
frequent now. 

> 
> - Config->Region gives me:
> 
> Traceback (most recent call last):
>    File "/usr/lib/grass/etc/wx/gism.py", line 281, in runMenuCmd
>      menuform.GUI().parseCommand(cmd,gmpath, parentframe=self)
>    File "/usr/lib/grass/etc/wx/Gism/menuform.py", line 514, in parseCommand
>      mf = mainFrame(self.parent ,-1, self.w, self.h, self.get_dcmd, layer)
>    File "/usr/lib/grass/etc/wx/Gism/menuform.py", line 315, in __init__
>      type=grass_task['params'][p_count]['element'])
>    File "/usr/lib/grass/etc/wx/Gism/select.py", line 15, in __init__
>      tcp.getElementList(type)
>    File "/usr/lib/grass/etc/wx/Gism/select.py", line 113, in getElementList
>      elem_list = os.listdir(os.path.join (location_path, dir, element))
> OSError: [Errno 2] Aucun fichier ou répertoire de ce type:
> '/home/mlennert/GRASS/DATA/BELGIQUE/mlennert/3d.view'

This works for me. Want to update all and check again?

> 
> - If there is no PERMANENT/cell directory, I cannot display a raster map
> in another mapset (i.e. I am in mapset mlennert, wishing to display a
> raster map which is in mapset mlennert):
> 
> Traceback (most recent call last):
>    File "/usr/lib/grass/etc/wx/gism.py", line 359, in addRaster
>      self.SetTree('raster')
>    File "/usr/lib/grass/etc/wx/gism.py", line 378, in SetTree
>      self.maptree.AddLayer(disp_idx, layertype)
>    File "/usr/lib/grass/etc/wx/Gism/gismutils.py", line 139, in AddLayer
>      menuform.GUI().parseCommand('d.rast', gmpath,
> completed=(self.getOptData,layer), parentframe=self)
>    File "/usr/lib/grass/etc/wx/Gism/menuform.py", line 514, in parseCommand
>      mf = mainFrame(self.parent ,-1, self.w, self.h, self.get_dcmd, layer)
>    File "/usr/lib/grass/etc/wx/Gism/menuform.py", line 315, in __init__
>      type=grass_task['params'][p_count]['element'])
>    File "/usr/lib/grass/etc/wx/Gism/select.py", line 15, in __init__
>      tcp.getElementList(type)
>    File "/usr/lib/grass/etc/wx/Gism/select.py", line 120, in getElementList
>      elem_list = os.listdir(os.path.join (location_path, dir, element))
> OSError: [Errno 2] Aucun fichier ou répertoire de ce type:
> '/home/mlennert/GRASS/DATA/BELGIQUE/PERMANENT/cell'

This is fixed

>   - When I chose a vector map name, I get:
> 
> Could not execute 'd.vect map=ssbel01
> type=point,line,boundary,centroid,area,face display=shape icon=basic/x
> size=8 layer=1 width=0 wscale=1 color=black fcolor=200:200:200
> rgb_column=GRASSRGB lcolor=red bgcolor=none bcolor=none lsize=8
> xref=left yref=center render=g'
> Could not render layer <d.vect map=ssbel01
> type=point,line,boundary,centroid,area,face display=shape icon=basic/x
> size=8 layer=1 width=0 wscale=1 color=black fcolor=200:200:200
> rgb_column=GRASSRGB lcolor=red bgcolor=none bcolor=none lsize=8
> xref=left yref=center render=g at mlennert>
> 
> - I still cannot add a second vector or raster map:
> 
> vector:
> 
> Traceback (most recent call last):
>    File "/usr/lib/grass/etc/wx/gism.py", line 363, in addVector
>      self.SetTree('vector')
>    File "/usr/lib/grass/etc/wx/gism.py", line 378, in SetTree
>      self.maptree.AddLayer(disp_idx, layertype)
>    File "/usr/lib/grass/etc/wx/Gism/gismutils.py", line 117, in AddLayer
>      if self.layer_selected and self.layer_selected != self.GetRootItem():
>    File 
> "/usr/lib/python2.4/site-packages/wx-2.8-gtk2-unicode/wx/_controls.py",
> line 4996, in __ne__
>      return _controls_.TreeItemId___ne__(*args, **kwargs)
> TypeError: in method 'TreeItemId___ne__', expected argument 2 of type
> 'wxTreeItemId const *'

I can't duplicate and so don't know what the problem is here.

> 
> 
> raster:
> 
> Traceback (most recent call last):
>    File "/usr/lib/grass/etc/wx/gism.py", line 359, in addRaster
>      self.SetTree('raster')
>    File "/usr/lib/grass/etc/wx/gism.py", line 378, in SetTree
>      self.maptree.AddLayer(disp_idx, layertype)
>    File "/usr/lib/grass/etc/wx/Gism/gismutils.py", line 117, in AddLayer
>      if self.layer_selected and self.layer_selected != self.GetRootItem():
>    File 
> "/usr/lib/python2.4/site-packages/wx-2.8-gtk2-unicode/wx/_controls.py",
> line 4996, in __ne__
>      return _controls_.TreeItemId___ne__(*args, **kwargs)
> TypeError: in method 'TreeItemId___ne__', expected argument 2 of type
> 'wxTreeItemId const *'
> 
> - I add a vector layer, the d.vect window opens, I select a map, press
> run and display it, then within the same d.vect window (which is still
> open) I select another map and press run, but nothing happens. This is
> not true for other options (color, type, etc).
> To change the map, I have to close the d.vect window and double click on
> the layer to reopen the d.vect window. Then I can change the map name,
> click run and the new map displays.

I've made this a bit easier. The buttons change to cancel/apply/OK for
display command options windows. Simply pressing return (OK) will save the
options and close the window; pressing "apply" will save the options and
leave the window open.


Michael
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton






More information about the grass-dev mailing list