Opened 3 years ago

Closed 3 years ago

#2852 closed defect (fixed) fit frame to match region doesn't work

Reported by: pvanbosgeo Owned by: annakrat
Priority: normal Milestone: 7.0.4
Component: wxGUI Version: unspecified
Keywords:, g.gui.psmap Cc: grass-dev@…
CPU: Unspecified Platform: All


In 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", line 578, in OnApply

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

self.scale[2],[2], self.rectAdjusted =
AutoAdjust(self, scaleType = 2, rect =
  File "/usr/local/grass7/grass-7.1.svn/gui/wxpython/psmap/u", 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/", line 224, in parse_key_val

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

Change History (9)

comment:1 Changed 3 years ago 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.

Correction to my original report: it does seem to work with saved regions.

Last edited 3 years ago by pvanbosgeo (previous) (diff)

comment:2 Changed 3 years ago by annakrat

Component: Ps.mapwxGUI
Keywords: g.gui.psmap added
Owner: changed from grass-dev@… to annakrat
Platform: LinuxAll

comment:3 Changed 3 years ago by martinl

Cc: grass-dev@… added

comment:4 Changed 3 years ago by annakrat

Try r67608.

comment:5 in reply to:  4 Changed 3 years ago by pvanbosgeo

Replying to annakrat:

Try r67608.

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

comment:6 Changed 3 years ago by annakrat

Not yet, I will backport after release.

comment:7 Changed 3 years ago by neteler

Milestone: 7.0.3

Ticket retargeted after milestone closed

comment:8 Changed 3 years ago by neteler

Milestone: 7.0.4

Ticket retargeted after 7.0.3 milestone closed

comment:9 Changed 3 years ago by annakrat

Resolution: fixed
Status: newclosed

Backported in 67773.

Note: See TracTickets for help on using tickets.