[GRASS-SVN] r42691 - grass/trunk/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Jul 1 09:22:36 EDT 2010


Author: martinl
Date: 2010-07-01 13:22:36 +0000 (Thu, 01 Jul 2010)
New Revision: 42691

Modified:
   grass/trunk/gui/wxpython/gui_modules/nviz_tools.py
   grass/trunk/gui/wxpython/gui_modules/wxnviz.py
Log:
wxGUI/nviz: attribute surface query fixed


Modified: grass/trunk/gui/wxpython/gui_modules/nviz_tools.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/nviz_tools.py	2010-07-01 11:53:51 UTC (rev 42690)
+++ grass/trunk/gui/wxpython/gui_modules/nviz_tools.py	2010-07-01 13:22:36 UTC (rev 42691)
@@ -1,4 +1,4 @@
-"""
+"""!
 @package nviz_tools.py
 
 @brief Nviz (3D view) tools window

Modified: grass/trunk/gui/wxpython/gui_modules/wxnviz.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/wxnviz.py	2010-07-01 11:53:51 UTC (rev 42690)
+++ grass/trunk/gui/wxpython/gui_modules/wxnviz.py	2010-07-01 13:22:36 UTC (rev 42691)
@@ -1153,16 +1153,16 @@
         if not sid:
             return None
         
-        catstr = c_char * 256
-        valstr = c_char * 256
-        #GS_get_cat_at_xy(sid, MAP_ATT, pointer(catstr), x, y)
-        #GS_get_val_at_xy(sid, MAP_ATT, pointer(valstr), x, y)
+        catstr = create_string_buffer(256)
+        valstr = create_string_buffer(256)
+        GS_get_cat_at_xy(sid, ATT_TOPO, catstr, x, y)
+        GS_get_val_at_xy(sid, ATT_COLOR, valstr, x, y)
         
         return { 'id' : sid,
                  'x'  : x,
                  'y'  : y,
                  'z'  : z,
-                 'elevation' : catstr.value,
+                 'elevation' : catstr.value.replace('(', '').replace(')', ''),
                  'color'     : valstr.value }
     
     def GetDistanceAlongSurface(self, sid, p1, p2, useExag = True):



More information about the grass-commit mailing list