[GRASS-dev] [GRASS GIS] #2315: wxGUI mapswipe: icon AddLayerRGB wish

#2315: wxGUI mapswipe: icon AddLayerRGB wish
-------------------------+--------------------------------------------------
Reporter: neteler | Owner: grass-dev@…
     Type: enhancement | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-releasebranch70
Keywords: mapswipe | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------
It would be very useful to have RGB layer support in mapswipe since
it is often used for multispectral data visualization.

There might be some potentially re-usable code in iclass:

{{{
wxpython/iclass/frame.py
  def AddLayerRGB(self, cmd):
  ...

wxpython/iclass/toolbars.py
  def OnAddRGB(self, event):
  ...
}}}

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

#2315: wxGUI mapswipe: icon AddLayerRGB wish
-------------------------+--------------------------------------------------
Reporter: neteler | Owner: grass-dev@…
     Type: enhancement | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-releasebranch70
Keywords: mapswipe | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by annakrat):

Please try 60594. It's available in the 'advanced mode'.

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

#2315: wxGUI mapswipe: icon AddLayerRGB wish
-------------------------+--------------------------------------------------
Reporter: neteler | Owner: grass-dev@…
     Type: enhancement | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-releasebranch70
Keywords: mapswipe | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by neteler):

Thanks - I tried r60594, switching to 'advanced mode' but somehow the new
addRGB icon
does now show up...

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

#2315: wxGUI mapswipe: icon AddLayerRGB wish
-------------------------+--------------------------------------------------
Reporter: neteler | Owner: grass-dev@…
     Type: enhancement | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-releasebranch70
Keywords: mapswipe | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by annakrat):

Replying to [comment:2 neteler]:
> Thanks - I tried r60594, switching to 'advanced mode' but somehow the
new addRGB icon
> does now show up...

Sorry I somehow forgot to commit the changes which activate it, done in
r60611.

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

#2315: wxGUI mapswipe: icon AddLayerRGB wish
-------------------------+--------------------------------------------------
Reporter: neteler | Owner: grass-dev@…
     Type: enhancement | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-releasebranch70
Keywords: mapswipe | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by neteler):

Now the icon is there and the RGB channels can be loaded. Only this issue
happens
when adding as second map a "normal" raster map:

{{{
GRASS 7.1.svn (nc_spm_08_grass7):~ > g.gui.mapswipe
GRASS 7.1.svn (nc_spm_08_grass7):~ > Traceback (most recent call last):
   File "/home/neteler/software/grass71/dist.x86_64-unknown-linux-
gnu/gui/wxpython/gui_core/forms.py", line 662, in OnOK
     cmd = self.OnApply(event)
   File "/home/neteler/software/grass71/dist.x86_64-unknown-linux-
gnu/gui/wxpython/gui_core/forms.py", line 677, in OnApply
     self)
   File "/home/neteler/software/grass71/dist.x86_64-unknown-linux-
gnu/gui/wxpython/gui_core/simplelmgr.py", line 333, in GetOptData
     self._update()
   File "/home/neteler/software/grass71/dist.x86_64-unknown-linux-
gnu/gui/wxpython/gui_core/simplelmgr.py", line 301, in _update
     self._checkList.SetItems(items)
   File "/usr/lib64/python2.7/site-
packages/wx-2.8-gtk2-unicode/wx/_core.py", line 11984, in SetItems
     self.AppendItems(items)
   File "/usr/lib64/python2.7/site-
packages/wx-2.8-gtk2-unicode/wx/_core.py", line 11846, in AppendItems
     return _core_.ItemContainer_AppendItems(*args, **kwargs)
TypeError: String or Unicode type required
}}}

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

#2315: wxGUI mapswipe: icon AddLayerRGB wish
-------------------------+--------------------------------------------------
Reporter: neteler | Owner: grass-dev@…
     Type: enhancement | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-releasebranch70
Keywords: mapswipe | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by annakrat):

Replying to [comment:4 neteler]:
> Now the icon is there and the RGB channels can be loaded. Only this
issue happens
> when adding as second map a "normal" raster map:
>
> {{{
> GRASS 7.1.svn (nc_spm_08_grass7):~ > g.gui.mapswipe
> GRASS 7.1.svn (nc_spm_08_grass7):~ > Traceback (most recent call last):
> return _core_.ItemContainer_AppendItems(*args, **kwargs)
> TypeError: String or Unicode type required
> }}}

Could you try it again? Similar things happen to me but only sometimes and
I was not able to reproduce it.

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

#2315: wxGUI mapswipe: icon AddLayerRGB wish
-------------------------+--------------------------------------------------
Reporter: neteler | Owner: grass-dev@…
     Type: enhancement | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-releasebranch70
Keywords: mapswipe | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by neteler):

Tried again: I open g.gui.mapswipe, switch to "Advanced mode", then bacl
to "Simple mode" and

{{{
GRASS 7.1.svn (nc_spm_08_grass7):~ > Traceback (most recent call last):
   File "/home/neteler/software/grass71/dist.x86_64-unknown-linux-
gnu/gui/wxpython/mapswipe/dialogs.py", line 176, in OnSwitchMode
     self._switchMode(simple=True)
   File "/home/neteler/software/grass71/dist.x86_64-unknown-linux-
gnu/gui/wxpython/mapswipe/dialogs.py", line 172, in _switchMode
     self.applyChanges.emit()
   File "/home/neteler/software/grass71/dist.x86_64-unknown-linux-
gnu/etc/python/grass/pydispatch/signal.py", line 229, in emit
     dispatcher.send(signal=self, *args, **kwargs)
   File "/home/neteler/software/grass71/dist.x86_64-unknown-linux-
gnu/etc/python/grass/pydispatch/dispatcher.py", line 343, in send
     **named
   File "/home/neteler/software/grass71/dist.x86_64-unknown-linux-
gnu/etc/python/grass/pydispatch/robustapply.py", line 57, in robustApply
     return receiver(*arguments, **named)
   File "/home/neteler/software/grass71/dist.x86_64-unknown-linux-
gnu/gui/wxpython/mapswipe/frame.py", line 401, in OnApplyInputChanges
     self.ZoomToMap()
   File "/home/neteler/software/grass71/dist.x86_64-unknown-linux-
gnu/gui/wxpython/mapswipe/frame.py", line 337, in ZoomToMap
     self.GetFirstWindow().ZoomToMap(layers = layers)
   File "/home/neteler/software/grass71/dist.x86_64-unknown-linux-
gnu/gui/wxpython/mapwin/buffered.py", line 1742, in ZoomToMap
     layers =
self._giface.GetLayerList().GetSelectedLayers(checkedOnly=False)
   File "/home/neteler/software/grass71/dist.x86_64-unknown-linux-
gnu/gui/wxpython/core/giface.py", line 257, in GetLayerList
     raise NotImplementedError()
NotImplementedError
}}}

Still the windows are existing. Then I go back to "Advanced", select RGB,
when closing that dialog I get

{{{
Traceback (most recent call last):
   File "/home/neteler/software/grass71/dist.x86_64-unknown-linux-
gnu/gui/wxpython/gui_core/forms.py", line 662, in OnOK
     cmd = self.OnApply(event)
   File "/home/neteler/software/grass71/dist.x86_64-unknown-linux-
gnu/gui/wxpython/gui_core/forms.py", line 677, in OnApply
     self)
   File "/home/neteler/software/grass71/dist.x86_64-unknown-linux-
gnu/gui/wxpython/gui_core/simplelmgr.py", line 333, in GetOptData
     self._update()
   File "/home/neteler/software/grass71/dist.x86_64-unknown-linux-
gnu/gui/wxpython/gui_core/simplelmgr.py", line 301, in _update
     self._checkList.SetItems(items)
   File "/usr/lib64/python2.7/site-
packages/wx-2.8-gtk2-unicode/wx/_core.py", line 11984, in SetItems
     self.AppendItems(items)
   File "/usr/lib64/python2.7/site-
packages/wx-2.8-gtk2-unicode/wx/_core.py", line 11846, in AppendItems
     return _core_.ItemContainer_AppendItems(*args, **kwargs)
TypeError: String or Unicode type required
}}}

Some initialization issue is still there...

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

#2315: wxGUI mapswipe: icon AddLayerRGB wish
-------------------------+--------------------------------------------------
Reporter: neteler | Owner: grass-dev@…
     Type: enhancement | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-releasebranch70
Keywords: mapswipe | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by annakrat):

Replying to [comment:6 neteler]:
> Tried again: I open g.gui.mapswipe, switch to "Advanced mode", then bacl
to "Simple mode" and
>

that's not related, I will look at it later
>
> Still the windows are existing. Then I go back to "Advanced", select
RGB, when closing that dialog I get
>
  {{{
  Traceback (most recent call last):
      return _core_.ItemContainer_AppendItems(*args, **kwargs)
  TypeError: String or Unicode type required
  }}}
>
> Some initialization issue is still there...

I am still not able to reproduce it, I got it once from something like 7
attempts.

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

#2315: wxGUI mapswipe: icon AddLayerRGB wish
-------------------------+--------------------------------------------------
Reporter: neteler | Owner: grass-dev@…
     Type: enhancement | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-releasebranch70
Keywords: mapswipe | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by annakrat):

Replying to [comment:7 annakrat]:
> Replying to [comment:6 neteler]:
> {{{
> Traceback (most recent call last):
> return _core_.ItemContainer_AppendItems(*args, **kwargs)
> TypeError: String or Unicode type required
> }}}
> >
> > Some initialization issue is still there...
>
> I am still not able to reproduce it, I got it once from something like 7
attempts.

Please try r60753. It is supposed to fix the string or Unicode type
required error. Do we want this new feature in beta3?

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

#2315: wxGUI mapswipe: icon AddLayerRGB wish
-------------------------+--------------------------------------------------
Reporter: neteler | Owner: grass-dev@…
     Type: enhancement | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-releasebranch70
Keywords: mapswipe | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by neteler):

Replying to [comment:8 annakrat]:
...
> Please try r60753. It is supposed to fix the string or Unicode type
required error.

Excellent, seems to be solved.

> Do we want this new feature in beta3?

For users very important, so I would say yes. It does not look too
invasive and we
are pre-feature freeze here.

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

#2315: wxGUI mapswipe: icon AddLayerRGB wish
-------------------------+--------------------------------------------------
Reporter: neteler | Owner: grass-dev@…
     Type: enhancement | Status: new
Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-releasebranch70
Keywords: mapswipe | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by annakrat):

Replying to [comment:9 neteler]:
> Replying to [comment:8 annakrat]:
> ...
> > Please try r60753. It is supposed to fix the string or Unicode type
required error.
>
> Excellent, seems to be solved.
>
> > Do we want this new feature in beta3?
>
> For users very important, so I would say yes. It does not look too
invasive and we
> are pre-feature freeze here.

Backported in r60756. The other error should be fixed in 60757 (and
already backported).

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

#2315: wxGUI mapswipe: icon AddLayerRGB wish
--------------------------+-------------------------------------------------
  Reporter: neteler | Owner: grass-dev@…
      Type: enhancement | Status: closed
  Priority: normal | Milestone: 7.0.0
Component: wxGUI | Version: svn-releasebranch70
Resolution: fixed | Keywords: mapswipe
  Platform: Unspecified | Cpu: Unspecified
--------------------------+-------------------------------------------------
Changes (by neteler):

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

Comment:

Thanks for the enhancement. Closing.

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