[GRASS-dev] [GRASS GIS] #2852: ps.map fit frame to match region doesn't work

#2852: ps.map fit frame to match region doesn't work
------------------------+-------------------------
Reporter: pvanbosgeo | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.3
Component: Ps.map | Version: unspecified
Keywords: | CPU: Unspecified
Platform: Linux |
------------------------+-------------------------
In ps.map fitting the frame to match the current region (or saved region)
doesn't work. It generates the error code below. It looks like it has
something to do with the code getting the degrees in DMS format instead of
the D format when presumably setting the bounds.

{{{
Traceback (most recent call last):
   File "/usr/local/grass7/grass-7.1.svn/gui/wxpython/psmap/d
ialogs.py", line 578, in OnApply

ok = self.mPanel.update()
   File "/usr/local/grass7/grass-7.1.svn/gui/wxpython/psmap/d
ialogs.py", line 1065, in update

self.scale[2], self.center[2], self.rectAdjusted =
AutoAdjust(self, scaleType = 2, rect =
self.mapFrameDict['rect'])
   File "/usr/local/grass7/grass-7.1.svn/gui/wxpython/psmap/u
tils.py", line 222, in AutoAdjust

regionDict = grass.parse_key_val(windFile, sep = ':',
val_type = float)
   File "/usr/local/grass7/grass-7.1.svn/etc/python/grass/scr
ipt/utils.py", line 224, in parse_key_val

result[k] = val_type(v)
ValueError
:
invalid literal for float(): 15:06N
}}}

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

#2852: ps.map fit frame to match region doesn't work
--------------------------+-------------------------
  Reporter: pvanbosgeo | Owner: grass-dev@…
      Type: defect | Status: new
  Priority: normal | Milestone: 7.0.3
Component: Ps.map | Version: unspecified
Resolution: | Keywords:
       CPU: Unspecified | Platform: Linux
--------------------------+-------------------------

Comment (by pvanbosgeo):

The limits of the region are taken from the Wind file. However, in this
file the coordinates are given in degrees:minutes, which is obviously not
a float type.

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

#2852: ps.map fit frame to match region doesn't work
--------------------------+---------------------------------
  Reporter: pvanbosgeo | Owner: annakrat
      Type: defect | Status: new
  Priority: normal | Milestone: 7.0.3
Component: wxGUI | Version: unspecified
Resolution: | Keywords: ps.map, g.gui.psmap
       CPU: Unspecified | Platform: All
--------------------------+---------------------------------
Changes (by annakrat):

* keywords: => ps.map, g.gui.psmap
* platform: Linux => All
* component: Ps.map => wxGUI
* owner: grass-dev@… => annakrat

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

#2852: ps.map fit frame to match region doesn't work
--------------------------+---------------------------------
  Reporter: pvanbosgeo | Owner: annakrat
      Type: defect | Status: new
  Priority: normal | Milestone: 7.0.3
Component: wxGUI | Version: unspecified
Resolution: | Keywords: ps.map, g.gui.psmap
       CPU: Unspecified | Platform: All
--------------------------+---------------------------------
Changes (by martinl):

* cc: grass-dev@… (added)

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

#2852: ps.map fit frame to match region doesn't work
--------------------------+---------------------------------
  Reporter: pvanbosgeo | Owner: annakrat
      Type: defect | Status: new
  Priority: normal | Milestone: 7.0.3
Component: wxGUI | Version: unspecified
Resolution: | Keywords: ps.map, g.gui.psmap
       CPU: Unspecified | Platform: All
--------------------------+---------------------------------

Comment (by annakrat):

Try r67608.

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

#2852: ps.map fit frame to match region doesn't work
--------------------------+---------------------------------
  Reporter: pvanbosgeo | Owner: annakrat
      Type: defect | Status: new
  Priority: normal | Milestone: 7.0.3
Component: wxGUI | Version: unspecified
Resolution: | Keywords: ps.map, g.gui.psmap
       CPU: Unspecified | Platform: All
--------------------------+---------------------------------

Comment (by pvanbosgeo):

Replying to [comment:4 annakrat]:
> Try r67608.

Great, this works, thanks. Shall I close the ticket as fixed?

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

#2852: ps.map fit frame to match region doesn't work
--------------------------+---------------------------------
  Reporter: pvanbosgeo | Owner: annakrat
      Type: defect | Status: new
  Priority: normal | Milestone: 7.0.3
Component: wxGUI | Version: unspecified
Resolution: | Keywords: ps.map, g.gui.psmap
       CPU: Unspecified | Platform: All
--------------------------+---------------------------------

Comment (by annakrat):

Not yet, I will backport after release.

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

#2852: ps.map fit frame to match region doesn't work
--------------------------+---------------------------------
  Reporter: pvanbosgeo | Owner: annakrat
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.0.4
Component: wxGUI | Version: unspecified
Resolution: fixed | Keywords: ps.map, g.gui.psmap
       CPU: Unspecified | Platform: All
--------------------------+---------------------------------
Changes (by annakrat):

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

Comment:

Backported in 67773.

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