Opened 13 years ago

Closed 6 years ago

#1457 closed defect (fixed)

Zoom in Georectify Does not Work

Reported by: jjrambo Owned by: grass-dev@…
Priority: normal Milestone: 7.0.7
Component: wxGUI Version: svn-trunk
Keywords: Zoom, Georectify Cc:
CPU: x86-32 Platform: Linux

Description

Running Ubuntu 11.04 in VirtualBox.

When trying to zoom in or zoom out in Georectify, I receive this error message in the command console:

Traceback (most recent call last):

File "/usr/local/grass-7.0.svn/etc/gui/wxpython/gui_module

s/mapdisp_window.py", line 1132, in MouseActions

self.OnLeftUp(event)

File "/usr/local/grass-7.0.svn/etc/gui/wxpython/gui_module

s/mapdisp_window.py", line 1299, in OnLeftUp

self.Zoom(begin, end, self.zoomtype)

File "/usr/local/grass-7.0.svn/etc/gui/wxpython/gui_module

s/mapdisp_window.py", line 1651, in Zoom

if self.parent.statusbarWinalignExtent.IsChecked(): KeyError : 'alignExtent'

Thought perhaps my region was not set properly, but making many changes did not resolve the issue.

I also looked at the python files the error mentioned, but I did not really know what I was doing.

Thanks for any help!

Change History (18)

comment:1 by martinl, 13 years ago

Component: DefaultwxGUI

comment:2 by mmetz, 13 years ago

I guess the check for alignExtent must be disabled for the Georectifier. Martin, is this alignExtent thing something new or at least newer than the Georectifier?

Markus M

comment:3 by martinl, 13 years ago

There are two ways how to fix it - direct fix or rewriting of gcpmapdisp.MapFrame which should have common super-class with mapdisp.MapFrame. The second option would lead to more readable code, bigger flexibility and avoid code duplication. This bug also affects G65.

in reply to:  2 ; comment:4 by martinl, 13 years ago

Replying to mmetz:

I guess the check for alignExtent must be disabled for the Georectifier. Martin, is this alignExtent thing something new or at least newer than the Georectifier?

yes, see r47987. I think there is no need to disable this feature in georectifier(?) For quick gcpmapdisp.py code should be updated or rewrite code as I suggested and use common super-class for also for mapdisp.MapFrame. This avoid such bugs in the future and also made life easier for implementing similar tools, like wxGUI i.class, etc.

in reply to:  4 ; comment:5 by mmetz, 13 years ago

Replying to martinl:

Replying to mmetz:

I guess the check for alignExtent must be disabled for the Georectifier. Martin, is this alignExtent thing something new or at least newer than the Georectifier?

yes, see r47987. I think there is no need to disable this feature in georectifier(?) For quick gcpmapdisp.py code should be updated or rewrite code as I suggested and use common super-class for also for mapdisp.MapFrame. This avoid such bugs in the future and also made life easier for implementing similar tools, like wxGUI i.class, etc.

I common superclass could be difficult, mainly because of the differing window layout managed by AUI. The status bar of the georectifier has entries different from the regular map display, i.e. some entries present in the status bar of regular map display are not present in the status bar of the georectifier and vice versa, e.g. "Go to GCP No." The georectifier uses the buffered window of wxGUI as is, but this is tightly interwoven with mapdisp, i.e. you do not get the one without the other one. That makes things difficult for georectifier, some wx.class etc. which also draw maps on canvas but interact somewhat differently with the maps.

Markus M

in reply to:  5 comment:6 by martinl, 13 years ago

Replying to mmetz:

yes, see r47987. I think there is no need to disable this feature in georectifier(?) For quick gcpmapdisp.py code should be updated or rewrite code as I suggested and use common super-class for also for mapdisp.MapFrame. This avoid such bugs in the future and also made life easier for implementing similar tools, like wxGUI i.class, etc.

I common superclass could be difficult, mainly because of the differing window layout managed by AUI. The status bar of the georectifier has entries different from the regular map display, i.e. some entries present in the status bar of regular map display are not present in the status bar of the georectifier and vice versa, e.g. "Go to GCP No." The georectifier uses the buffered window of wxGUI as is, but this is tightly interwoven with mapdisp, i.e. you do not get the one without the other one. That makes things difficult for georectifier, some wx.class etc. which also draw maps on canvas but interact somewhat differently with the maps.

OK, I didn't study the code so deeply, anyway I see some overlap in mapdisp.py and gcpmapdisplay.py. Speaking about statusbar items, there are some which are common, some of them differs. Common items could be handled by this super-class.

Martin

comment:7 by martinl, 13 years ago

quick fix - r48620

comment:8 by martinl, 13 years ago

BTW, when starting georectifier, map content is re-render several times instead of just once

comment:9 by hamish, 13 years ago

Keywords: Zoom Georectify → Zoom, Georectify

see also #686, #728 (why was that one closed if remaining issues were not confirmed fixed?), and #1257.

Hamish

ps- hint: trac understands keywords if you use commas to separate them.

in reply to:  7 ; comment:10 by mmetz, 13 years ago

Replying to martinl:

quick fix - r48620

Not knowing exactly the purpose of AlignExtentFromDisplay(), should the fix not rather be

if 'alignExtent' in self.parent.statusbarWin and \
        self.parent.statusbarWin['alignExtent'].IsChecked():

?

Markus M

in reply to:  10 comment:11 by martinl, 13 years ago

Replying to mmetz:

Replying to martinl:

quick fix - r48620

> if 'alignExtent' in self.parent.statusbarWin and \
>         self.parent.statusbarWin['alignExtent'].IsChecked():

no, the default behaviour should be "align extent to display size" as it was.

in reply to:  4 ; comment:12 by annakrat, 13 years ago

Replying to martinl:

Replying to mmetz:

I guess the check for alignExtent must be disabled for the Georectifier. Martin, is this alignExtent thing something new or at least newer than the Georectifier?

yes, see r47987. I think there is no need to disable this feature in georectifier(?) For quick gcpmapdisp.py code should be updated or rewrite code as I suggested and use common super-class for also for mapdisp.MapFrame. This avoid such bugs in the future and also made life easier for implementing similar tools, like wxGUI i.class, etc.

As you might have noticed we are working on this super-class. We found quite a lot of code related to georectifier - GRMapWindow (especially in mapdisp.py, mapdisp_window.py), which seems to be useless. For example there are toolbars['georect'] and toolbars['gcpdisp'] (which is used now). Is this obsolete? If yes, we will clean the code.

Anna and Vaclav

in reply to:  12 ; comment:13 by mmetz, 13 years ago

Replying to annakrat:

Replying to martinl:

Replying to mmetz:

I guess the check for alignExtent must be disabled for the Georectifier. Martin, is this alignExtent thing something new or at least newer than the Georectifier?

yes, see r47987. I think there is no need to disable this feature in georectifier(?) For quick gcpmapdisp.py code should be updated or rewrite code as I suggested and use common super-class for also for mapdisp.MapFrame. This avoid such bugs in the future and also made life easier for implementing similar tools, like wxGUI i.class, etc.

As you might have noticed we are working on this super-class. We found quite a lot of code related to georectifier - GRMapWindow (especially in mapdisp.py, mapdisp_window.py), which seems to be useless. For example there are toolbars['georect'] and toolbars['gcpdisp'] (which is used now). Is this obsolete? If yes, we will clean the code.

toolbars['georect'] is unused, it is a left-over from the previous version of the georectifier. Only toolbars['gcpdisp'] is used by the current georectifier.

I will help adjusting the code as soon as I have a bit more breathing time.

Markus M

in reply to:  13 comment:14 by annakrat, 13 years ago

Replying to mmetz:

Replying to annakrat:

As you might have noticed we are working on this super-class. We found quite a lot of code related to georectifier - GRMapWindow (especially in mapdisp.py, mapdisp_window.py), which seems to be useless. For example there are toolbars['georect'] and toolbars['gcpdisp'] (which is used now). Is this obsolete? If yes, we will clean the code.

toolbars['georect'] is unused, it is a left-over from the previous version of the georectifier. Only toolbars['gcpdisp'] is used by the current georectifier.

I will help adjusting the code as soon as I have a bit more breathing time.

Markus M

OK, we will remove the unused code.

comment:15 by martinl, 9 years ago

Milestone: 7.0.07.0.5

comment:16 by neteler, 8 years ago

Milestone: 7.0.57.0.6

comment:17 by neteler, 7 years ago

Milestone: 7.0.67.0.7

comment:18 by annakrat, 6 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.