Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#259 closed defect (fixed)

wxGUI: visualization problems with multiple rasters and vectors. not stable bug...

Reported by: giohappy Owned by: grass-dev@…
Priority: major Milestone: 6.4.0
Component: wxGUI Version: svn-develbranch6
Keywords: Cc:
CPU: x86-32 Platform: Linux

Description

I find difficult to describe this problem because it seems to happen randomly. I can't find a rule... If I add various rasters and vectors I often have problems in the visualization. I try to describe some situations I have faced using 1,2,3,...,n to define the layers from bottom to the top of the stack:

FIRST CASE

(3) points vector (2) raster (1) raster

it happens that (2) hides the points layer. If I switch off raster (2) I can see the points again. If I move up and down various times the vector in the layer manager... magically it gets workin correctly: I see the whoole stack in the map window.

SECOND CASE

(3) points vector (2) polygons vector (1) raster

Same as above. Sometimes (not always) the layer (2) hides layer (1). If I randomly switch on and off, move up and down, the layers... sometimes I can see the things as they should. You can see this case in the image attached: the points aren't visible.

I know it's too generic, but I really can't be more accurate in the description. Anyway I hope it helps...

Attachments (1)

wxGUIbug.png (199.7 KB ) - added by giohappy 16 years ago.
wxGUI bug - ticket #259

Download all attachments as: .zip

Change History (11)

by giohappy, 16 years ago

Attachment: wxGUIbug.png added

wxGUI bug - ticket #259

comment:1 by cmbarton, 16 years ago

Please specify which version you are using and exactly when you got it. A series of problems that sound like this were fixed over the past several weeks in GRASS 6.4 and GRASS 7.

in reply to:  1 comment:2 by giohappy, 16 years ago

I'm referring to Revision 32726, 08/12/08 Not weeks ago...

comment:3 by cmbarton, 16 years ago

I can confirm this behavior. It looks like recent changes have caused this to happen again. I just submitted a bug fix to the GRASS 6.4 and GRASS 7 source trees that I hope will fix it for good. Could you please test? I'll keep this open until I hear back.

Michael

in reply to:  3 ; comment:4 by giohappy, 16 years ago

Thanks Michael. It seems to work now. Let's keep this open for one day more, so I can do more tests. Two remarks:

1 - about the FIRST CASE (add a raster and a point, and then add another raster between the twos), it needs the "re-render" button to be used, because the "display map" isn't enough: the new raster hides the points. Why don't we use the same method of all the other GIS: when one adds a layer, the map is automatically rebuilt. It would avoid having to push the "display" and the "re-render" buttons every time... It could be in option in the preferences.

2 - the "fcolor" option of polygons in tcltk permits to choose the "None" value to do not make the polygons filled. This option doesn't appear in wxGUI, in which one is obligated to choose a color. The same for lines...

in reply to:  4 ; comment:5 by martinl, 16 years ago

Replying to giohappy: new raster hides the points. Why don't we use the same method of all the other GIS: when one adds a layer, the map is automatically rebuilt. It would avoid having to push the "display" and the "re-render" buttons every time...

Do you mean "render" checkbox in status bar?

Martin

in reply to:  4 comment:6 by martinl, 16 years ago

Replying to giohappy:

2 - the "fcolor" option of polygons in tcltk permits to choose the "None" value to do not make the polygons filled. This option doesn't appear in wxGUI, in which one is obligated to choose a color. The same for lines...

should be fixed now r32837 (r32838).

in reply to:  5 ; comment:7 by giohappy, 16 years ago

Replying to martinl:

Do you mean "render" checkbox in status bar?

I mean: the "FIRST CASE" problem I've descriped is solved only if I click on the "re-render" button in the Map window top-bar. If I only click the "Draw" button (the first from left) the rendered raster hides the top, point, layer. It happens only if I add the raster in a second moment layer, after having loaded the point layers.

IMHO a modern GIS should automatically manage the display of the layers as the user interact with the Layer Manager. For example, if a user add a layer, it should be automatically added to the Map, triggering the "draw" or the "re-render" action...

comment:8 by martinl, 16 years ago

Hopefully fixed in r32839 (r32840).

comment:9 by martinl, 16 years ago

Resolution: fixed
Status: newclosed

It's seems to be fixed, closing ticket. Please reopen, if necessary. Martin

in reply to:  7 comment:10 by glynn, 16 years ago

Replying to giohappy:

IMHO a modern GIS should automatically manage the display of the layers as the user interact with the Layer Manager. For example, if a user add a layer, it should be automatically added to the Map, triggering the "draw" or the "re-render" action...

The main issue here is that Tk doesn't support masked, true-colour images; it supports GIF (masked, 256 colours) or PPM (true-colour, no mask). So you can't take the approach that you would in a C program, i.e. load all of the layers, then just redraw whenever the layer stack changes.

Instead, it has to store the layers as image files. Whenever the layer stack changes, it has to call an external program (g.pnmcomp) to compose the layers into a single image, which it then loads and displays.

The end result is that changing the set of layers could realistically be a hundred times slower than the ideal case (storing the layers in video memory, and having the GPU compose them).

So, automatic updates should probably be user-selectable.

Note: See TracTickets for help on using tickets.