[GRASS-dev] [GRASS GIS] #728: wxgui: georectify zooming and panning don't work

#728: wxgui: georectify zooming and panning don't work
----------------------+-----------------------------------------------------
Reporter: stevensj | Owner: grass-dev@lists.osgeo.org
     Type: defect | Status: new
Priority: normal | Milestone: 6.5.0
Component: wxGUI | Version: svn-develbranch6
Keywords: | Platform: Linux
      Cpu: x86-32 |
----------------------+-----------------------------------------------------
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.

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

#728: wxgui: georectify zooming and panning don't work
-----------------------+----------------------------------------------------
  Reporter: stevensj | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: critical | Milestone: 6.4.0
Component: wxGUI | Version: svn-releasebranch64
Resolution: | Keywords:
  Platform: Linux | Cpu: x86-32
-----------------------+----------------------------------------------------
Changes (by hamish):

  * priority: normal => critical
  * version: svn-develbranch6 => svn-releasebranch64
  * milestone: 6.5.0 => 6.4.0

Comment:

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)

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

#728: wxgui: georectify zooming and panning don't work
-----------------------+----------------------------------------------------
  Reporter: stevensj | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: critical | Milestone: 6.4.0
Component: wxGUI | Version: svn-releasebranch64
Resolution: | Keywords:
  Platform: Linux | Cpu: x86-32
-----------------------+----------------------------------------------------
Comment (by hamish):

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

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

#728: wxgui: georectify zooming and panning don't work
-----------------------+----------------------------------------------------
  Reporter: stevensj | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: critical | Milestone: 6.4.0
Component: wxGUI | Version: svn-releasebranch64
Resolution: | Keywords:
  Platform: Linux | Cpu: x86-32
-----------------------+----------------------------------------------------
Comment (by martinl):

Replying to [comment:1 hamish]:
> for me zooming in this tool is totally non-functional.

please try r41199.

Martin

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

#728: wxgui: georectify zooming and panning don't work
-----------------------+----------------------------------------------------
  Reporter: stevensj | Owner: martinl
      Type: defect | Status: assigned
  Priority: critical | Milestone: 6.4.0
Component: wxGUI | Version: svn-releasebranch64
Resolution: | Keywords:
  Platform: Linux | Cpu: x86-32
-----------------------+----------------------------------------------------
Changes (by martinl):

* cc: grass-dev@lists.osgeo.org (added)
  * owner: grass-dev@lists.osgeo.org => martinl
  * status: new => assigned

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

#728: wxgui: georectify zooming and panning don't work
-----------------------+----------------------------------------------------
  Reporter: stevensj | Owner: martinl
      Type: defect | Status: assigned
  Priority: critical | Milestone: 6.4.0
Component: wxGUI | Version: svn-releasebranch64
Resolution: | Keywords:
  Platform: Linux | Cpu: x86-32
-----------------------+----------------------------------------------------
Comment (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

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

#728: wxgui: georectify zooming and panning don't work
-----------------------+----------------------------------------------------
  Reporter: stevensj | Owner: martinl
      Type: defect | Status: assigned
  Priority: critical | Milestone: 6.4.0
Component: wxGUI | Version: svn-releasebranch64
Resolution: | Keywords:
  Platform: Linux | Cpu: x86-32
-----------------------+----------------------------------------------------
Comment (by martinl):

Replying to [comment:2 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

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

#728: wxgui: georectify zooming and panning don't work
-----------------------+----------------------------------------------------
  Reporter: stevensj | Owner: martinl
      Type: defect | Status: assigned
  Priority: critical | Milestone: 6.4.0
Component: wxGUI | Version: svn-releasebranch64
Resolution: | Keywords:
  Platform: Linux | Cpu: x86-32
-----------------------+----------------------------------------------------
Comment (by martinl):

Replying to [comment:5 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).

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

#728: wxgui: georectify zooming and panning don't work
-----------------------+----------------------------------------------------
  Reporter: stevensj | Owner: martinl
      Type: defect | Status: assigned
  Priority: critical | Milestone: 6.4.0
Component: wxGUI | Version: svn-releasebranch64
Resolution: | Keywords:
  Platform: Linux | Cpu: x86-32
-----------------------+----------------------------------------------------
Comment (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

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

#728: wxgui: georectify zooming and panning don't work
-----------------------+----------------------------------------------------
  Reporter: stevensj | Owner: martinl
      Type: defect | Status: assigned
  Priority: critical | Milestone: 6.4.0
Component: wxGUI | Version: svn-releasebranch64
Resolution: | Keywords:
  Platform: Linux | Cpu: x86-32
-----------------------+----------------------------------------------------
Comment (by hamish):

Replying to [comment:6 martinl]:
> Replying to [comment:2 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

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

#728: wxgui: georectify zooming and panning don't work
-----------------------+----------------------------------------------------
  Reporter: stevensj | Owner: martinl
      Type: defect | Status: assigned
  Priority: critical | Milestone: 6.4.0
Component: wxGUI | Version: svn-releasebranch64
Resolution: | Keywords:
  Platform: Linux | Cpu: x86-32
-----------------------+----------------------------------------------------
Comment (by martinl):

Replying to [comment:8 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

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

#728: wxgui: georectify zooming and panning don't work
-----------------------+----------------------------------------------------
  Reporter: stevensj | Owner: martinl
      Type: defect | Status: assigned
  Priority: critical | Milestone: 6.4.0
Component: wxGUI | Version: svn-releasebranch64
Resolution: | Keywords:
  Platform: Linux | Cpu: x86-32
-----------------------+----------------------------------------------------
Comment (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 :slight_smile:

thanks,
Hamish

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

#728: wxgui: georectify zooming and panning don't work
-----------------------+----------------------------------------------------
  Reporter: stevensj | Owner: martinl
      Type: defect | Status: assigned
  Priority: critical | Milestone: 6.4.0
Component: wxGUI | Version: svn-releasebranch64
Resolution: | Keywords:
  Platform: Linux | Cpu: x86-32
-----------------------+----------------------------------------------------
Comment (by martinl):

Replying to [comment:11 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 ?

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

#728: wxgui: georectify zooming and panning don't work
-----------------------+----------------------------------------------------
  Reporter: stevensj | Owner: martinl
      Type: defect | Status: assigned
  Priority: critical | Milestone: 6.4.0
Component: wxGUI | Version: svn-releasebranch64
Resolution: | Keywords: georectify
  Platform: Linux | Cpu: x86-32
-----------------------+----------------------------------------------------
Changes (by hamish):

  * keywords: => georectify

Comment:

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

Replying to [comment:12 martinl]:
> 0/1 button ?

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

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

#728: wxgui: georectify zooming and panning don't work
-----------------------+----------------------------------------------------
  Reporter: stevensj | Owner: martinl
      Type: defect | Status: assigned
  Priority: critical | Milestone: 6.4.0
Component: wxGUI | Version: svn-releasebranch64
Resolution: | Keywords: georectify
  Platform: Linux | Cpu: x86-32
-----------------------+----------------------------------------------------
Comment (by martinl):

Replying to [comment:11 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

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

#728: wxgui: georectify zooming and panning don't work
-----------------------+----------------------------------------------------
  Reporter: stevensj | Owner: martinl
      Type: defect | Status: assigned
  Priority: critical | Milestone: 6.4.0
Component: wxGUI | Version: svn-releasebranch64
Resolution: | Keywords: georectify
  Platform: Linux | Cpu: x86-32
-----------------------+----------------------------------------------------
Comment (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

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

#728: wxgui: georectify zooming and panning don't work
-----------------------+----------------------------------------------------
  Reporter: stevensj | Owner: martinl
      Type: defect | Status: assigned
  Priority: critical | Milestone: 6.4.0
Component: wxGUI | Version: svn-releasebranch64
Resolution: | Keywords: georectify
  Platform: Linux | Cpu: x86-32
-----------------------+----------------------------------------------------
Comment (by martinl):

Replying to [comment:11 hamish]:

> wishes:

please create separate ticket for the wishes...

Martin

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

#728: wxgui: georectify zooming and panning don't work
-----------------------+----------------------------------------------------
  Reporter: stevensj | Owner: martinl
      Type: defect | Status: assigned
  Priority: critical | Milestone: 6.4.0
Component: wxGUI | Version: svn-releasebranch64
Resolution: | Keywords: georectify
  Platform: Linux | Cpu: x86-32
-----------------------+----------------------------------------------------
Comment (by hamish):

Replying to [comment:16 martinl]:
> please create separate ticket for the wishes...

-> #989

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

#728: wxgui: georectify zooming and panning don't work
-----------------------+----------------------------------------------------
  Reporter: stevensj | Owner: martinl
      Type: defect | Status: assigned
  Priority: critical | Milestone: 6.4.0
Component: wxGUI | Version: svn-releasebranch64
Resolution: | Keywords: georectify
  Platform: Linux | Cpu: x86-32
-----------------------+----------------------------------------------------
Comment (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

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

#728: wxgui: georectify zooming and panning don't work
-----------------------+----------------------------------------------------
  Reporter: stevensj | Owner: martinl
      Type: defect | Status: assigned
  Priority: critical | Milestone: 6.4.0
Component: wxGUI | Version: svn-releasebranch64
Resolution: | Keywords: georectify
  Platform: Linux | Cpu: x86-32
-----------------------+----------------------------------------------------
Comment (by martinl):

Replying to [comment:18 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

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