Web-Based Visualization of 3D Geospatial Data Using Java3d
Total Page:16
File Type:pdf, Size:1020Kb
Exploring Geovisualization Web-Based Visualization of 3D Geospatial Data Gobe Hobona, Philip James, and David Fairbairn Using Java3D University of Newcastle upon Tyne eb-based visualization of 3D geospatial tion for Standardization (ISO), which has adopted the Wdata has long been an area of research Simple Features model as the ISO19125 specification.4 within the geospatial information community. It’s a We’ve developed GeoDOVE, a Java3D-based prototype proven reliable and effective method for integrating het- system that retrieves geospatial data from conventional erogeneous data sets from different application domains spatial database servers, allows modification of the visu- and communicating the contents to the user. Early alization during runtime, and lets users remotely modi- research used the Virtual Reality Modeling Language fy attributes using the Structured Query Language (SQL). (VRML) for creating 2.5D and 3D virtual worlds. Since then, however, researchers have made significant GeoDOVE system architecture advances in geospatial information technology that could The current version of VRML⎯VRML97⎯offers two potentially help improve Web-based 3D geographic infor- approaches for linking a 3D model to external programs mation systems (GISs). For example, the geospatial infor- and data sources: mation community has standardized relational models for holding 3D spa- ■ script nodes and Spatial database servers allow tial data. Researchers have also made ■ the Java external authoring interface (EAI). for the storage and access of significant advances in the develop- 3D geospatial data using Open ment of spatial database engines Although the EAI provides a more flexible approach Geospatial Consortium such as MySQL (see http://www. to linking a VRML model to external programs than the standards. The Geospatial mysql.org), Oracle, and PostgreSQL/ script node, vendors have found it particularly unstable PostGIS (see http://www.postgresql. when implemented because the Java classes varied Database Online Visualization org). Furthermore, Sun Microsys- across vendors.5 A possible solution is a platform-inde- Environment (GeoDOVE) is a tems’ Java3D offers new develop- pendent and Web-deployable 3D graphics environment. prototype 3D Web-based ments in Web-based 3D visualiza- Of the four rendering engines that we examined in our geographic information system tion. Because of these advances, the study⎯DirectX, OpenGL, OpenGL Performer, and ⎯ that demonstrates how Java3D GIS community can potentially dis- Java3D only Java3D met both requirements. seminate both 3D spatial data and The official GeoVRML Working Group has raised can reduce bandwidth and functionality to anywhere on the other limitations of VRML and its geospatial extension, allow direct connectivity to World Wide Web. GeoVRML (see http://www.geovrml.org). Support for spatially enabled database Although Web-based tools for 3D more coordinate systems, larger grid-based terrain rep- systems. hydrological,1 urban,2 and geologi- resentation, data interchange, higher resolution, and cal modeling3 exist, they focus on accuracy could overcome some of these limitations. The individual simulation models and extract data only from GeoDOVE system addresses some of these issues. Its specific data sources. Our study aimed to determine architecture, shown in Figure 1, includes different spa- whether existing technologies allowed for the develop- tially enabled relational database engines and files ment of a Web-based GIS application that could offer encoded in the Geography Markup Language. It current- dynamic connectivity to conventional relational data- ly supports PostGIS, MySQL, and the ArcGIS Spatial base management systems (RDBMS) holding standard Database Engine (ArcSDE). These relational database 3D geospatial data. By standard geospatial data we’re engines use the OGC’s Simple Features model for SQL referring to the Open Geospatial Consortium Simple Fea- (SFS), shown in Figure 2, which is also implemented tures data model. The OGC is an international organiza- within GeoDOVE’s internal geometry model. This pro- tion that promotes interoperability between GISs and vides convenient mappings between objects in the data their vendors. It’s allied to the International Organiza- source and objects in the client application. 28 July/August 2006 Published by the IEEE Computer Society 0272-1716/06/$20.00 © 2006 IEEE Authorized licensed use limited to: Newcastle University. Downloaded on July 09,2010 at 13:11:34 UTC from IEEE Xplore. Restrictions apply. Using the Java database connectivity (JDBC) API, Server side Client side GeoDOVE can connect to and send an SQL query to any of these spatially enabled database engines. GeoDOVE PostGIS parses and reconstructs the query results into its own internal geometry object model. Thus, rather than retriev- ∗ ing data using the conventional select from layer ArcGIS query, which retrieves all records in a table, we can use spatial more sophisticated SQL queries to filter the retrieved database records⎯for example, select field1, field2, engine Java Java 3D-based field3 from table1 where (field1 = 100 or database GeoDOVE field1 = 200) and field3 like “A∗”. If the appli- connectivity applet cation is connected to a spatially enabled database engine MySQL such as PostGIS, GeoDOVE can invoke spatial queries on the server⎯for example, select geom from geom_ table where distance(geom, geomfromtext Geography − < Markup HTTP (‘point (100000 200000)’, 1)) 100. This Language server capability lets the system use some of the spatial data- Language Shapefileshapefile base engines’ computational resources. Spatial compu- SHP tations can impose a significant load on the client if performed on the client machine. In contrast, server-side spatial computations let the user send spatially enabled SQL queries to the server. The server sends the resultant layers back to the client, where they require no further 1 The GeoDOVE system architecture. processing. The JDBC also makes writing to the data source Geometry SpatialReferencingSystem possible. For example, the user could add a field that stores the 3D distance from a particular point to each 3D shape in the data source. GeoDOVE then calculates the 3D distance using Java3D and updates the database through the SQL commands Point Curve Surface GeometryCollection alter table and set. The ability to write back to a database also makes persistent storage of pro- ject information possible. This information includes references to all previously loaded lay- ers, symbol settings, and the viewer’s last known LineString Polygon MultiSurface MultiCurve MultiPoint position and orientation. Most viewers for VRML, X3D, and other 3D file formats don’t offer facilities for such persistent storage. The SFS model, the basis of the ISO19125 standard, defines a basic interface for vector Line LinearString MultiPolygon MultiLineString geospatial data types such as Points, LineStrings, and Polygons. This means that GISs that implement SFS encode their vec- tor geometries in much the same way, although Key: sometimes with different names for certain geometries. For example, PostGIS and MySQL Class A Class A use the well-known text format for returning Aggregation Inheritance geometries as ASCII text. Thus, they both refer (has-a) (is-a) to a concatenation of line segments as a LineString, or a MultiLineString for Class B Class B concatenation of multiple LineStrings. In contrast, ArcSDE refers to a similar geometry 2 Class hierarchy of Open Geospatial Consortium Simple Features model for SQL.4 type as a Polyline. A major limitation of VRML is that it doesn’t handle precision floating-point positioning⎯from Point3f double-precision floating-point numbers, offering only and Point3d classes, respectively⎯and therefore single-precision floating-point numbers. Because geo- maintains positional accuracy. The geospatial compo- graphical data⎯particularly grid or geographical ref- nent of X3D, VRML’s successor, will also offer double- erences⎯is often supplied in double-precision numbers, precision floating-point numbers. this limitation results in the loss of positional accuracy.5 Each geometry feature or feature collection in SFS GeoVRML supports the use of a single, static local coor- contains a reference to a defined coordinate system, the dinate system for dealing with floating-point limitations. spatial reference system (SRS). Typically, the server en- Comparatively, Java3D offers both single- and double- codes geographic information using either a geodetic IEEE Computer Graphics and Applications 29 Authorized licensed use limited to: Newcastle University. Downloaded on July 09,2010 at 13:11:34 UTC from IEEE Xplore. Restrictions apply. Exploring Geovisualization Key: segment has two fewer Point3f or Point3d Vertex objects when using a QuadArray than when using a TriangleArray. Vertex Figure 3a shows four vertices and their order within (a) sequence direction a LineString object. To extrude the LineString, GeoDOVE adds two vertices to each pair of adjacent vertices in a line segment (defined as two adjacent ver- tices in a LineString). The result is a set of four ver- Wall tices defining a four-sided wall for each line segment in height the original LineString, as Figure 3b shows. Figure 4 (b) shows polygons extruded using the QuadArray class. Whereas LineStrings don’t need a roof structure, 3 Vertex ordering for the extrusion of LineString and LinearRing GeoDOVE completes each extruded LinearRing by (closed LineString) geometries: (a) LineString before extrusion