浏览代码

wxGUI/nviz: attribute surface query fixed

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@42691 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 15 年之前
父节点
当前提交
f6e34a8205
共有 2 个文件被更改,包括 6 次插入6 次删除
  1. 1 1
      gui/wxpython/gui_modules/nviz_tools.py
  2. 5 5
      gui/wxpython/gui_modules/wxnviz.py

+ 1 - 1
gui/wxpython/gui_modules/nviz_tools.py

@@ -1,4 +1,4 @@
-"""
+"""!
 @package nviz_tools.py
 @package nviz_tools.py
 
 
 @brief Nviz (3D view) tools window
 @brief Nviz (3D view) tools window

+ 5 - 5
gui/wxpython/gui_modules/wxnviz.py

@@ -1153,16 +1153,16 @@ class Nviz(object):
         if not sid:
         if not sid:
             return None
             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,
         return { 'id' : sid,
                  'x'  : x,
                  'x'  : x,
                  'y'  : y,
                  'y'  : y,
                  'z'  : z,
                  'z'  : z,
-                 'elevation' : catstr.value,
+                 'elevation' : catstr.value.replace('(', '').replace(')', ''),
                  'color'     : valstr.value }
                  'color'     : valstr.value }
     
     
     def GetDistanceAlongSurface(self, sid, p1, p2, useExag = True):
     def GetDistanceAlongSurface(self, sid, p1, p2, useExag = True):