Kaynağa Gözat

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 yıl önce
ebeveyn
işleme
f6e34a8205

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

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

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

@@ -1153,16 +1153,16 @@ class Nviz(object):
         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):