Opened 8 years ago

Closed 7 years ago

#1469 closed enhancement (fixed)

wxgui vector query doesn't work for maps without attribute table

Reported by: marisn Owned by: martinl
Priority: normal Milestone: 6.4.3
Component: wxGUI Version: svn-trunk
Keywords: Cc: grass-dev@…
CPU: Unspecified Platform: All

Description

Import vector data set without attribute data. Add to layer manager. Select it. Choose "query" tool in map display. Click on vector object:

Traceback (most recent call last):
  File "/home/maris/soft/grass_trunk/dist.x86_64-unknown-
linux-gnu/etc/gui/wxpython/gui_modules/mapdisp_window.py",
line 1114, in MouseActions

self.OnLeftUp(event)
  File "/home/maris/soft/grass_trunk/dist.x86_64-unknown-
linux-gnu/etc/gui/wxpython/gui_modules/mapdisp_window.py",
line 1304, in OnLeftUp

self.parent.QueryVector(self.mouse['begin'][0],
self.mouse['begin'][1])
  File "/home/maris/soft/grass_trunk/dist.x86_64-unknown-
linux-gnu/etc/gui/wxpython/gui_modules/mapdisp.py", line
1081, in QueryVector

action = mode)
  File "/home/maris/soft/grass_trunk/dist.x86_64-unknown-
linux-gnu/etc/gui/wxpython/gui_modules/dbm_dialogs.py", line
363, in UpdateDialog

query[1])
  File "/home/maris/soft/grass_trunk/dist.x86_64-unknown-
linux-gnu/etc/gui/wxpython/gui_modules/dbm_base.py", line
104, in SelectByPoint

table = data[0]['Table']
KeyError
:
'Table'

Expected results: query tool should report geometry properties, object id etc. and not fail with cryptic error.

Change History (8)

comment:1 Changed 8 years ago by martinl

Cc: grass-dev@… added
Milestone: 6.4.2
Owner: changed from grass-dev@… to martinl
Status: newassigned

comment:2 Changed 8 years ago by martinl

Should be already fixed, try more recent version from SVN.

comment:3 Changed 8 years ago by martinl

Resolution: fixed
Status: assignedclosed

comment:4 Changed 8 years ago by marisn

Resolution: fixed
Status: closedreopened
Type: defectenhancement

The crash part is fixed, still it doesn't work as expected, as it reports "nothing found" when I click inside areas.

Compare output on same feature of gis.m from 6.4 and wxgui from 7 (r49125):

gis.m

East: 587289.62070973
North: 6379709.31901164
Map: rm_me 
Mapset: malasveidojumi
Type: Area
Sq Meters: 3144180724.195
Hectares: 314418.072
Acres: 776943.977
Sq Miles: 1213.9750
Layer: 1
Category: 2

wxgui

Nothing found.

comment:5 Changed 8 years ago by cmbarton

This is still broken in 6.4.3. It used to work.

comment:6 Changed 7 years ago by annakrat

This should be fixed for GRASS 7 by this r52832. Please could you test it with your data so that I can backport it before release?

Thanks, Anna

comment:7 Changed 7 years ago by marisn

Milestone: 6.4.26.4.3

Tested with GRASS 7 and now it works. Please, backport this to 6.4.3.

Related discussion on how it could work better is in #1703

comment:8 Changed 7 years ago by annakrat

Resolution: fixed
Status: reopenedclosed

Backported in r52853, r52855 so I'm closing this ticket.

Anna

Note: See TracTickets for help on using tickets.