[GRASS-dev] [GRASS GIS] #3650: Cartographic composer: scale and rotation options do not work for north arrow

#3650: Cartographic composer: scale and rotation options do not work for north
arrow
-------------------------+-------------------------
Reporter: veroandreo | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone:
Component: Default | Version: unspecified
Keywords: | CPU: Unspecified
Platform: Unspecified |
-------------------------+-------------------------
When I try to add a North Arrow in the Cartographic composer, if I accept
all settings by default and click OK, it works, but I get a huge north
arrow.

If I then try to scale or rotate the north arrow, the apply button does
not produce any visible effect and the OK button does not close the
dialog, only the "x" in the corner does, and afterwards the grey box
representing the north arrow disappears. Then, the arrow appears in the
preview, but I do not have control over it.

I attach screenshots.

System
{{{
GRASS version: 7.7.svn
GRASS SVN revision: r73364
Build date: 2018-09-19
Build platform: x86_64-pc-linux-gnu
GDAL: 2.2.4
PROJ.4: 4.9.3
GEOS: 3.6.1
SQLite: 3.22.0
Python: 2.7.15
wxPython: 3.0.2.0
Platform: Linux-4.18.7-200.fc28.x86_64-x86_64-with-fedora-28-Twenty_Eight
}}}

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

#3650: Cartographic composer: scale and rotation options do not work for north
arrow
--------------------------+-------------------------
  Reporter: veroandreo | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone:
Component: Default | Version: unspecified
Resolution: | Keywords:
       CPU: Unspecified | Platform: Unspecified
--------------------------+-------------------------
Changes (by veroandreo):

* Attachment "g.gui.psmap_draft.png" added.

draft mode in g.gui.psmap, after north arrow has disappeared

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

#3650: Cartographic composer: scale and rotation options do not work for north
arrow
--------------------------+-------------------------
  Reporter: veroandreo | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone:
Component: Default | Version: unspecified
Resolution: | Keywords:
       CPU: Unspecified | Platform: Unspecified
--------------------------+-------------------------
Changes (by veroandreo):

* Attachment "g.gui.psmap_preview.png" added.

preview mode in g.gui.psmap, north arrow appears (not shrunk as expected)

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

#3650: Cartographic composer: scale and rotation options do not work for north
arrow
--------------------------+-------------------------
  Reporter: veroandreo | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone:
Component: Default | Version: unspecified
Resolution: | Keywords:
       CPU: Unspecified | Platform: Unspecified
--------------------------+-------------------------

Comment (by annakrat):

I can't reproduce. Maybe could you list your steps exactly how you do it?

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

#3650: Cartographic composer: scale and rotation options do not work for north
arrow
--------------------------+-------------------------
  Reporter: veroandreo | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone:
Component: Default | Version: unspecified
Resolution: | Keywords:
       CPU: Unspecified | Platform: Unspecified
--------------------------+-------------------------

Comment (by annakrat):

Also does it work in 76?

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

#3650: Cartographic composer: scale and rotation options do not work for north
arrow
--------------------------+-------------------------
  Reporter: veroandreo | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone:
Component: Default | Version: unspecified
Resolution: | Keywords:
       CPU: Unspecified | Platform: Unspecified
--------------------------+-------------------------

Comment (by veroandreo):

Replying to [comment:1 annakrat]:
> I can't reproduce. Maybe could you list your steps exactly how you do
it?

1. Open Cartographic composer from GUI (File--> Cartographic composer)
2. Add map frame and select elevation raster map
3. Add north arrow, select n_arrow1_fancy.eps, click OK
4. Double click over north arrow in map
5. 2 or 3 clicks over minus in Scale, Click Apply <<-- nothing
6. Click OK <<-- nothing
7. Close "North Arrow Setting" box with the x in the corner
8. North arrow becomes invisible
9. Generate preview and north arrow is there (original position and size)

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

#3650: Cartographic composer: scale and rotation options do not work for north
arrow
--------------------------+-------------------------
  Reporter: veroandreo | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone:
Component: Default | Version: unspecified
Resolution: | Keywords:
       CPU: Unspecified | Platform: Unspecified
--------------------------+-------------------------

Comment (by annakrat):

Replying to [comment:3 veroandreo]:
> Replying to [comment:1 annakrat]:
> > I can't reproduce. Maybe could you list your steps exactly how you do
it?
>
> 1. Open Cartographic composer from GUI (File--> Cartographic composer)
> 2. Add map frame and select elevation raster map
> 3. Add north arrow, select n_arrow1_fancy.eps, click OK
> 4. Double click over north arrow in map
> 5. 2 or 3 clicks over minus in Scale, Click Apply <<-- nothing
> 6. Click OK <<-- nothing
> 7. Close "North Arrow Setting" box with the x in the corner
> 8. North arrow becomes invisible
> 9. Generate preview and north arrow is there (original position and
size)

I still can't reproduce. Isn't there any error in Layer manager console?

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

#3650: Cartographic composer: scale and rotation options do not work for north
arrow
--------------------------+-------------------------
  Reporter: veroandreo | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone:
Component: Default | Version: unspecified
Resolution: | Keywords:
       CPU: Unspecified | Platform: Unspecified
--------------------------+-------------------------

Comment (by veroandreo):

Yes, here it is:

{{{
Traceback (most recent call last):
   File "/home/veroandreo/software/grass7_trunk/dist.x86_64
-pc-linux-gnu/gui/wxpython/psmap/dialogs.py", line 440, in
OnApply

self.parent.DialogDataChanged(id=self.id)
   File "/home/veroandreo/software/grass7_trunk/dist.x86_64
-pc-linux-gnu/gui/wxpython/psmap/frame.py", line 1012, in
DialogDataChanged

bb=drawRectangle)
   File "/home/veroandreo/software/grass7_trunk/dist.x86_64
-pc-linux-gnu/gui/wxpython/psmap/frame.py", line 2180, in
Draw

bbox=bb)
   File "/home/veroandreo/software/grass7_trunk/dist.x86_64
-pc-linux-gnu/gui/wxpython/psmap/frame.py", line 2288, in
DrawBitmap

bbox[3])), resample=PILImage.BICUBIC)
   File "/usr/lib64/python2.7/site-packages/PIL/Image.py",
line 1749, in resize

return self._new(self.im.resize(size, resample, box))
ValueError
:
height and width must be > 0
}}}

I think it is because I click over minus more than 3 or 4 times and then
north arrow becomes very small... The problem is I only see minus or plus
sign, I do not know how much I reduce the size or rotate (see attachment,
is this the same for others or only in fedora?).

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

#3650: Cartographic composer: scale and rotation options do not work for north
arrow
--------------------------+-------------------------
  Reporter: veroandreo | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone:
Component: Default | Version: unspecified
Resolution: | Keywords:
       CPU: Unspecified | Platform: Unspecified
--------------------------+-------------------------
Changes (by veroandreo):

* Attachment "cartographic_comp_north_arrow_dialog.png" added.

dialog box for north arrow in cartographic composer, note scale and
rotation area, only + and - are visible

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

#3650: Cartographic composer: scale and rotation options do not work for north
arrow
--------------------------+-------------------------
  Reporter: veroandreo | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.8.0
Component: Ps.map | Version: svn-trunk
Resolution: | Keywords:
       CPU: Unspecified | Platform: Unspecified
--------------------------+-------------------------
Changes (by veroandreo):

* version: unspecified => svn-trunk
* component: Default => Ps.map
* milestone: => 7.8.0

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