Opened 10 years ago

Closed 9 years ago

#728 closed defect (wontfix)

wxgui: georectify zooming and panning don't work

Reported by: stevensj Owned by: martinl
Priority: minor Milestone: 6.4.0
Component: wxGUI Version: svn-releasebranch64
Keywords: georectify Cc: grass-dev@…
CPU: x86-32 Platform: Linux

Description

When panning, zooming and resizing the window that contains the xy map, the display always jumps back to having the map in the centre at the original zoom.

Change History (24)

comment:1 Changed 10 years ago by hamish

Milestone: 6.5.06.4.0
Priority: normalcritical
Version: svn-develbranch6svn-releasebranch64

for me zooming in this tool is totally non-functional.

in 6.4svn I get a popup error box:

__Error in command execution d.rast__

Execution failed: 'd.rast map=test@user1 --q'

Details:
Error: region for current mapset <North must be larger than South> run "g.region"

[ok]

Also the under-mouse cursor coordinates as shown on the bottom info line are totally crazy, both lat and lon (target/current location is lat/lon, source is simple XY)

Hamish

(regardless of this bug, I keep finding little things, so my vote is leaning closer to keeping tcl/tk as the default for the 6.4.0 [source-code] release then switching to wx for 6.4.1)

comment:2 Changed 10 years ago by hamish

ps- it would be nice if middle-click+drag panned the map without having to switch tools. (all GUI map displays)

comment:3 in reply to:  1 Changed 10 years ago by martinl

Replying to hamish:

for me zooming in this tool is totally non-functional.

please try r41199.

Martin

comment:4 Changed 10 years ago by martinl

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

comment:5 Changed 10 years ago by hamish

fresh checkout + build:

G65> g.gui 
Traceback (most recent call last):
  File "/usr/local/src/grass/svn/grass65/dist.x86_64-unknown-linux-gnu/etc/wxpython/wxgui.py", line 63, in <module>
    import wx.lib.agw.customtreectrl as CT
ImportError: No module named agw.customtreectrl

python-wxgtk2.8 2.8.7.1

? Hamish

comment:6 in reply to:  2 ; Changed 10 years ago by martinl

Replying to hamish:

ps- it would be nice if middle-click+drag panned the map without having to switch tools. (all GUI map displays)

try r41216 (trunk) or r41217 (devbr6).

Martin

comment:7 in reply to:  5 Changed 10 years ago by martinl

Replying to hamish:

> G65> g.gui 
> Traceback (most recent call last):
>   File "/usr/local/src/grass/svn/grass65/dist.x86_64-unknown-linux-gnu/etc/wxpython/wxgui.py", line 63, in <module>
>     import wx.lib.agw.customtreectrl as CT
> ImportError: No module named agw.customtreectrl

python-wxgtk2.8 2.8.7.1

Ops, fixed in r41218 (trunk) and r41220 (devbr6).

comment:8 Changed 10 years ago by hamish

Ops, fixed in r41218 (trunk) and r41220 (devbr6).

Ok, GUI starts again. Now if I try the georect tool I can select group, map, etc. but then I get the controls GUI but not the map canvas window -- no map displayed.

This error in the layer manager gui output tab:

Traceback (most recent call last):
  File "/usr/loca/src/grass/svn/grass65/dist.x86_64
-unknown-linux-gnu/etc/wxpython/wxgui.py", line 318, in
OnGeorectify

georect.GeorectWizard(self)
  File "/usr/loca/src/grass/svn/grass65/dist.x86_64
-unknown-linux-gnu/etc/wxpython/gui_modules/georect.py",
line 193, in __init__

Map=self.Map, lmgr=self.parent)
  File "/usr/loca/src/grass/svn/grass65/dist.x86_64
-unknown-linux-gnu/etc/wxpython/gui_modules/mapdisp.py",
line 291, in __init__

self.Map.region['w'])
  File "/usr/loca/src/grass/svn/grass65/dist.x86_64
-unknown-linux-
gnu/etc/wxpython/gui_modules/mapdisp_window.py", line 2600,
in ZoomHistory

toolbar.Enable('zoomback', enable)
AttributeError
:
'NoneType' object has no attribute 'Enable'
Traceback (most recent call last):
  File "/usr/loca/src/grass/svn/grass65/dist.x86_64
-unknown-linux-gnu/etc/wxpython/gui_modules/toolbars.py",
line 104, in OnTool

if self.parent.toolbars['vdigit']:
AttributeError
:
'GCP' object has no attribute 'toolbars'

thanks, Hamish

comment:9 in reply to:  6 Changed 10 years ago by hamish

Replying to martinl:

Replying to hamish:

ps- it would be nice if middle-click+drag panned the map without having to switch tools. (all GUI map displays)

try r41216 (trunk) or r41217 (devbr6).

tried with the main map display window in trunk (not georef).

it works beautifully.

cheers, Hamish

comment:10 in reply to:  8 Changed 10 years ago by martinl

Replying to hamish:

Ok, GUI starts again. Now if I try the georect tool I can select group, map, etc. but then I get the controls GUI but not the map canvas window -- no map displayed.

This error in the layer manager gui output tab:

> Traceback (most recent call last):
>   File "/usr/loca/src/grass/svn/grass65/dist.x86_64
> -unknown-linux-gnu/etc/wxpython/gui_modules/toolbars.py",
> line 104, in OnTool
> 
> if self.parent.toolbars['vdigit']:
> AttributeError
> :
> 'GCP' object has no attribute 'toolbars'

Hopefully fixed in r41253 (devbr6) and r41254 (trunk). Martin

comment:11 Changed 10 years ago by hamish

ok, progress- now I see the map and zooming and panning work in the georectifier (6.5svn), but when I click on the 0/1 button to quit nothing happens.

I get this error in the main layer manager output tab:

.../grass/svn/grass65/dist.x86_64
-unknown-linux-gnu/etc/wxpython/gui_modules/georect.py",
line 285, in Cleanup

self.xy_mapdisp.Close()
AttributeError
:
'NoneType' object has no attribute 'Close'

xkill is needed to recover. (but takes down the entire gui)

(second time I tried (with earlier POINTS file) it did work; maybe have that ask "did you save/are you sure?" incase you click the wrong thing and lose an hour of careful digitizing)


next bug: with it running from a lat/lon location, with scanned map loaded into a simple_xy location, the under-mouse map coords are all wrong. e.g. 338000 degrees North. (shouldn't that be in simple_xy map units not LL? [lower left corner=0,0, upper right=rows*cols])

If I make a new GCP the x,y coord is also wrong, and none of my existing POINTS created with i.points show up.


wishes:

  • would it be possible to change the color of GCP lines which are 1 standard dev. out from the mean GCP error as orange and 2 S.D. out as red? that is a nice way in i.points to see where your typos are.

or failing that allow sort rows by clicking on column so you could group the worst offenders to the top.

  • is it possible to bind the arrow keys to move the currently selected GCP 1 pixel on the map display window?
  • more i.points goodness: can you change the color of the map marker to orange if that is the currently selected GCP data row? and have it still display on the map but turn to red if it the Use box is unticked?
  • long shot wish: i.vpoints lets you select a vector map from the target mapset to overlay on the fly based on the current tansform calculation. The other nice thing it has is left and right panels, in the left one you click on a feature in the source image, and in the right you click on what you know to be the same point in another map (rast or vect) in the target location. It then uses the x,y from the left pane and the east,north from the right pane to create the GCP without having to know or type any coords.
  • from there is the grass5 addon magic auto GCP image tool, but one (or 5) things at a time :)

thanks, Hamish

comment:12 in reply to:  11 ; Changed 10 years ago by martinl

Replying to hamish:

ok, progress- now I see the map and zooming and panning work in the georectifier (6.5svn), but when I click on the 0/1 button to quit nothing happens.

0/1 button ?

comment:13 in reply to:  12 Changed 10 years ago by hamish

Keywords: georectify added

Hamish:

when I click on the 0/1 button to quit nothing happens.

Replying to martinl:

0/1 button ?

(quit) the on/off power button. red 0 with a | in the top of it. sometimes seen as O/I.

comment:14 in reply to:  11 Changed 10 years ago by martinl

Replying to hamish:

ok, progress- now I see the map and zooming and panning work in the georectifier (6.5svn), but when I click on the 0/1 button to quit nothing happens.

I get this error in the main layer manager output tab:

> .../grass/svn/grass65/dist.x86_64
> -unknown-linux-gnu/etc/wxpython/gui_modules/georect.py",
> line 285, in Cleanup
> 
> self.xy_mapdisp.Close()
> AttributeError
> :
> 'NoneType' object has no attribute 'Close'

Unable to reproduce it, anyway r41305 should help. Martin

comment:15 Changed 10 years ago by cmbarton

I just tested and close seems to work fine in all current GRASS versions (6.4, 6.5, and 7), as does zoom. Please test with the latest svn checkout.

Michael

comment:16 in reply to:  11 ; Changed 10 years ago by martinl

Replying to hamish:

wishes:

please create separate ticket for the wishes...

Martin

comment:17 in reply to:  16 Changed 10 years ago by hamish

Replying to martinl:

please create separate ticket for the wishes...

-> #989

comment:18 Changed 10 years ago by hamish

6.4: still getting crazy coordinates in the bottom status bar.

running from a lat/lon location with source from a simple_xy location, I tried to zoom. it let me drag a red box then froze. when I hit the power button to leave this showed in the layer manager window output tab:

Traceback (most recent call last):
  File
"/usr/local/src/grass/svn/releasebranch_6_4/dist.x86_64
-unknown-linux-gnu/etc/wxpython/gui_modules/mapdisp.py",
line 1092, in MouseActions

self.OnLeftUp(event)
  File
"/usr/local/src/grass/svn/releasebranch_6_4/dist.x86_64
-unknown-linux-gnu/etc/wxpython/gui_modules/mapdisp.py",
line 1463, in OnLeftUp

self.UpdateMap(render=True)
  File
"/usr/local/src/grass/svn/releasebranch_6_4/dist.x86_64
-unknown-linux-gnu/etc/wxpython/gui_modules/mapdisp.py",
line 721, in UpdateMap

windres=windres)
  File
"/usr/local/src/grass/svn/releasebranch_6_4/dist.x86_64
-unknown-linux-gnu/etc/wxpython/gui_modules/render.py", line
912, in Render

self._renderLayers(force, mapWindow, maps, masks, opacities)
  File
"/usr/local/src/grass/svn/releasebranch_6_4/dist.x86_64
-unknown-linux-gnu/etc/wxpython/gui_modules/render.py", line
857, in _renderLayers

if not layer.Render():
  File
"/usr/local/src/grass/svn/releasebranch_6_4/dist.x86_64
-unknown-linux-gnu/etc/wxpython/gui_modules/render.py", line
166, in Render

stderr=None)
  File
"/usr/local/src/grass/svn/releasebranch_6_4/dist.x86_64
-unknown-linux-gnu/etc/wxpython/gui_modules/gcmd.py", line
357, in __init__

_("Error: ") + self.GetError()))
  File
"/usr/local/src/grass/svn/releasebranch_6_4/dist.x86_64
-unknown-linux-gnu/etc/wxpython/gui_modules/gcmd.py", line
450, in GetError

return unicode(msg, locale.getdefaultlocale()[1])
TypeError
:
unicode() argument 2 must be string, not None

LANG=C on this machine.

Hamish

comment:19 in reply to:  18 Changed 10 years ago by martinl

Replying to hamish:

6.4: still getting crazy coordinates in the bottom status bar.

running from a lat/lon location with source from a simple_xy location, I tried to zoom. it let me drag a red box then froze. when I hit the power button to leave this showed in the layer manager window output tab:

Hopefully fixed in r41352. Martin

comment:20 Changed 10 years ago by hamish

Hopefully fixed in r41352.

... and is was good ...

cool.

opened up an old POINTS file made with i.points and everything lines up exactly.

one minor bug I noticed: if I zoom way in on a GCP, then hit the revert to previous zoom button twice I get back to the full map, and the zoom-in button is still depressed from the last time. but if I try to zoom in somewhere else it places/moves a GCP instead of dragging a new zoom selection.

I have to click on pan or the zoom (-) button then the zoom (+) button again to be able to zoom in.

could clicking "revert to previous zoom" un-press the zoom-in button, or could it remember that the zoom-in button is still active in the toolbar?

thanks, Hamish

comment:21 Changed 10 years ago by hamish

revert to previous zoom is better now.

one pesky thing now is that the red dotted zoom box does not appear until the CPU goes back down to 0%. for me this takes about 3 sec after the display looks like it is done. (I'm running tunneled X over ssh from the big machine down the hall).

If I didn't have a cpu monitor running I wouldn't know about the wait. It still works correctly after the delay, just a bit of an annoyance that it is so resource hungry.

thanks, Hamish

comment:22 in reply to:  21 ; Changed 10 years ago by hamish

Priority: criticalminor

Replying to hamish:

revert to previous zoom is better now.

one pesky thing now is that the red dotted zoom box does not appear until the CPU goes back down to 0%. for me this takes about 3 sec after the display looks like it is done. (I'm running tunneled X over ssh from the big machine down the hall).

If I didn't have a cpu monitor running I wouldn't know about the wait. It still works correctly after the delay, just a bit of an annoyance that it is so resource hungry.

downgrading priority as main bug is fixed.

comment:23 in reply to:  22 Changed 9 years ago by martinl

Replying to hamish:

one pesky thing now is that the red dotted zoom box does not appear until the CPU goes back down to 0%. for me this takes about 3 sec after the display looks like it is done. (I'm running tunneled X over ssh from the big machine down the hall).

If I didn't have a cpu monitor running I wouldn't know about the wait. It still works correctly after the delay, just a bit of an annoyance that it is so resource hungry.

downgrading priority as main bug is fixed.

georectifier has been upgraded by Markus Metz for 6.4.1. Please update status of this ticket.

comment:24 Changed 9 years ago by martinl

Resolution: wontfix
Status: assignedclosed

Closing ticket for now.

Note: See TracTickets for help on using tickets.