[GRASS-SVN] r42692 - grass/branches/develbranch_6/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Jul 1 09:23:53 EDT 2010


Author: martinl
Date: 2010-07-01 13:23:53 +0000 (Thu, 01 Jul 2010)
New Revision: 42692

Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_modules/nviz_tools.py
   grass/branches/develbranch_6/gui/wxpython/gui_modules/wxnviz.py
Log:
wxGUI/nviz: attribute surface query fixed
(merge r42691 from trunk)


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

Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/wxnviz.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/wxnviz.py	2010-07-01 13:22:36 UTC (rev 42691)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/wxnviz.py	2010-07-01 13:23:53 UTC (rev 42692)
@@ -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