Opened 8 years ago

Last modified 4 years ago

#2857 new defect

d.rast.num fails in GUI because the constrain display resolution fails

Reported by: wenzeslaus Owned by: grass-dev@…
Priority: normal Milestone: 7.4.5
Component: wxGUI Version: svn-trunk
Keywords: display resolution, d.rast.num, mapdisp, rendering Cc:
CPU: Unspecified Platform: Linux


When adding d.rast.num layer in the GUI user is asked to switch to "constrain display resolution to computational settings". Switching to it makes whatever is in the Map Display disappear. After adding the d.rast.num layer nothing is there regardless the zoom settings.

This works in 70 release branch. d.rast.arrow doesn't require (just recommends) the special resolution settings, so it works in trunk when the settings is not changed.

Unrelated, but I have also noticed that the error messages are printed in the terminal instead of the console in GUI. (I don't have g.gisenv's DEBUG or WXDEBUG set.)

I don't know how to reproduce this in the command line with d.mon cairo.

Change History (13)

comment:1 by wenzeslaus, 8 years ago

I did bisect search and found that d.rast.num is broken after r65205.

To test, add raster map layer and switch on the Constrain display resolution to computational settings in Display resolution in Map Display status bar.

comment:2 by mlennert, 8 years ago

I'm pretty ignorant concernant the GUI display logic, but I see that in gui/wxpython/core/, line 505, function Render(), is defined as

def Render(self, force = False, windres = False):
        """Render map composition

        :param bool force: force rendering all map layers in the composition
        :param windres: True for region resolution instead for map resolution

then on line 520 within that function, there is a call to

self._renderLayers(env, force, windres)

However, _renderLayers as defined on lines 456ff:

_renderLayers(self, env, force = False, overlaysOnly = False)

        :param bool force: True to force rendering
        :param bool overlaysOnly: True to render only overlays

has force and overlaysOnly as parameters, but nothing concerning windres. The two mentioned parameters seem redundant and even contradictory as force = False should imply overlaysOnly = True, or ? In any case, AFAIU, _renderLayers seems to ignore the windres setting.

comment:3 by wenzeslaus, 8 years ago

Keywords: rendering added

in reply to:  1 comment:4 by wenzeslaus, 8 years ago

Replying to wenzeslaus:

I did bisect search and found that d.rast.num is broken after r65205.

r65205 also causes #2899.

comment:5 by neteler, 7 years ago


Milestone renamed

comment:6 by neteler, 7 years ago


Ticket retargeted after milestone closed

comment:7 by martinl, 6 years ago


comment:8 by neteler, 6 years ago


Ticket retargeted after milestone closed

comment:9 by martinl, 6 years ago

Milestone: 7.2.3

Ticket retargeted after milestone closed

comment:10 by martinl, 6 years ago

Milestone: 7.2.4

comment:11 by marisn, 5 years ago

Still an issue with trunk (after 7.4.1). After adding raster number layer, map display (slowly) goes crazy on zoom-in/zoom-out/pan actions. Only solution to get back to "normal" state is full GUI restart.

comment:12 by neteler, 4 years ago


comment:13 by veroandreo, 4 years ago

I cannot reproduce the reported issue with grass 76 relbranch, I only get the usual warning when the region I try to show is larger than 200 x 200:

Failed to run command 'd.rast.num map=class_spot_dec2017_10c@dengue_cba'. Details:
GRASS_INFO_WARNING(32567,1): Current region size: 1153 rows X 1793 cols         
GRASS_INFO_WARNING(32567,1): Your current region setting may be too large. Cells displayed on your graphics window may be too small for cell category number to be visible.
GRASS_INFO_ERROR(32567,2): Aborting (region larger then 200 rows X 200 cols is not allowed)

I'd suggest to close this one

Note: See TracTickets for help on using tickets.