Opened 11 years ago

Closed 10 years ago

#1961 closed defect (fixed)

wxNVIZ: error if no raster map selected

Reported by: hamish Owned by: grass-dev@…
Priority: major Milestone: 6.4.3
Component: wxGUI Version: svn-develbranch6
Keywords: wxnviz Cc:
CPU: x86-64 Platform: All

Description

Hi,

testing wxNVIZ in latest 6.5svn, I get an error and 100% CPU use if I select '3D view' in the map display window with just a vector map selected. (also tried with a 3D vector map, same thing) happens both on my linux and Wingrass-VM. It's recoverable once you switch back to '2D view' mode.

one possible solution is in the case of no raster tell nviz to create a new constant surface at z=0 with 50% transparency. (or at least that's the trick with tcl/tk nviz + no raster to drape things on)

traceback from wxgui module output window:

Starting 3D view mode...                                                        
Vector map <roads@PERMANENT> loaded (746 features)
Traceback (most recent call last):
  File "/home/hamish/src/grass/svn/grass65/dist.x86_64
-unknown-linux-gnu/etc/wxpython/nviz/mapwindow.py", line
366, in OnPaint

self.DoPaint()
  File "/home/hamish/src/grass/svn/grass65/dist.x86_64
-unknown-linux-gnu/etc/wxpython/nviz/mapwindow.py", line
383, in DoPaint

self.lmgr.nviz.UpdatePage('view')
  File "/home/hamish/src/grass/svn/grass65/dist.x86_64
-unknown-linux-gnu/etc/wxpython/nviz/tools.py", line 4233,
in UpdatePage

hmin,hmax)
  File "/usr/lib64/python2.6/dist-
packages/wx-2.8-gtk2-unicode/wx/_controls.py", line 2692, in
SetRange

return _controls_.Slider_SetRange(*args, **kwargs)
OverflowError
:
long int too large to convert to int
Traceback (most recent call last):
  File "/home/hamish/src/grass/svn/grass65/dist.x86_64
-unknown-linux-gnu/etc/wxpython/nviz/mapwindow.py", line
366, in OnPaint

self.DoPaint()
  File "/home/hamish/src/grass/svn/grass65/dist.x86_64
-unknown-linux-gnu/etc/wxpython/nviz/mapwindow.py", line
383, in DoPaint

self.lmgr.nviz.UpdatePage('view')
  File "/home/hamish/src/grass/svn/grass65/dist.x86_64
-unknown-linux-gnu/etc/wxpython/nviz/tools.py", line 4233,
in UpdatePage

hmin,hmax)
  File "/usr/lib64/python2.6/dist-
packages/wx-2.8-gtk2-unicode/wx/_controls.py", line 2692, in
SetRange

return _controls_.Slider_SetRange(*args, **kwargs)
OverflowError
:
long int too large to convert to int
Traceback (most recent call last):
  File "/home/hamish/src/grass/svn/grass65/dist.x86_64
-unknown-linux-gnu/etc/wxpython/nviz/mapwindow.py", line
366, in OnPaint

self.DoPaint()
  File "/home/hamish/src/grass/svn/grass65/dist.x86_64
-unknown-linux-gnu/etc/wxpython/nviz/mapwindow.py", line
383, in DoPaint

self.lmgr.nviz.UpdatePage('view')
  File "/home/hamish/src/grass/svn/grass65/dist.x86_64
-unknown-linux-gnu/etc/wxpython/nviz/tools.py", line 4233,
in UpdatePage

hmin,hmax)
  File "/usr/lib64/python2.6/dist-
packages/wx-2.8-gtk2-unicode/wx/_controls.py", line 2692, in
SetRange

return _controls_.Slider_SetRange(*args, **kwargs)
OverflowError
:
cannot convert float infinity to integer
Traceback (most recent call last):
  File "/home/hamish/src/grass/svn/grass65/dist.x86_64
-unknown-linux-gnu/etc/wxpython/nviz/mapwindow.py", line
366, in OnPaint

self.DoPaint()
  File "/home/hamish/src/grass/svn/grass65/dist.x86_64
-unknown-linux-gnu/etc/wxpython/nviz/mapwindow.py", line
383, in DoPaint

self.lmgr.nviz.UpdatePage('view')
  File "/home/hamish/src/grass/svn/grass65/dist.x86_64
-unknown-linux-gnu/etc/wxpython/nviz/tools.py", line 4233,
in UpdatePage

hmin,hmax)
  File "/usr/lib64/python2.6/dist-
packages/wx-2.8-gtk2-unicode/wx/_controls.py", line 2692, in
SetRange

return _controls_.Slider_SetRange(*args, **kwargs)
OverflowError
:
cannot convert float infinity to integer
Traceback (most recent call last):
  File "/home/hamish/src/grass/svn/grass65/dist.x86_64
-unknown-linux-gnu/etc/wxpython/nviz/mapwindow.py", line
366, in OnPaint

self.DoPaint()
  File "/home/hamish/src/grass/svn/grass65/dist.x86_64
-unknown-linux-gnu/etc/wxpython/nviz/mapwindow.py", line
383, in DoPaint

self.lmgr.nviz.UpdatePage('view')
  File "/home/hamish/src/grass/svn/grass65/dist.x86_64
-unknown-linux-gnu/etc/wxpython/nviz/tools.py", line 4233,
in UpdatePage

hmin,hmax)
  File "/usr/lib64/python2.6/dist-
packages/wx-2.8-gtk2-unicode/wx/_controls.py", line 2692, in
SetRange

return _controls_.Slider_SetRange(*args, **kwargs)
OverflowError
:
cannot convert float infinity to integer

thanks, Hamish

Attachments (1)

wxNviz_layer_dragging.jpg (172.2 KB ) - added by hamish 11 years ago.
weird line rendering

Download all attachments as: .zip

Change History (18)

in reply to:  description ; comment:1 by annakrat, 11 years ago

Replying to hamish:

Hi,

testing wxNVIZ in latest 6.5svn, I get an error and 100% CPU use if I select '3D view' in the map display window with just a vector map selected. (also tried with a 3D vector map, same thing) happens both on my linux and Wingrass-VM. It's recoverable once you switch back to '2D view' mode.

one possible solution is in the case of no raster tell nviz to create a new constant surface at z=0 with 50% transparency. (or at least that's the trick with tcl/tk nviz + no raster to drape things on)

It seems that this is already done. Try r56122 which should fix the traceback.

in reply to:  1 ; comment:2 by annakrat, 11 years ago

Replying to annakrat:

It seems that this is already done. Try r56122 which should fix the traceback.

Seems to be working. Please confirm and I will backport it.

in reply to:  2 ; comment:3 by neteler, 11 years ago

Replying to annakrat:

Seems to be working. Please confirm and I will backport it.

Hamish, does it now for you?

in reply to:  3 ; comment:4 by hellik, 11 years ago

Replying to neteler:

Replying to annakrat:

Seems to be working. Please confirm and I will backport it.

Hamish, does it now for you?

tested here with

GRASS version: 6.5.svn                                                          
GRASS SVN Revision: 56422                                                       
GIS Library Revision: 50936 (2012-02-25)                                        
GDAL/OGR: 1.9.2                                                                 
PROJ4: Rel. 4.8.0, 6 March 2012                                                 
Python: 2.7.4                                                                   
wxPython: 2.8.12.1                                                              
Platform: Windows-7-6.1.7601-SP1 (OSGeo4W)  

and nc-hospitals, it works

in reply to:  4 comment:5 by hellik, 11 years ago

Replying to hellik:

and nc-hospitals, it works

also with nc-streams, but not with nc-lakes

comment:6 by hamish, 11 years ago

Hi,

it's better for points now, thanks, but still some small tweaks needed elsewhere. comments as I go:

tested Spearfish's bugsites map in devbr6, looked ok. when tested in the old 6.4.3svn version only a thin line rendered until I moved the z-exaggeration slider off 0.0 to 1.0. (which seems like a nice default)

fwiw there doesn't seem to be a need to abbreviate exaggeration to exag. since there is lots of space to the right of it for the text.

restarting the GUI in devbr6 and adding Spearfish's roads did not go well, nothing rendered, lots of this repeating in the terminal:

(.:25449): Gtk-CRITICAL : gtk_range_set_range: assertion `min < max' failed

and endless repeating tracebacks:

Traceback (most recent call last):
  File "/home/hamish/src/grass/svn/grass65/dist.x86_64
-unknown-linux-gnu/etc/wxpython/nviz/mapwindow.py", line
366, in OnPaint

self.DoPaint()
  File "/home/hamish/src/grass/svn/grass65/dist.x86_64
-unknown-linux-gnu/etc/wxpython/nviz/mapwindow.py", line
385, in DoPaint

self.lmgr.nviz.UpdatePage('cplane')
  File "/home/hamish/src/grass/svn/grass65/dist.x86_64
-unknown-linux-gnu/etc/wxpython/nviz/tools.py", line 4315,
in UpdatePage

self.FindWindowById(self.win['cplane']['position']['z']['sli
der']).SetRange(zRange[0], zRange[1])
  File "/usr/lib64/python2.6/dist-
packages/wx-2.8-gtk2-unicode/wx/_controls.py", line 2692, in
SetRange

return _controls_.Slider_SetRange(*args, **kwargs)
OverflowError
:
in method 'Slider_SetRange', expected argument 2 of type
'int'

on going back to 2D mode:

self.DoPaint()
  File "/home/hamish/src/grass/svn/grass65/dist.x86_64
-unknown-linux-gnu/etc/wxpython/nviz/mapwindow.py", line
385, in DoPaint

self.lmgr.nviz.UpdatePage('cplane')
  File "/home/hamish/src/grass/svn/grass65/dist.x86_64
-unknown-linux-gnu/etc/wxpython/nviz/tools.py", line 4315,
in UpdatePage

self.FindWindowById(self.win['cplane']['position']['z']['sli
der']).SetRange(zRange[0], zRange[1])
  File "/usr/lib64/python2.6/dist-
packages/wx-2.8-gtk2-unicode/wx/_controls.py", line 2692, in
SetRange

return _controls_.Slider_SetRange(*args, **kwargs)
OverflowError
:
long int too large to convert to int
Switching back to 2D view mode...                                               
Vector map <roads@PERMANENT> (lines) unloaded successfully                      
Traceback (most recent call last):
  File "/home/hamish/src/grass/svn/grass65/dist.x86_64
-unknown-linux-gnu/etc/wxpython/nviz/mapwindow.py", line
366, in OnPaint

self.DoPaint()
  File "/home/hamish/src/grass/svn/grass65/dist.x86_64
-unknown-linux-gnu/etc/wxpython/nviz/mapwindow.py", line
385, in DoPaint

self.lmgr.nviz.UpdatePage('cplane')
  File "/home/hamish/src/grass/svn/grass65/dist.x86_64
-unknown-linux-gnu/etc/wxpython/nviz/tools.py", line 4315,
in UpdatePage

self.FindWindowById(self.win['cplane']['position']['z']['sli
der']).SetRange(zRange[0], zRange[1])
  File "/usr/lib64/python2.6/dist-
packages/wx-2.8-gtk2-unicode/wx/_controls.py", line 2692, in
SetRange

return _controls_.Slider_SetRange(*args, **kwargs)
OverflowError
:
long int too large to convert to int
Traceback (most recent call last):
  File "/home/hamish/src/grass/svn/grass65/dist.x86_64
-unknown-linux-gnu/etc/wxpython/nviz/mapwindow.py", line
366, in OnPaint

self.DoPaint()
  File "/home/hamish/src/grass/svn/grass65/dist.x86_64
-unknown-linux-gnu/etc/wxpython/nviz/mapwindow.py", line
376, in DoPaint

self.LoadDataLayers()
  File "/home/hamish/src/grass/svn/grass65/dist.x86_64
-unknown-linux-gnu/etc/wxpython/nviz/mapwindow.py", line
1311, in LoadDataLayers

npoints, nlines, nfeatures, mapIs3D =
self.lmgr.nviz.VectorInfo(layer)
  File "/usr/lib64/python2.6/dist-
packages/wx-2.8-gtk2-unicode/wx/_core.py", line 14564, in
__getattr__

raise PyDeadObjectError(self.attrStr % self._name)
wx._core
.
PyDeadObjectError
:
The C++ part of the NvizToolWindow object has been deleted,
attribute access no longer allowed.

Spearfish geology (area) did not render at all. Perhaps it could check 'v.info -t' via vector.vector_info_topo() and if a vector map containing area features is loaded pop up a warning and offer to render the boundaries-as-lines instead?

Going to the wxNVIZ Data tab at that point and trying to add a raster didn't work, the drop down showed the current mapset and PERMANENT, but no maps within them and no '>' triangle or so to click to expand them. I supposed that's what MarkusN experienced too, that list will only show raster maps already listed in the current Map Display's layer listing.

Once I've gone back and added it to the layer list it appears, but I can't edit its attributes-- changing the fine and coarse resolution had no effect. (could the fine resolution be made a little bit (~20-30%) finer by default?)

Traceback (most recent call last):
  File "/home/hamish/src/grass/svn/relbr_6_4/dist.x86_64
-unknown-linux-gnu/etc/wxpython/nviz/tools.py", line 2658,
in OnSetRaster

self.UpdateSurfacePage(layer, data, updateName = False)
  File "/home/hamish/src/grass/svn/relbr_6_4/dist.x86_64
-unknown-linux-gnu/etc/wxpython/nviz/tools.py", line 4443,
in UpdateSurfacePage

self.OnSurfaceAxis(None)
  File "/home/hamish/src/grass/svn/relbr_6_4/dist.x86_64
-unknown-linux-gnu/etc/wxpython/nviz/tools.py", line 3153,
in OnSurfaceAxis

id = data['surface']['object']['id']
KeyError
:
'object'

and then if I manually go to the Data tab -> Vector controls and tick the box to have it render on the newly selected raster map, it stays at z=0 below. "Height above surface" there also appears to work as a multiplier, not in map units? but of what? the archsites map is not 3D. the cat number? interesting raindrop effect, but not so good for accurate alignment.

thanks, Hamish

ps- Perspective still needs a hard upper-bound at 180 degrees. currently if you type e.g. 325 degrees in the box and move the slider you can see where it crosses over itself and the geometry inverts. interesting, but not really usable.

in reply to:  6 ; comment:7 by annakrat, 11 years ago

Replying to hamish:

Hi,

it's better for points now, thanks, but still some small tweaks needed elsewhere. comments as I go:

some changes applied in grass7 (the code for all branches is almost the same)

tested Spearfish's bugsites map in devbr6, looked ok. when tested in the old 6.4.3svn version only a thin line rendered until I moved the z-exaggeration slider off 0.0 to 1.0. (which seems like a nice default)

bug in ogsf zexag guess (r56496) fixed

fwiw there doesn't seem to be a need to abbreviate exaggeration to exag. since there is lots of space to the right of it for the text.

restarting the GUI in devbr6 and adding Spearfish's roads did not go well, nothing rendered, lots of this repeating in the terminal:

(.:25449): Gtk-CRITICAL : gtk_range_set_range: assertion `min < max' failed

and endless repeating tracebacks:

please test r56500

Spearfish geology (area) did not render at all. Perhaps it could check 'v.info -t' via vector.vector_info_topo() and if a vector map containing area features is loaded pop up a warning and offer to render the boundaries-as-lines instead?

It displays now boundaries by default, centroids can be activated too (r56495, r56497).

Going to the wxNVIZ Data tab at that point and trying to add a raster didn't work, the drop down showed the current mapset and PERMANENT, but no maps within them and no '>' triangle or so to click to expand them. I supposed that's what MarkusN experienced too, that list will only show raster maps already listed in the current Map Display's layer listing.

Once I've gone back and added it to the layer list it appears, but I can't edit its attributes-- changing the fine and coarse resolution had no effect. (could the fine resolution be made a little bit (~20-30%) finer by default?)

sorry, I cannot reproduce but I know that this error sometimes appears

in reply to:  6 ; comment:8 by annakrat, 11 years ago

Replying to hamish:

and then if I manually go to the Data tab -> Vector controls and tick the box to have it render on the newly selected raster map, it stays at z=0 below. "Height above surface" there also appears to work as a multiplier, not in map units? but of what? the archsites map is not 3D. the cat number? interesting raindrop effect, but not so good for accurate alignment.

It should be in map units. The problem appears only when there is no surface to drape the points on. Should be fixed in r56515.

thanks, Hamish

ps- Perspective still needs a hard upper-bound at 180 degrees. currently if you type e.g. 325 degrees in the box and move the slider you can see where it crosses over itself and the geometry inverts. interesting, but not really usable.

done in r56514

if you confirm that these fixes help, I will backport them.

in reply to:  8 comment:9 by hamish, 11 years ago

Replying to annakrat:

Replying to hamish:

and then if I manually go to the Data tab -> Vector controls and tick the box to have it render on the newly selected raster map, it stays at z=0 below. "Height above surface" there also appears to work as a multiplier, not in map units? but of what? the archsites map is not 3D. the cat number? interesting raindrop effect, but not so good for accurate alignment.

It should be in map units. The problem appears only when there is no surface to drape the points on. Should be fixed in r56515.

ps- Perspective still needs a hard upper-bound at 180 degrees. currently if you type e.g. 325 degrees in the box and move the slider you can see where it crosses over itself and the geometry inverts. interesting, but not really usable.

done in r56514

if you confirm that these fixes help, I will backport them.

Hi,

I tested both of these in trunk, seems ok.

I also tested adding points without a surface, the first time I again got the repeating "Gtk-CRITICAL : gtk_range_set_range: assertion `min < max'" in the terminal, but quitting the gui and restarting it then worked. I'll try to test that more later.

thanks, Hamish

comment:10 by hamish, 11 years ago

Hi,

here's a traceback if I load a raster then a vector-areas map in 2D mode, switch to 3D mode, then change the order of the two in the layer list in the Map Layers tab by dragging the vector map to the bottom of the list:

Starting 3D view mode...                                                        
Loading raster map <elevation.10m@PERMANENT>...
Loading raster map <elevation.10m@PERMANENT>...
Translating colors from raster map
<elevation.10m@PERMANENT>...
Vector map <fields7@grass7> loaded (261 features)
Traceback (most recent call last):
  File "/home/hamish/src/grass/svn/trunk/dist.x86_64
-unknown-linux-gnu/etc/gui/wxpython/lmgr/layertree.py", line
1303, in OnChangeSel

if self.layer_selected.IsChecked():
AttributeError
:
'NoneType' object has no attribute 'IsChecked'
Raster map <elevation.10m@PERMANENT> unloaded successfully                      
Vector map <fields7@grass7> (lines) unloaded successfully                       
Traceback (most recent call last):
  File "/home/hamish/src/grass/svn/trunk/dist.x86_64
-unknown-linux-gnu/etc/gui/wxpython/lmgr/layertree.py", line
1202, in OnLayerChecked

npoints, nlines, nfeatures, mapIs3D =
self.lmgr.nviz.VectorInfo(mapLayer)
AttributeError
:
'NvizToolWindow' object has no attribute 'VectorInfo'
Traceback (most recent call last):
  File "/home/hamish/src/grass/svn/trunk/dist.x86_64
-unknown-linux-gnu/etc/gui/wxpython/lmgr/layertree.py", line
1311, in OnChangeSel

self.lmgr.nviz.UpdatePage('vector')
  File "/home/hamish/src/grass/svn/trunk/dist.x86_64
-unknown-linux-gnu/etc/gui/wxpython/nviz/tools.py", line
4520, in UpdatePage

self.UpdateVectorPage(layer, data['vector'])
  File "/home/hamish/src/grass/svn/trunk/dist.x86_64
-unknown-linux-gnu/etc/gui/wxpython/nviz/tools.py", line
4710, in UpdateVectorPage

vInfo = grass.vector_info_topo(layer.GetName())
AttributeError
:
'NoneType' object has no attribute 'GetName'
Vector map <fields7@grass7> loaded (261 features)
Loading raster map <elevation.10m@PERMANENT>...
Loading raster map <elevation.10m@PERMANENT>...
Translating colors from raster map
<elevation.10m@PERMANENT>...

thanks, Hamish

in reply to:  7 ; comment:11 by hamish, 11 years ago

Replying to annakrat:

Replying to hamish:

restarting the GUI in devbr6 and adding Spearfish's roads did not go well, nothing rendered, lots of this repeating in the terminal:

(.:25449): Gtk-CRITICAL : gtk_range_set_range: assertion `min < max' failed

and endless repeating tracebacks:

please test r56500

still happens.

grass7, start g.gui, add roads vector map, go to 3d mode:

Starting 3D view mode...                                                        
Vector map <roads7@grass7> loaded (746 features)
Traceback (most recent call last):
  File "/home/hamish/src/grass/svn/trunk/dist.x86_64
-unknown-linux-gnu/etc/gui/wxpython/nviz/mapwindow.py", line
376, in OnPaint

self.DoPaint()
  File "/home/hamish/src/grass/svn/trunk/dist.x86_64
-unknown-linux-gnu/etc/gui/wxpython/nviz/mapwindow.py", line
398, in DoPaint

self.lmgr.nviz.UpdatePage('cplane')
  File "/home/hamish/src/grass/svn/trunk/dist.x86_64
-unknown-linux-gnu/etc/gui/wxpython/nviz/tools.py", line
4570, in UpdatePage

self.FindWindowById(self.win['cplane']['position']['z']['sli
der']).SetValue(zRange[0])
  File "/usr/lib64/python2.6/dist-
packages/wx-2.8-gtk2-unicode/wx/_controls.py", line 2672, in
SetValue

return _controls_.Slider_SetValue(*args, **kwargs)
OverflowError
:
long int too large to convert to int
Traceback (most recent call last):
  File "/home/hamish/src/grass/svn/trunk/dist.x86_64
-unknown-linux-gnu/etc/gui/wxpython/nviz/mapwindow.py", line
376, in OnPaint

self.DoPaint()
  File "/home/hamish/src/grass/svn/trunk/dist.x86_64
-unknown-linux-gnu/etc/gui/wxpython/nviz/mapwindow.py", line
398, in DoPaint

[...]

packages/wx-2.8-gtk2-unicode/wx/_controls.py", line 2672, in
SetValue

return _controls_.Slider_SetValue(*args, **kwargs)
OverflowError
:
long int too large to convert to int


Switching back to 2D view mode...                                               


Vector map <roads7@grass7> (lines) unloaded successfully                        
Vector map <roads7@grass7> loaded (746 features)
Traceback (most recent call last):
  File "/home/hamish/src/grass/svn/trunk/dist.x86_64
-unknown-linux-gnu/etc/gui/wxpython/nviz/mapwindow.py", line
376, in OnPaint

self.DoPaint()
  File "/home/hamish/src/grass/svn/trunk/dist.x86_64
-unknown-linux-gnu/etc/gui/wxpython/nviz/mapwindow.py", line
389, in DoPaint

self.LoadDataLayers()
  File "/home/hamish/src/grass/svn/trunk/dist.x86_64
-unknown-linux-gnu/etc/gui/wxpython/nviz/mapwindow.py", line
1327, in LoadDataLayers

self.LoadVector(item, points = False)
  File "/home/hamish/src/grass/svn/trunk/dist.x86_64
-unknown-linux-gnu/etc/gui/wxpython/nviz/mapwindow.py", line
1734, in LoadVector

toolWin.UpdatePage('vector')
  File "/usr/lib64/python2.6/dist-
packages/wx-2.8-gtk2-unicode/wx/_core.py", line 14564, in
__getattr__

raise PyDeadObjectError(self.attrStr % self._name)
wx._core
.
PyDeadObjectError
:
The C++ part of the NvizToolWindow object has been deleted,
attribute access no longer allowed.

thanks, Hamish

in reply to:  8 comment:12 by annakrat, 11 years ago

Replying to annakrat:

if you confirm that these fixes help, I will backport them.

done

in reply to:  11 comment:13 by annakrat, 11 years ago

Replying to hamish:

Replying to annakrat:

Replying to hamish:

restarting the GUI in devbr6 and adding Spearfish's roads did not go well, nothing rendered, lots of this repeating in the terminal:

(.:25449): Gtk-CRITICAL : gtk_range_set_range: assertion `min < max' failed

and endless repeating tracebacks:

please test r56500

still happens.

grass7, start g.gui, add roads vector map, go to 3d mode:

Starting 3D view mode...                                                        
Vector map <roads7@grass7> loaded (746 features)
Traceback (most recent call last):
  File "/home/hamish/src/grass/svn/trunk/dist.x86_64
-unknown-linux-gnu/etc/gui/wxpython/nviz/mapwindow.py", line
376, in OnPaint

self.DoPaint()
  File "/home/hamish/src/grass/svn/trunk/dist.x86_64
-unknown-linux-gnu/etc/gui/wxpython/nviz/mapwindow.py", line
398, in DoPaint

self.lmgr.nviz.UpdatePage('cplane')
  File "/home/hamish/src/grass/svn/trunk/dist.x86_64
-unknown-linux-gnu/etc/gui/wxpython/nviz/tools.py", line
4570, in UpdatePage

self.FindWindowById(self.win['cplane']['position']['z']['sli
der']).SetValue(zRange[0])
  File "/usr/lib64/python2.6/dist-
packages/wx-2.8-gtk2-unicode/wx/_controls.py", line 2672, in
SetValue

return _controls_.Slider_SetValue(*args, **kwargs)
OverflowError
:
long int too large to convert to int

please try r56560

in reply to:  10 comment:14 by annakrat, 11 years ago

Replying to hamish:

Hi,

here's a traceback if I load a raster then a vector-areas map in 2D mode, switch to 3D mode, then change the order of the two in the layer list in the Map Layers tab by dragging the vector map to the bottom of the list:

please try r56551

comment:15 by hamish, 11 years ago

Hi Anna,

the two fixes (r56560 and r56551) seem good, thanks.

more testing...

adding a vector points map to the 'Map layers' list after there is already a vector area map open in 3D mode tries to load a points map as a lines map and fails:

Starting 3D view mode...                                                        
Vector map <fields7@grass7> loaded (261 features)
Vector map <arch_pts@grass7> loaded (24 points)
No features from vector map <arch_pts@grass7> fall within
current region
Error loading vector map <arch_pts@grass7>
Loading vector map <arch_pts@grass7> (lines) failed                             

(but then the points render ok anyway and get added to the Data vector controls correctly)


I don't have much interest in displaying centroids, but for the sake of testing them, with the vector area and a points map already loaded, go back to the Map Layers tab and edit the d.vect preferences for the area map to show centroids too:

Traceback (most recent call last):
  File "/home/hamish/src/grass/svn/trunk/dist.x86_64
-unknown-linux-gnu/etc/gui/wxpython/gui_core/forms.py", line
654, in OnOK

cmd = self.OnApply(event)
  File "/home/hamish/src/grass/svn/trunk/dist.x86_64
-unknown-linux-gnu/etc/gui/wxpython/gui_core/forms.py", line
669, in OnApply

self)
  File "/home/hamish/src/grass/svn/trunk/dist.x86_64
-unknown-linux-gnu/etc/gui/wxpython/lmgr/layertree.py", line
1521, in GetOptData

if mapWin.IsLoaded(layer):
  File "/home/hamish/src/grass/svn/trunk/dist.x86_64
-unknown-linux-gnu/etc/gui/wxpython/nviz/mapwindow.py", line
1267, in IsLoaded

if 'object' not in data['vlines'] and \
KeyError
:
'vlines'

some other observations & 2c feedback:

perhaps make the default line width 1; width=2 looks a bit "nibbled" (see screenshot), even after raising the height above surface by about $nsres distance.

perhaps make the default line color a little more muted (aqua?)

perhaps make the default raster fine/coarse resolution 20-30% finer and/or perhaps set the default coarse mode back to wire-frame.

dragging layers around in the Map layers tab while in 3D view mode is a bit clunky. afterwards I got a weird mix in the vector roads map of some lines as the default blue,size=2 and others the modified aqua,size=1 I did before loading the raster layer. (see screenshot)

you'll also notice in the screenshot a red-trail in the top right. that always follows my mouse around, it disappears as soon as I move the view-puck. shrug. (open source radeon driver on debian/squeeze)

rotate 3D mode is highly sensitive to mouse movement. fly-through mode next door is very very slow to react. the normal Pan button seems to do nothing other than redraw the scene as-is. (maybe have it "Look: [here]" ?) hmm, after that fly-through mode no longer works..

for Animation, perhaps make the default file format PPM instead of TIF, as that is what the encoders will generally want as input. consider to add a help button to the animation page, with a link to the "Movies" grass wiki page for tips on encoding to .avi, .gif, etc.

thanks, Hamish

by hamish, 11 years ago

Attachment: wxNviz_layer_dragging.jpg added

weird line rendering

in reply to:  15 comment:16 by annakrat, 11 years ago

Replying to hamish:

Hi Anna,

the two fixes (r56560 and r56551) seem good, thanks.

backported

I don't have much interest in displaying centroids, but for the sake of testing them, with the vector area and a points map already loaded, go back to the Map Layers tab and edit the d.vect preferences for the area map to show centroids too:

The error is fixed in r56578. However showing centroids is controlled on 3d view vector page - check load points checkbox


some other observations & 2c feedback:

perhaps make the default line width 1; width=2 looks a bit "nibbled" (see screenshot), even after raising the height above surface by about $nsres distance.

perhaps make the default line color a little more muted (aqua?)

perhaps make the default raster fine/coarse resolution 20-30% finer and/or perhaps set the default coarse mode back to wire-frame.

Some of the default values can be set in 3d view settings.

dragging layers around in the Map layers tab while in 3D view mode is a bit clunky. afterwards I got a weird mix in the vector roads map of some lines as the default blue,size=2 and others the modified aqua,size=1 I did before loading the raster layer. (see screenshot)

you'll also notice in the screenshot a red-trail in the top right. that always follows my mouse around, it disappears as soon as I move the view-puck. shrug. (open source radeon driver on debian/squeeze)

rotate 3D mode is highly sensitive to mouse movement. fly-through mode next door is very very slow to react. the normal Pan button seems to do nothing other than redraw the scene as-is. (maybe have it "Look: [here]" ?) hmm, after that fly-through mode no longer works..

these things are quite experimental but the pan button should work (not really panning but it changes focus)

This ticket is fixed (in terms of the initial problem).

comment:17 by wenzeslaus, 10 years ago

Resolution: fixed
Status: newclosed

Original issues fixed and backported according to comment:16, closing as fixed. Please open new separate tickets if other issues still apply or if you have feature requests.

Note: See TracTickets for help on using tickets.