[GRASS-dev] [GRASS GIS] #1469: wxgui vector query doesn't work for maps without attribute table

#1469: wxgui vector query doesn't work for maps without attribute table
-------------------------+--------------------------------------------------
Reporter: marisn | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone:
Component: wxGUI | Version: svn-trunk
Keywords: | Platform: All
      Cpu: Unspecified |
-------------------------+--------------------------------------------------
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.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1469&gt;
GRASS GIS <http://grass.osgeo.org>

#1469: wxgui vector query doesn't work for maps without attribute table
-------------------------+--------------------------------------------------
Reporter: marisn | Owner: martinl
     Type: defect | Status: assigned
Priority: normal | Milestone: 6.4.2
Component: wxGUI | Version: svn-trunk
Keywords: | Platform: All
      Cpu: Unspecified |
-------------------------+--------------------------------------------------
Changes (by martinl):

* cc: grass-dev@… (added)
  * owner: grass-dev@… => martinl
  * status: new => assigned
  * milestone: => 6.4.2

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1469#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#1469: wxgui vector query doesn't work for maps without attribute table
-------------------------+--------------------------------------------------
Reporter: marisn | Owner: martinl
     Type: defect | Status: assigned
Priority: normal | Milestone: 6.4.2
Component: wxGUI | Version: svn-trunk
Keywords: | Platform: All
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by martinl):

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

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1469#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>

#1469: wxgui vector query doesn't work for maps without attribute table
---------------------+------------------------------------------------------
  Reporter: marisn | Owner: martinl
      Type: defect | Status: closed
  Priority: normal | Milestone: 6.4.2
Component: wxGUI | Version: svn-trunk
Resolution: fixed | Keywords:
  Platform: All | Cpu: Unspecified
---------------------+------------------------------------------------------
Changes (by martinl):

  * status: assigned => closed
  * resolution: => fixed

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1469#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>

#1469: wxgui vector query doesn't work for maps without attribute table
--------------------------+-------------------------------------------------
  Reporter: marisn | Owner: martinl
      Type: enhancement | Status: reopened
  Priority: normal | Milestone: 6.4.2
Component: wxGUI | Version: svn-trunk
Resolution: | Keywords:
  Platform: All | Cpu: Unspecified
--------------------------+-------------------------------------------------
Changes (by marisn):

  * status: closed => reopened
  * type: defect => enhancement
  * resolution: fixed =>

Comment:

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.
}}}

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1469#comment:4&gt;
GRASS GIS <http://grass.osgeo.org>

#1469: wxgui vector query doesn't work for maps without attribute table
--------------------------+-------------------------------------------------
  Reporter: marisn | Owner: martinl
      Type: enhancement | Status: reopened
  Priority: normal | Milestone: 6.4.2
Component: wxGUI | Version: svn-trunk
Resolution: | Keywords:
  Platform: All | Cpu: Unspecified
--------------------------+-------------------------------------------------

Comment(by cmbarton):

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

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1469#comment:5&gt;
GRASS GIS <http://grass.osgeo.org>

#1469: wxgui vector query doesn't work for maps without attribute table
--------------------------+-------------------------------------------------
  Reporter: marisn | Owner: martinl
      Type: enhancement | Status: reopened
  Priority: normal | Milestone: 6.4.2
Component: wxGUI | Version: svn-trunk
Resolution: | Keywords:
  Platform: All | Cpu: Unspecified
--------------------------+-------------------------------------------------

Comment(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

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1469#comment:6&gt;
GRASS GIS <http://grass.osgeo.org>

#1469: wxgui vector query doesn't work for maps without attribute table
--------------------------+-------------------------------------------------
  Reporter: marisn | Owner: martinl
      Type: enhancement | Status: reopened
  Priority: normal | Milestone: 6.4.3
Component: wxGUI | Version: svn-trunk
Resolution: | Keywords:
  Platform: All | Cpu: Unspecified
--------------------------+-------------------------------------------------
Changes (by marisn):

  * milestone: 6.4.2 => 6.4.3

Comment:

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

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1469#comment:7&gt;
GRASS GIS <http://grass.osgeo.org>

#1469: wxgui vector query doesn't work for maps without attribute table
--------------------------+-------------------------------------------------
  Reporter: marisn | Owner: martinl
      Type: enhancement | Status: closed
  Priority: normal | Milestone: 6.4.3
Component: wxGUI | Version: svn-trunk
Resolution: fixed | Keywords:
  Platform: All | Cpu: Unspecified
--------------------------+-------------------------------------------------
Changes (by annakrat):

  * status: reopened => closed
  * resolution: => fixed

Comment:

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

Anna

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1469#comment:8&gt;
GRASS GIS <http://grass.osgeo.org>