WxNviz GSoC 2010: Difference between revisions

From GRASS-Wiki
Jump to navigation Jump to search
No edit summary
m (2011)
 
(86 intermediate revisions by the same user not shown)
Line 1: Line 1:
See [[wxNviz]] page.
See [[wxNviz]] page.


[http://trac.osgeo.org/grass/wiki/SoCProjects#wxNvizdevelopmentforenhanced34Dvisualizationandanalysis Accepted Google Summer of Code 2010 project], see also related [[WxNviz GSoC 2008|GSoC 2008]] page.
Accepted [http://trac.osgeo.org/grass/wiki/SoCProjects#wxNvizdevelopmentforenhanced34Dvisualizationandanalysis Google Summer of Code 2010] project, see also related [[WxNviz GSoC 2008|GSoC 2008]] and [[WxNviz GSoC 2011|GSoC 2011]] page.
{|class="border"
{| {{table}}
|Student Name: || [[User:Landa|Martin Landa]], [http://www.cvut.cz Czech University in Prague], PhD.
|Student Name: || [[User:Landa|Martin Landa]], [http://www.cvut.cz Czech University in Prague], PhD.
|-
|-
|Organization: || OSGeo - Open Source Geospatial Foundation
|Organization: || [http://www.osgeo.org OSGeo - Open Source Geospatial Foundation]
|-
|-
| Organization Home Page: || http://www.osgeo.org
| Mentor Name: || [http://www.meas.ncsu.edu/faculty/mitasova/mitasova.htm Helena Mitasova]
|-
| Mentor Name: || Helena Mitasova
|-
|-
| Title: || '''wxNviz development for enhanced 3/4D visualization and analysis'''
| Title: || '''wxNviz development for enhanced 3/4D visualization and analysis'''
|-
| Abstract: || The aim of this project is to design fully-featured 3D/4D visualization tool for GRASS GIS and to replace current old-fashioned TCL/TK Nviz. This project continues in Google Summer Of Code project from 2008 ("2.5/3D visualization tool for wxPython GRASS GUI"). The main goal of the project is implement (1) all missing features from wxNviz's predecessor TCL/TK-based Nviz; (2) new functionality including e.g. fog visualization; and finally (3) text displaying and styling in OGSF library.
|-
|-
|}
|}


;Abstract
::The aim of this project is to design fully-featured 3D/4D visualization tool for GRASS GIS and to replace current old-fashioned TCL/TK Nviz. This project continues in Google Summer Of Code project from 2008 ("2.5/3D visualization tool for wxPython GRASS GUI"). The main goal of the project is implement (1) all missing features from wxNviz's predecessor TCL/TK-based Nviz; (2) new functionality including e.g. fog visualization; and finally (3) text displaying and styling in OGSF library.
__TOC__
== Application ==
== Application ==


=== Introduction ===
=== Introduction ===


The aim of this project is to continue in wxNviz development and as a result to develop fully-featured 3D/4D vizualization tool for GRASS GIS. In detail, it meas to implement all missing features from wxNviz's predecessor TCL/TK-based Nviz and moreover to implement new functionality including e.g. fog vizualization in underlying GRASS OGSF library and it's wxPython front-end wxNviz and command-line tool nviz_cmd.
The aim of this project is to continue in [[wxNviz]] development and as a result to develop fully-featured 3D/4D vizualization tool for GRASS GIS. In detail, it meas to implement all missing features from wxNviz's predecessor TCL/TK-based {{cmd|nviz}} and moreover to implement new functionality including e.g. fog vizualization in underlying GRASS OGSF library and it's wxPython front-end wxNviz and command-line tool {{cmd|nviz_cmd}}.


=== Background ===
=== Background ===
Line 36: Line 36:


Additionally design and implementation of text displaying and styling in OGSF library (and it's front-end wxNVIZ) is planned.
Additionally design and implementation of text displaying and styling in OGSF library (and it's front-end wxNVIZ) is planned.
=== Project plan ===
{| {{table}}
|April 26 - May 23 || Bonding period
|-
|May 24 || Start to code, wxNviz & nviz_cmd bug-fixing period, save display to a graphic file
|-
|May 31 || Implement lighting
|-
|June 7 || Lighting continued
|-
| || <strike>Start working on decorations (labels, north arrow, scale bar, legend, fringe)</strike>
|-
|June 14 || Implement fringe
|-
| || <strike>Still working on decorations, implement also point symbols sized and colored based on attributes</strike>
|-
|June 21 || Implement data querying (rasters, vectors, volumes)
|-
|June 28 || Implement cutting planes, scaled difference
|-
|July 5 || Implement animations
|-
|July 12 || Implement scripting, including replacement for tool to generate images for dynamic surfaces
|-
|'''July 16''' || Mid-term evaluations deadline
|-
|July 19 || Better view settings controlling
|-
|July 26 || Fog support & vertical labels
|-
|August 2 || Final code & functionality review
|-
|August 9 || Write documentation, tutorials, etc.
|-
|August 16 || Final evaluation
|}
== Final Report ==
The main goal of this project hasn't been fulfilled completely. The
development of fully-featured 3D/4D visualization tool for GRASS GIS
started within [[WxNviz GSoC 2008|Google Summer of
Code 2008 project]] and continued during this summer.
The overview of the implemented functionality:
* Light control settings (see [http://grass.osgeo.org/wiki/File:Wxnviz-light.png screenshot])
* Fringes (see [http://grass.osgeo.org/wiki/File:Wxnviz-fringe.png screenshot])
* Raster querying (see [http://grass.osgeo.org/wiki/File:Wxnviz-raster-querying.png screenshot])
wxNVIZ GUI which has been designed in 2008 was integrated into [[WxGUI#Layer Manager 2|wxGUI
Layer Manager]] during this summer. This integration took much more time then has been
expected (see screenshot [http://grass.osgeo.org/wiki/File:Wxnviz-alpha-0.png before] and
[http://grass.osgeo.org/wiki/File:Wxnviz-lmgr.png after] integration). In the result some
planned features (see the [[WxNviz GSoC 2010#Project_plan|original project
plan]]) hasn't been implemented due to the lack of free time.
The list of missing functionality:
* Vector querying
* Cutting planes, scaled difference
* Animation, scripting
* Decorations, vertical labels
* Fog support
* Better view controlling
The result of this project is 3D visualization environment for
[[wxGUI]] which offers basic functionality to the users - displaying
raster data as surfaces, 2D/3D vector data, and 3D raster maps as
volumes (isosurfaces) in the 3D space. The user can control in the simple way the
view, lighting, and fringes.
This environment still doesn't work on MS Windows (see {{trac|1125}})
and miss some functionality compared to the original TCL/TK
{{cmd|version=64|nviz}}.
Anyway the author of this report is going to work on the missing features
during the next months. The goal is to complete wxNviz till the end of this
year (2010) and in the result to drop TCL/TK dependency in GRASS 7.0 (the original
{{cmd|version=64|nviz}} application is the only one remaining component in GRASS 7.0
which uses TCL/TK).
[[Image:Wxnviz-volumes.png|640px|thumb|center|wxGUI: Displaying raster (surface), 2D vector and 3D raster (volume) in the 3D space]]
* Overview of the commits (GRASS 7.0 - [http://trac.osgeo.org/grass/browser/grass/trunk trunk])
** [http://trac.osgeo.org/grass/log/grass/trunk/gui/wxpython/gui_modules/wxnviz.py?action=stop_on_copy&mode=stop_on_copy&rev=43153&stop_rev=42298&limit=500 gui/wxpython/gui_modules/wxnviz.py]
** [http://trac.osgeo.org/grass/log/grass/trunk/gui/wxpython/gui_modules/nviz_tools.py?action=stop_on_copy&mode=stop_on_copy&rev=43153&stop_rev=42346&limit=100 gui/wxpython/gui_modules/nviz_tools.py]
** [http://trac.osgeo.org/grass/log/grass/trunk/gui/wxpython/gui_modules/nviz_mapdisp.py?action=stop_on_copy&mode=stop_on_copy&rev=43153&stop_rev=42346&limit=100 gui/wxpython/gui_modules/nviz_mapdisp.py]
** [http://trac.osgeo.org/grass/log/grass/trunk/gui/wxpython/gui_modules/nviz_preferences.py?action=stop_on_copy&mode=stop_on_copy&rev=43153&stop_rev=42686&limit=100 gui/wxpython/gui_modules/nviz_preferences.py]
** [http://trac.osgeo.org/grass/log/grass/trunk/visualization/nviz2/cmd?action=stop_on_copy&mode=stop_on_copy&rev=43153&stop_rev=42365&limit=100 visualization/nviz2/cmd]
** [http://trac.osgeo.org/grass/log/grass/trunk/lib/nviz?action=stop_on_copy&mode=stop_on_copy&rev=43153&stop_rev=++%09+42519&limit=100 lib/nviz]
Source code also available at [http://code.google.com/p/google-summer-of-code-2010-osgeo/downloads/detail?name=Martin_Landa.tar.gz&can=2&q= code.google.com].
== Roadmap ==
* Lighting
** 80%
** Not fully working
* Decorations
** Postponed
* Fringe
** 80%
** Fix OGSF functions for generating fringes
* Data querying (rasters, vectors, volumes)
** 50%
** Only rasters
* Cutting planes, scaled difference
* Animations
* Scripting, including replacement for tool to generate images for dynamic surfaces
* Better view settings controlling
* Fog support & vertical labels
=== Week 0 (May 24) ===
* initial code clean up, bug-fixing
* recover settings notebook page
* save display to a graphic file - {{rev|42359}}
=== Week 1 (May 31) ===
* 3D view tools window integrated into Layer Manager (see screenshots bellow) - {{rev|42403}}
<center>
{|
|-
| [[Image:Wxnviz-alpha-0.png|250px|thumb|Standalone 3D view tools window (2008-06-27)]] ||
[[Image:Wxnviz-lmgr.png|250px|thumb|Integrated 3D view tools window (2010-05-31)]]
|-
|}
</center>
=== Week 2 (June 7) ===
* wxNviz GUI maintainance, bug-fixing period
=== Week 3 (June 14) ===
* Simple lighting control panel implemented
[[Image:Wxnviz-light.png|250px|thumb|center|Lighting control panel in Layer Manager (2010-06-17)]]
=== Week 4 (June 21) ===
* Fringe implemented in wxNviz and {{cmd|version=70|nviz_cmd}}
[[Image:Wxnviz-fringe.png|250px|thumb|center|Fringe control panel in Layer Manager (2010-06-23)]]
=== Week 5 (June 28) ===
* Basic raster (surface) querying implemented
[[Image:Wxnviz-raster-querying.png|250px|thumb|center|Raster querying (2010-07-01)]]
=== Week 6 (July 5) ===
* Bug-fixing/maintainance
=== Week 7 (July 12) ===
* Bug-fixing/maintainance
=== Week 8 (July 19) ===
* UI maintainance
=== Week 9 (July 26) ===
* UI maintainance
=== Week 10 (August 2) ===
* UI maintainance
[[Image:Wxnviz-redirect.png|250px|thumb|center|Redirect messages to wxGUI (2010-08-08)]]
=== Week 11 (August 9) ===
* Cleaning up the code
[[Image:Wxnviz-toolbar.jpg|frame|center|3D view toolbar (the new icons designed by Robert Szczepanek)]]


== Weekly Reports ==
== Weekly Reports ==
* [http://lists.osgeo.org/pipermail/grass-dev/2010-May/050614.html #0 (2010/05/24)]
* [http://lists.osgeo.org/pipermail/grass-dev/2010-June/050685.html #1 (2010/06/01)]
* [http://lists.osgeo.org/pipermail/grass-dev/2010-June/050794.html #2 (2010/06/08)]
* [http://lists.osgeo.org/pipermail/grass-dev/2010-June/050910.html #3 (2010/06/17)]
* [http://lists.osgeo.org/pipermail/grass-dev/2010-June/050996.html #4 (2010/06/23)]
* [http://lists.osgeo.org/pipermail/grass-dev/2010-July/051162.html #5 (2010/07/10)]
* [http://lists.osgeo.org/pipermail/grass-dev/2010-July/051342.html #6 (2010/07/25)]
* [http://lists.osgeo.org/pipermail/grass-dev/2010-August/051541.html #7 (2010/08/12)]
== Source code ==
'''Note:''' Development of wxNviz is done in [http://trac.osgeo.org/grass/wiki/DownloadSource#GRASS7 trunk] (GRASS 7.0) and [http://trac.osgeo.org/grass/wiki/DownloadSource#GRASS6.5 devbr6] (GRASS 6.5). wxNviz in GRASS 6.4 is frozen due to RC stage.
=== GRASS 7.0 ===
* {{src|gui/wxpython/gui_modules/wxnviz.py|branch=trunk}}
* {{src|gui/wxpython/gui_modules/nviz_tools.py|branch=trunk}}
* {{src|gui/wxpython/gui_modules/nviz_mapdisp.py|branch=trunk}}
* {{src|gui/wxpython/gui_modules/nviz_preferences.py|branch=trunk}}
* {{src|visualization/nviz2/cmd|branch=trunk}}
* {{src|lib/nviz|branch=trunk}}
=== GRASS 6.5 ===
* {{src|gui/wxpython/gui_modules/wxnviz.py}}
* {{src|gui/wxpython/gui_modules/nviz_tools.py}}
* {{src|gui/wxpython/gui_modules/nviz_mapdisp.py}}
* {{src|gui/wxpython/gui_modules/nviz_preferences.py}}
* {{src|visualization/nviz2/cmd}}
* {{src|lib/nviz}}
{{wxGUI}}
{{wxGUI}}
[[Category: GSoC]]
{{GSoC}}

Latest revision as of 09:08, 28 May 2011

See wxNviz page.

Accepted Google Summer of Code 2010 project, see also related GSoC 2008 and GSoC 2011 page.

Student Name: Martin Landa, Czech University in Prague, PhD.
Organization: OSGeo - Open Source Geospatial Foundation
Mentor Name: Helena Mitasova
Title: wxNviz development for enhanced 3/4D visualization and analysis
Abstract
The aim of this project is to design fully-featured 3D/4D visualization tool for GRASS GIS and to replace current old-fashioned TCL/TK Nviz. This project continues in Google Summer Of Code project from 2008 ("2.5/3D visualization tool for wxPython GRASS GUI"). The main goal of the project is implement (1) all missing features from wxNviz's predecessor TCL/TK-based Nviz; (2) new functionality including e.g. fog visualization; and finally (3) text displaying and styling in OGSF library.

Application

Introduction

The aim of this project is to continue in wxNviz development and as a result to develop fully-featured 3D/4D vizualization tool for GRASS GIS. In detail, it meas to implement all missing features from wxNviz's predecessor TCL/TK-based nviz and moreover to implement new functionality including e.g. fog vizualization in underlying GRASS OGSF library and it's wxPython front-end wxNviz and command-line tool nviz_cmd.

Background

Geographic Resources Analysis Support System, commonly referred to as GRASS GIS, is a Geographic Information System (GIS) used for data management, image processing, graphics production, spatial modeling, and visualization of many types of data. It is Free Software/Open Source released under GNU General Public License (GPL). GRASS is one the projects under OSGeo umbrella.

wxGUI is a new generation of graphical user interface for GRASS GIS.

wxNviz is a wxGUI extension which allows users to visualize surfaces (raster data) in a 3D space, optionally using thematic coloring, draping 2D vector data over the surfaces, displaying 3D vector data in the space, and visualization of volume data (3D raster data). wxNviz is a wxPython front-end to the underlying OGSF library which reads GRASS datasets and interfaces with OpenGL at a C API level. Initial version of wxNviz has been developed within Google Summer of Code 2008 project. The idea came from the effort to develop fully-featured 3D/4D vizualization tool for GRASS which would be integral part of wxGUI environment. It makes wxGUI to be complete UI which will be shipped as default GUI in GRASS 7.

The idea

The main goal of this project is to implement all missing features from wxNviz's predecessor - TCL/TK-based nviz and to replace Nviz by wxNviz in GRASS 7. The features which are going to be implemented are e.g. lighting, decoration (labels, north arrow, scale bar, legend, fringe), data querying (rasters, vectors, volumes), cutting planes, scaled difference, animations, scripting, including replacement for tool to generate images for dynamic surfaces, and point symbols sized and colored based on attributes. Also some new features including fog support or vertical labels are planned be implemented. Another issue is to update and improve command-line tool nviz_cmd to support all wxNviz functionality.

Additionally design and implementation of text displaying and styling in OGSF library (and it's front-end wxNVIZ) is planned.

Project plan

April 26 - May 23 Bonding period
May 24 Start to code, wxNviz & nviz_cmd bug-fixing period, save display to a graphic file
May 31 Implement lighting
June 7 Lighting continued
Start working on decorations (labels, north arrow, scale bar, legend, fringe)
June 14 Implement fringe
Still working on decorations, implement also point symbols sized and colored based on attributes
June 21 Implement data querying (rasters, vectors, volumes)
June 28 Implement cutting planes, scaled difference
July 5 Implement animations
July 12 Implement scripting, including replacement for tool to generate images for dynamic surfaces
July 16 Mid-term evaluations deadline
July 19 Better view settings controlling
July 26 Fog support & vertical labels
August 2 Final code & functionality review
August 9 Write documentation, tutorials, etc.
August 16 Final evaluation

Final Report

The main goal of this project hasn't been fulfilled completely. The development of fully-featured 3D/4D visualization tool for GRASS GIS started within Google Summer of Code 2008 project and continued during this summer.

The overview of the implemented functionality:

wxNVIZ GUI which has been designed in 2008 was integrated into wxGUI Layer Manager during this summer. This integration took much more time then has been expected (see screenshot before and after integration). In the result some planned features (see the original project plan) hasn't been implemented due to the lack of free time.

The list of missing functionality:

  • Vector querying
  • Cutting planes, scaled difference
  • Animation, scripting
  • Decorations, vertical labels
  • Fog support
  • Better view controlling

The result of this project is 3D visualization environment for wxGUI which offers basic functionality to the users - displaying raster data as surfaces, 2D/3D vector data, and 3D raster maps as volumes (isosurfaces) in the 3D space. The user can control in the simple way the view, lighting, and fringes.

This environment still doesn't work on MS Windows (see trac #1125) and miss some functionality compared to the original TCL/TK nviz.

Anyway the author of this report is going to work on the missing features during the next months. The goal is to complete wxNviz till the end of this year (2010) and in the result to drop TCL/TK dependency in GRASS 7.0 (the original nviz application is the only one remaining component in GRASS 7.0 which uses TCL/TK).

wxGUI: Displaying raster (surface), 2D vector and 3D raster (volume) in the 3D space

Source code also available at code.google.com.

Roadmap

  • Lighting
    • 80%
    • Not fully working
  • Decorations
    • Postponed
  • Fringe
    • 80%
    • Fix OGSF functions for generating fringes
  • Data querying (rasters, vectors, volumes)
    • 50%
    • Only rasters
  • Cutting planes, scaled difference
  • Animations
  • Scripting, including replacement for tool to generate images for dynamic surfaces
  • Better view settings controlling
  • Fog support & vertical labels

Week 0 (May 24)

  • initial code clean up, bug-fixing
  • recover settings notebook page
  • save display to a graphic file - r42359

Week 1 (May 31)

  • 3D view tools window integrated into Layer Manager (see screenshots bellow) - r42403
Standalone 3D view tools window (2008-06-27)
Integrated 3D view tools window (2010-05-31)

Week 2 (June 7)

  • wxNviz GUI maintainance, bug-fixing period

Week 3 (June 14)

  • Simple lighting control panel implemented
Lighting control panel in Layer Manager (2010-06-17)

Week 4 (June 21)

  • Fringe implemented in wxNviz and nviz_cmd
Fringe control panel in Layer Manager (2010-06-23)

Week 5 (June 28)

  • Basic raster (surface) querying implemented
Raster querying (2010-07-01)

Week 6 (July 5)

  • Bug-fixing/maintainance

Week 7 (July 12)

  • Bug-fixing/maintainance

Week 8 (July 19)

  • UI maintainance

Week 9 (July 26)

  • UI maintainance

Week 10 (August 2)

  • UI maintainance
Redirect messages to wxGUI (2010-08-08)

Week 11 (August 9)

  • Cleaning up the code
3D view toolbar (the new icons designed by Robert Szczepanek)

Weekly Reports

Source code

Note: Development of wxNviz is done in trunk (GRASS 7.0) and devbr6 (GRASS 6.5). wxNviz in GRASS 6.4 is frozen due to RC stage.

GRASS 7.0

GRASS 6.5