Triturus White Paper

4 downloads 34924 Views 239KB Size Report
able development of innovative software solutions in the context of 3D .... explains the bi-directional arrows inside the pipeline model. ☞ Keep in mind that the ...
TRITURUS: A Java-based Framework for 3D Geo-Visualization Applications White Paper Benno Schmidt and Martin May

Abstract: TRITURUS is a Java-based framework designed to support the development of software applications in the field of 3D geo-visualization. TRITURUS will be available as an open source project embedded into the activities of the 52°North initiative. This paper explains the concepts underlying the framework, as well as the first applications built on top of TRITURUS. Moreover, it describes the new 52°North 3D Community's vision.

Project Vision 52°North partners are in the process of establishing a new community − the 3D community! This community will focus on creating applications and services which visualize three-dimensional geo-objects using the software framework TRITURUS (we pronounce the second syllable so it is pronounced "tritoorus"). The community's vision is to establish a creative surrounding, which allows efficient and sustainable development of innovative software solutions in the context of 3D modeling and 3D geo-visualization. The scope of TRITURUS may be terrain modeling, landscape planning, civil engineering, or sensor web – just to mention some examples. Any other field dealing with geo-information visualized using three geometrical coordinate-axes (x, y, and z) is within the project's scope. Development goals are • to provide an environment for 3D geovisualization tasks, broadly usable in different fields, 1

TRITURUS White Paper • to have open ended software that is easily extensible, • to be compatible with existing standards in the context of geo-object modeling and computer graphics (OGC, ISO, W3C). This paper will explain the basic concepts underlying the framework, as well as the underlying design philosophy. Moreover, it will describe first applications built on top of the framework.

Initialization of a 3D Community Inside 52°North To date, open source solutions focusing on, amongst others, security issues, sensor web applications or Web Processing Services (WPS) are available within the 52°North initiative. 3D geo-visualization will be another facet of the initiative's complementary focus points. 52°North's 3D community will be open to any software engineer who is interested in 3D geo-visualization applications based on open source software. In the long run, the framework's acceptance will be determined by the suitability of the concepts brought in. Software contributions, as well as, test cases, user experiences etc. will be appreciated. You are very welcome to participate in the community's activities!

Community Organization At present, the community is organized as follows. (Contact information is given at the end of this paper.) • Technical project lead: Benno Schmidt, University of Applied Sciences Bochum • Secondary lead: Martin May, con terra GmbH

Project Objectives The project will provide a software solution that enables the set-up of interoperable 3D geo-visualization applications. This software should be easy to use. Moreover, a lightweight solution is envisioned. This means, compact "stand-alone" code is preferred. Unnecessary dependencies on software artifacts which are outside the framework should be avoided. Interoperability with other software solutions is an important issue. With regard to geo-information, the interface specifications of the Open Geospatial Consortium (OGC) and the International Organization for Standardization (ISO) are of high importance. In the field of computer graphics (a discipline likely relevant with regard to 3D visualization issues, e.g. image representation or real-time rendering), the World Wide Web Consortium (W3C), as well as ISO should be mentioned first. One of the project aims is to support a software developer who will explore progressive 3D rendering and visualization technologies. 2

TRITURUS White Paper

Project Roadmap This 52°North project was initiated in the Autumn of 2010. A basic executable version of TRITURUS (version 1.1) will be provided at the beginning of 2011. The Maven2 build framework [20] will serve as the technological basis to manage the underlying source code. After a short pilot phase, in Summer 2011, a TRITURUS redesign phase will take place. TRITURUS version 2 should be available at the end of 2011. Innovative research in the context of TRITURUS 2 might include topics such as • • • •

(Partial) GeoAPI integration [16] WebGL-based HTML5 renderer realization Provision of 3D PDF output Spatio-temporal "(3+1)D" visualization

Project History The TRITURUS project was originally initiated in 2002 at the Institute for Geoinformatics (IfGI) at the University of Münster. During this time, 3D geo-visualization took place in various research projects. Subsequently, in the context of the special interest group "3D" (SIG-3D) within the GDI-NRW organization (now GDI-DE [14]), prototypical implementations of Web Terrain Servers and Web 3D Servers (WTS resp. W3DS, see [21]) were set up. The framework was then used by con terra GmbH to implement the commercial product "sdi.suite terrainServer" (until 2010). In order to advance further development activities and to bridge a gap within 52°North's technology portfolio, TRITURUS stakeholders decided to transfer the framework to the open source community. We are often asked what the term TRITURUS stands for. The prefix "tri" turned out to be suitable, since the framework focuses visualizations in three-dimensional space. Triturus is actually a genus of newt. Since the people creating the framework found amphibians very likeable, they thought this would make a pretty fine project logo…

Software Components Triturus Core TRITURUS is a Java-based software framework. To date, we work with the Java Development Kit (JDK) 1.5 or higher. Applications built on top of TRITURUS can be deployed on Windows and UNIX/LINUX systems. The framework distinguishes between two data-models. One of those handles geo-objects, or features, to use OGC jargon. The other one works with visualization objects ("display elements"). These data models are realized by interfaces or abstract Java classes (i.e., collections of "interface" classes with some basic functio3

TRITURUS White Paper nality added). These object descriptions are kept independent from the underlying data structures used to hold object information. An I/O layer allows these objects to be read from different data sources, respectively writing them to various file formats, e.g. CSV files, ArcInfo ASCII grids, VRML/X3D, etc. TRITURUS enables the software developer to visualize these objects in 3D space, using various rendering platforms, which offer varying interaction facilities. For example, one and the same 3D scene containing geo-object information might be visualized using a Virtual Reality environment consisting of stereoscopic real-time rendering together with a head/hand tracking system. Or it could be visualized using a computing intensive ray tracer which generates a non-interactive photorealistic image. Visualization environments supported by TRITURUS 1 will be POV-Ray, VRML, or Java 3D [12, 17, 22].

Terrain Server The TRITURUS TERRAINSERVER is an example of a "TRITURUS inside" application. Using the TRITURUS core, this Web application provides an implementation of the OGC Web Terrain Service (OGC-WTS [21]) interface to visualize an elevation model (relief) with a Web map (OGC-WMS) serving as drape texture (so-called "level-of-detail 0 model", [15]). A perspective map view can be generated for a given camera position. Moreover, the TRITURUS TERRAINSERVER could provide elevation model descriptions as scene-graph based 3D scenes, e.g. as VRML or X3D documents (W3DS [21]). Further service interfaces include elevation queries for a given position (x, y) or cross-section generations. The TERRAINSERVER application has been realized using Java Servlet [19] technology.

Terrain Viewer The TRITURUS TERRAINVIEWER is a Web application acting as client application for Web Terrain Services. This interactive viewer provides a user interface to generate perspective WTS views generated by the TRITURUS TERRAINSERVER. 4

TRITURUS White Paper The application's Web pages have been realized using the Struts 1 framework together with JavaServer Pages [19, 23]. Similar to the TRITURUS core and the TERRAINSERVER application, the TERRAINVIEWER can be deployed on Windows and UNIX/LINUX systems.

Design Philosophy The TRITURUS design process has been driven by basic ideas referring to general software engineering issues, as well as conceptual aspects. Below, you will find a set of guiding principals, we considered while setting up TRITURUS 1. These "rules" are deliberately very simple, lack detail and should not be taken too literally. Nonetheless, they reflect our design philosophy quite well. They might evolve into something more suitable in the future (i.e. TRITURUS 2). As mentioned before, TRITURUS is intended to be a "lightweight" piece of software. I.e., the software solutions should be simple (KISS principle) and free of unnecessary dependencies from other software artifacts, such as external Java libraries. Even though such dependencies seem to be managed easily with the help of the powerful Maven2 framework, the integration of external ideas might lead to conceptual mismatches (e.g., contradictory data models, naming conflicts such as homonymous terms etc.) and thus might confuse the novice framework user.

 

Keep things as simple as possible (but no simpler, to cite Albert Einstein)! Have a good substantiation when including external libraries!

TRITURUS should always offer runnable solutions. Thus, we call TRITURUS a complete software environment. Sometimes, however, the TRITURUS default implementations might be limited with regard to practical requirements. In this case, the default implementations could be replaced by more sophisticated solutions. TRITURUS supplies the basic conceptual interfaces. The applications built on top of these interfaces will run using different implementations. Ideally, the application developer must not change his/her program code to replace the basic interface implementations. Thus, sustainable software solutions can be provided by applying one of those principles that are fundamental to object-oriented software design.

 

Always provide executable software (at least, for simple applications)! Keep the software extensible!

Examples for such basic interfaces inside the TRITURUS 1 framework are the geoobject interface ("virtual GIS", see Java package org.52north.triturus.vgis) and the renderer interface which allows the user to switch between different renderers at program run time (e.g., a real-time renderer and a ray tracer).



Check carefully, if abstract and/or generic components can be provided (to allow the development of applications that are independent from the underlying implementations)!

5

TRITURUS White Paper

As mentioned before, we are convinced that standard compliance is an important issue:



Strive for compliance to existing standards (in geo-information processing, computer graphics, Web technology etc.)!

In the field of computer graphics, the rendering pipeline [1] is often used as reference model to describe visualization processes. Principally, this model is used inside the geo-information community, too, e.g. see [2]. We slightly modified this model by adding bi-directional arrows between the different process steps. Inside the framework, processing units that transform geo-objects to geo-objects are called filters. Units that take one or more geo-objects as input and provide visualization objects as output are called mappers. Experiences from other projects imply that geo-objects (designated as "features", see figure) and visualization objects (designated as "display elements") do not correspond in a "1:1" relation to each other. E.g., there might be > 1 visual representations for one and the same geo-object, or > 1 geo-objects act as source objects to generate a single display element. Moreover, the geo-/visualization object relations might be dynamic, i.e. they might change at program run time as a result of user interaction [3]. Regarding interactive applications, the link from visualization objects (display elements) back to the geo-object representations (features) is often lost. (Did you ever try to set up a visualization that allows a user to select an object interactively and to manipulate its thematic attributes held in a geo-database or GIS?) This explains the bi-directional arrows inside the pipeline model.



Keep in mind that the kind of relation between geo-objects and visualization objects might vary!

Regarding the visualization pipeline (see figure above), those process steps and representations (rendering, display element description etc.) arranged in the upper area of the figure are strongly influenced by standards evolving from Computer Graphics. In contrast, those process steps and representations (feature selection and representation etc.) in the lower area are in the scope of the geo-information community. It will thus be part of our job to bridge the gap between those data models and concepts used in 3D computer graphics and those used in geo-information modeling.

6

TRITURUS White Paper



The task is to bring together the heterogeneous data models (resp. concepts) of 3D computer graphics and geo-information modeling.

Code Examples We would like to give just four very simple programming examples to illustrate the way TRITURUS 1 works. Note that the TRITURUS-based Java code shown is slightly modified to emphasize the basic framework concepts. The source code shown in the first example converts an elevation grid read from a file (in ArcInfo ASCII grid format) to VRML. An importer and an exporter, both of them implemented in TRITURUS' I/O layer, are used to read the source file to write the target file respectively. In an additional step, a filter unit resamples the grid to a lattice consisting of 50 x 50 cells. This is the complete code: IoElevationGridReader in = new IoElevationGridReader(ARCINFO_ASCII_GRID); VgElevationGrid grd = in.readFromFile("/myData/example.asc"); VgElevationGrid grd2 = FltGridResampler(grd, 50, 50, NUMBER_OF_CELLS); IoElevationGridWriter out = new IoElevationGridWriter(VRML2); out.writeToFile(grd, "/myData/example.wrl");

The second example implements an application that visualizes an elevation model's surface with a drape texture using a POV-Ray renderer (for example images, see figures on page 1 of this paper): // define scene: String drape = "/mydata/anImage.png"; VsSimpleScene scene = this.defineScene(grd, drape); // see below // render scene: scene.render(); System.out.println("Generated image file: " + scene.imagePath()); … private VsSimpleScene defineScene(VgElevationGrid grd, String drape) { PovrayScene scene = new PovrayScene(); scene.setTerrain(grd); scene.setDrape(drape); VsViewpoint vp = new VsViewpoint(); vp.setLookFrom(… coordinates …); vp.setLookAt(… coordinates …); VsCamera cam = new VsCamera(); cam.addViewpoint(vp); scene.addCamera(cam); scene.setDefaultExaggeration(10.); scene.setBackgroundColor(new T3dColor(0.5, 0.5, 0.5)); // gray scene.setImageFormat("PNG"); scene.setImageSize(640, 480); // width/height in pixels return scene; }

7

TRITURUS White Paper Note that basically the class-name PovrayScene has to change to Java3dScene to generate an interactive Java 3D scene. The last example shows the complete source code needed to calculate crosssection information and to write it to a SVG [11] file. // read polyline defining the cross-section: VgLineString defLine = new GmLineString2D("3500,5700, 3580,5720,3600,5800"); // generate cross-section: FltElevationGridProfile proc = new FltElevationGridProfile(); VgProfile p = proc.transform(grd, defLine); // SVG output: IoProfileWriter out = new IoProfileWriter(SVG); out.writeToFile( p, "/myData/cross-section.svg");

The processing element proc acts as a filter (see visualization pipeline). Moreover, several "mappers" are available inside the TRITURUS framework.

Summary and Conclusion The 3D community's vision is to establish a creative surrounding, which allows efficient and sustainable development of innovative 3D geo-visualization solutions. The Java-based TRITURUS framework could serve as a strategic tool to achieve this goal. In this paper, the design philosophy and the basic concepts underlying the TRITUframework have been explained. The TRITURUS-based applications presented in this paper might be inspiring to software developers, however, there is a lot of work to be done to complete the project's vision. You're very welcome to participate in our project activities!

RUS

References General visualization concepts: [1] Haber, R. B. & D. A. McNabb (1990): Visualization Idioms: A Conceptual Model for Scientific Visualization Systems. In B. Schriver, G. M. Nielson & L. J. Rosenblum: Visualization in Scientific Computing, IEEE Computer Society Press, pp. 74-93. [2] Nebert, D. D., ed. (2009): Developing Spatial Data Infrastructures: The SDI Cookbook. Living document, http://www.gsdidocs.org/GSDIWiki (called in Dec. 2010). [3] Schmidt, B. (2002): Verknüpfung der Datenmodelle für GIS und interaktive 3D-Visualisierung. IfGIprints, Bd. 17, Münster: Institut für Geoinformatik / Solingen: Verlag Natur & Wissenschaft. TRITURUS-related publications: [4] Schmidt, B., M. May & C. Uhlenküken (2005): Service-basierte 3D-Geovisualisierung: Umsetzungsstrategien und praktische Anwendung. In J. Strobl, T. Blaschke & G. Griesebner, Hrsg.: Angewandte Geoinformatik 2005, Beiträge zum 17. AGIT-Symposium, Salzburg, Heidelberg: Wichmann, S. 629-638.

8

TRITURUS White Paper [5] Schmidt, B., M. May & T. Heinen (2004): Triturus – Ein Java-Framework für Applikationen zur 3D-Geovisualisierung. In M. May, Hrsg.: 3D-Geovisualisierung – Ein Überblick, "geoinformatik_online" (http://gio.uni-muenster.de/), Ausg. 1/04, Münster: Institut für Geoinformatik. [6] May, M., B. Schmidt, U. Streit & C. Uhlenküken (2003): Web-Service-basierte 3D-Visualisierung im Umfeld der Raumplanung. In M. Schrenk, Hrsg.: Computergestützte Raumplanung, Beiträge zum 8. Internationalen Symposion CORP 2003, Wien, 25.02.-01.03.2003. [7] Heinen, T., M. May, & B. Schmidt (2005): 3D Visualisation in Spatial Data Infrastructures. In A. Butz, B. Fisher & A. Krüger, eds.: Smart Graphics: 5th International Symposium, Lecture Notes in Computer Science, 3638, Berlin: Springer, pp. 222-229. [8] con terra GmbH (2005): Web Terrain Service (DGM 50 und OGC-WMS). Service description, ver. 1.0.0, Münster: con terra, available via http://www.hochschulebochum.de/fileadmin/media/fb_v/prof_schmidt/ct_WTS_DGM50_1.0.0_terrainServer.pdf [9] con terra GmbH (2005): Cross-Section Service DGM 50 NRW. Service description, ver. 0.1.0, Münster: con terra, available via http://www.hochschulebochum.de/fileadmin/media/fb_v/prof_schmidt/ct_ProfileService_DGM50_0.1.0_terrainServer.pdf Geo-information and Computer graphics standards: [10] Open Geospatial Consortium, Standards and Specifications – http://www.opengeospatial.org/standards [11] World Wide Web Consortium (W3C): Scalable Vector Graphics – http://www.w3.org/Graphics/SVG [12] Web 3D Consortium: The Virtual Reality Modeling Language Specification. ISO/IEC CD 14722– http://www.web3d.org/x3d/specifications/#vrml97 [12] Web 3D Consortium: The Virtual Reality Modeling Language Specification. ISO/IEC 19775, 19776, and 19777 – http://www.web3d.org/x3d/specifications/#x3d-spec

Web Links [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24]

3D-SIG GDI-DE – http://www.sig3d.org CityGML – http://www.opengeospatial.org/standards/citygml GeoAPI – http://www.geoapi.org Java 3D – http://java.net/projects/java3d and http://java.sun.com/developer/onlineTraining/java3d/index.html JSP – http://www.oracle.com/technetwork/java/javaee/jsp Java Servlets – http://www.oracle.com/technetwork/java/javaee/servlet Maven2 – http://maven.apache.org OGC discussion papers – http://www.opengeospatial.org/standards/dp POV-Ray – http://www.povray.org Struts – http://struts.apache.org Xith3D – http://xith.org

Acknowledgements The TRITURUS works are supported by the Bochum University of Applied Sciences (internal research funding programme 2010/11) and con terra GmbH, Münster. Moreover, we would like to thank Ann Hitchcock from 52°North for her advice and time.

9

TRITURUS White Paper

Contact Information 52°North Initiative for Geospatial Open Source Software GmbH Martin-Luther-King-Weg 24 D-48155 Münster E: [email protected] Prof. Dr. Benno Schmidt Hochschule Bochum Fachbereich Vermessung und Geoinformatik Lennershofstr. 140 D-44801 Bochum E: [email protected] Martin May con terra GmbH Martin-Luther-King-Weg 24 D-48155 Münster E: [email protected]

10