[GRASS5] [bug #979] (grass) NVIZ Load / Save 3-D Settings doesn't work

this bug's URL: http://intevation.de/rt/webrt?serial_num=979
-------------------------------------------------------------------------

Subject: NVIZ Load / Save 3-D Settings doesn't work

Platform: SGI/Irix
grass downloaded at: CVS Server, Germany
grass binary for platform: I compiled the sources myself
grass sources source: GRASS 5.0.0pre3

Load / Save 3-D Settings option in File menu in NVIZ is disabled (and doesn't work).
It is mentioned in the tcl/tk source file that these options are disabled because they are buggy; I tried enabling them just to try but loading a 3d view has no effect on the position settings in NVIZ.
NVIZ is of no use for my work without accurate observer position settings (easting, northing, elevation, field of view etc.) and I am currently using SG3d and GRASS 4.3 with reasonably successful results (SG3d can read the 3dview files created either manually or with d.3d, which enable a lot of control over the exact observer position).
However I would very much like to make use of the 3-D vectors in GRASS 5.1; for this I need NVIZ and also the missing advanced positioning functionality.

Perhaps in a year or so's time I may be in a position to fix the problem myself, but at the minute I would be out of my depth: beyond the tcl/tk functions, there are several layers of nested function calls back through the gsurf library to the low-level G_get_3dview and G_save_3dview that SG3d and d.3d use.

I am quite surprised that such an obvious piece of functionality is still missing, but perhaps exact positioning is not important for geographical applications? (I am approaching this from an engineering background). I hope anyway that submitting this to the bugtracker will bring it more to the forefront of attention of the relevant person.

Paul Kelly

-------------------------------------------- Managed by Request Tracker

Request Tracker wrote:

this bug's URL: http://intevation.de/rt/webrt?serial_num=979
-------------------------------------------------------------------------

Subject: NVIZ Load / Save 3-D Settings doesn't work

Platform: SGI/Irix
grass downloaded at: CVS Server, Germany
grass binary for platform: I compiled the sources myself
grass sources source: GRASS 5.0.0pre3

Load / Save 3-D Settings option in File menu in NVIZ is disabled (and doesn't work).

It works here on LINUX. We use it all the time. Are you sure that you are using GRASS 5.0.0pre3?

It is mentioned in the tcl/tk source file that these options are disabled because they are buggy; I tried enabling them just to try but loading a 3d view has no effect on the position settings in NVIZ.

It saves not only the position settings but also the size of widnows and lot of other things so you can start exactly
where you left it. It sounds like you are using some old version of NVIZ. Note that the NVIZ state file is NOT the 3dview file.

NVIZ is of no use for my work without accurate observer position settings (easting, northing, elevation, field of view etc.) and I am currently using SG3d and GRASS 4.3 with reasonably successful results (SG3d can read the 3dview files created either manually or with d.3d, which enable a lot of control over the exact observer position).
However I would very much like to make use of the 3-D vectors in GRASS 5.1; for this I need NVIZ and also the missing advanced positioning functionality.

saving state in NVIZ is much better now that it was for SG3d (it saves also the vectors and sites and lot of other settings
that SG3d did not save). As I said, this it is not saved in 3dview file but in a separate file - I usually store it in a directory along with
the images - so it is not stored in GRASS database as 3dview was. Just save one file with your favourite settings and
then you can modify it manually

Perhaps in a year or so's time I may be in a position to fix the problem myself, but at the minute I would be out of my depth: beyond the tcl/tk functions, there are several layers of nested function calls back through the gsurf library to the low-level G_get_3dview and G_save_3dview that SG3d and d.3d use.

This is one thing that bothers me about the NVIZ design. One reason for re-designing SG3d to NVIZ by developing gsurf library
was to make the development of enhancements, customization and development of various interfaces easier.
However, it seems the the result is just the opposite. While adding such features as a wide range of possibilities to display sites,
displaying scale and legends or adding volumes to SG3d was possible and was done relatively quickly, it seems to be
extremely complex if not next to impossible in the current structure of NVIZ code.

I am quite surprised that such an obvious piece of functionality is still missing, but perhaps exact positioning is not important for geographical applications? (I am approaching this from an engineering background). I hope anyway that submitting this to the bugtracker will bring it more to the forefront of attention of the relevant person.

exact positioning and saving the state is absolutely crucial for GIS applications and it is functional, so please first check
the version of NVIZ that you are using and then if it is up to date and still does not work it may be an SGI specific issue
(we can check with Bill Brown whether he has it working as I am not using SGI any more). Or you are trying to load 3dview
fiel instead of nviz state file.

Paul Kelly

-------------------------------------------- Managed by Request Tracker
_______________________________________________
grass5 mailing list
grass5@grass.itc.it
http://grass.itc.it/mailman/listinfo/grass5

On Mon, 25 Mar 2002, Helena Mitasova wrote:

saving state in NVIZ is much better now that it was for SG3d (it saves also the vectors and sites and lot of other settings
that SG3d did not save). As I said, this it is not saved in 3dview file but in a separate file - I usually store it in a directory along with
the images - so it is not stored in GRASS database as 3dview was. Just save one file with your favourite settings and
then you can modify it manually

Well yes it is the 3dview file (saved in the GRASS database) I am talking
about, not the NVIZ state file (saved in the current working directory).

My application is, for example: I am standing at a point with known
easting and northing (either from GPS or I just stand beside an easily
recognisable landmark that I can check on a map) and I take a
photograph. I know the roll, pitch and yaw angles (the direction the
camera is pointing) so I can calculate where the centre of view is. The
camera has also been calibrated so I know its field of view. I can then
take all these parameters, manually enter them into a 3dview file and save
it in the 3d.view directory in the GRASS database. When I load this 3dview
file in SG3d it will then draw the landscape as seen by my camera, and I
can compare the real image and GIS 3-D view and do my further analyses as
necessary.

I studied the NVIZ state file format a while ago and I can not see any
easy way of entering the same parameters. As far as I can see all the
values in the NVIZ state file are sort of referenced to the current region
and resolution; the centre of view is specified explicitly and then the
observer position is specified as a distance and direction vector with
respect to the centre of view.

It may be possible to calculate the correct values of these parameters
from the values in the 3dview file but it is beyond me (presumably that is
what the disabled 'Load 3dview' function is supposed to do).

> Perhaps in a year or so's time I may be in a position to fix the problem
> myself, but at the minute I would be out of my depth: beyond the tcl/tk
> functions, there are several layers of nested function calls back through
> the gsurf library to the low-level G_get_3dview and G_save_3dview that SG3d
> and d.3d use.

This is one thing that bothers me about the NVIZ design. One reason for re-designing SG3d to NVIZ by developing gsurf library
was to make the development of enhancements, customization and development of various interfaces easier.
However, it seems the the result is just the opposite. While adding such features as a wide range of possibilities to display sites,
displaying scale and legends or adding volumes to SG3d was possible and was done relatively quickly, it seems to be
extremely complex if not next to impossible in the current structure of NVIZ code.

I have been gaining that impression as well so it is good to see somebody
agrees. I have been experimenting with some modifications to SG3d and I
must say it is been very easy and clear to find the relevant pieces of
code, and easy to follow as it is all written in C.

exact positioning and saving the state is absolutely crucial for GIS applications and it is functional, so please first check
the version of NVIZ that you are using and then if it is up to date and still does not work it may be an SGI specific issue
(we can check with Bill Brown whether he has it working as I am not using SGI any more). Or you are trying to load 3dview
fiel instead of nviz state file.

Yes as said above I am looking to load a 'classic' 3dview file. I am
definitely using 5.0pre3. If there is an easier way of doing this I would
be very grateful to hear about it.

Thank you very much for the reply; your opinion is highly valued

Paul Kelly