WxNviz GSoC 2010

From GRASS-Wiki
Revision as of 09:08, 28 May 2011 by ⚠️Landa (talk | contribs) (2011)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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