Computers & Geosciences 25 (1999) 1167±1175
GeoVR: a web-based tool for virtual reality presentation p from 2D GIS data Bo Huang*, Hui Lin Department of Geography and Joint Laboratory for GeoInformation Science, The Chinese University of Hong Kong, Shatin, N.T., Hong Kong Received 19 February 1999; received in revised form 16 June 1999; accepted 16 June 1999
Abstract
A tool called GeoVR has been designed and developed under a client/server architecture to enable the interactive creation of a 3D scene and virtual reality modeling language (VRML) model from 2D spatial data by integrating Internet geographical information system (GIS) and HTML programming. The client front-end of this tool provides an HTML form to set properties for building 3D scenes, while the server back-end supported by o-the-shelf software: ArcView Internet Map Server and ArcView 3D Analyst through Avenue programming, processes the parameters and generates a 3D scene. This 3D scene is then transformed into a VRML model, which, together with its legend, is sent back to the VRML-enabled WWW browser for display and navigation. It is demonstrated that this tool, not only automates the conversion of the conventional 2D GIS data into VRML, but also adapts the current GIS 3D capabilities to the increasingly popular Web environment. The development of GeoVR oers new opportunities for geoscientists to build applications that bene®t from virtual reality presentation based upon the existing GIS spatial databases. 1999 Elsevier Science Ltd. All rights reserved.
#
Keywords: GeoVR
Geographical information system; Virtual reality; Virtual reality modeling language; World Wide Web; Client/server;
1. Introduction
There has been considerable interest in spatial data visualization employing geographical information system (GIS), scienti®c visualization (SciVis) and virtual reality (VR) technology (Hearnshaw and Unwin, 1994; MacEachren and Kraak, 1997; Rhyne, 1997; Unwin,
p
Code available at http//www.imag.org/CGEditor/ index.htm * Corresponding author. Tel.: +852-2609-6528; fax: +8522603-5006. E-mail addresses:
[email protected] (B. Huang),
[email protected] (H. Lin). 0098-3004/99/$ - see front matter PII: S 0 0 9 8 - 3 0 0 4 ( 9 9 ) 0 0 0 7 3 - 4
1997). As the Internet is now becoming popular, GIS, SciVis and VR similarly integrate with Web technology to allow wide access to geo-referenced data. These technologies provide an advanced means to assist with visual data exploration and decision making. Fairbairn and Parsley (1997) examined the use of VR technology and virtual reality modeling language (VRML) for cartographic presentation, and provided several examples to demonstrate virtual campus construction. Martin and Higgs (1997) discussed the use of `realistic' environments for the visualization of statistical and socio-economic data associated with GIS spatial features and demonstrated the use of VR tools for the visualization of urban environment. They further suggested that the integration of GIS and VR
# 1999 Elsevier Science Ltd. All rights reserved.
1168
Bo Huang, H. Lin / Computers & Geosciences 25 (1999) 1167±1175
opens up the potential of new ways for interacting with existing GIS databases. Recently, Batty et al. (1998) and Doyle et al. (1998) have described the `Virtual London' project that marries a range of VR and Internet GIS technologies. A virtual city on the Internet provides planners with an environment to interface with the complex physical and social data for planning and managing cities in meaningful and intuitive ways. Besides the above applications of VR or VRML, there are also a number of other instances for landscape and environmental applications on the WWW [Http://www.monumental.com/rshorne/3dem.html]. While these sites oer a graphic interface to the related VRML ®les, the applications are static in nature. There are very few that try to integrate VR technology with the spatial databases held within GIS interactively to create what we see as virtual environment. This paper aims to explore the design and development of a tool, called GeoVR, that can provide an environment in which users can generate virtual environments interactively from existing GIS databases, and browse the corresponding VRML models within the Web environment. A similar visualization tool, Geo-VRML visualization system, has been developed (Rhyne and Fowler, 1998). This is mainly employed to select ARC/INFO digital elevation model (DEM) data sets over the Internet and create customized ¯y-bys of DEM data sets. Ahead of Geo-VRML visualization system, AVSARC [Http://www.epa.gov/gisvis/index.html], an integration of visualization toolkits was discovered and applied to geographic visualization problems. While AVS and ARC/INFO are powerful scienti®c visualization and spatial data processing tools, the process of moving from ARC/INFO to AVS to VRML was found to be cumbersome. Alternative approaches for virtual reality presentation using Java external authoring interface (EAI) can be found in the `Virtual Field Course' project [Http://www.geog.le.ac.uk/vfc]. This project was addressed to provide a virtual environment for exploring spatially referenced information in the ®eld, within which a series of software components have been developed. For example, the tool Urban Modeller can be employed to present urban town scapes on a ¯oor by ¯oor and building by building basis, while the tool LandSerf coded in Java/OpenGL allows users to analyse and visualize terrain interactively in three dimensions. While these tools are very useful for VRML worlds presentation and interaction, the tool discussed in this paper focuses on applying the common gateway interface (CGI) method for interactive creation of 3D scenes and VRML models from multilayer 2D spatial or thematic data held within desktop GIS databases.
The interactivity includes the change of presentation parameters such as extrusion, base height, vertical exaggeration factor and shading. This tool is implemented by using a suite of ArcView products through Avenue and HTML programming. This paper highlights the integration of Internet GIS and VR technology, and introduces the framework of GeoVR.
2. Integration of Internet GIS and VR
The recent years have witnessed an explosive development of the Internet, which has now become an important means for acquiring and disseminating information. Most GIS vendors and some commercial spatial data providers have realized that the WWW will be the next-generation GIS platform, providing a powerful medium for geographic information distribution, as well as a particularly lucrative new market to exploit (Doyle et al., 1998). Correspondingly, a number of Internet GIS solutions for deploying maps have been developed. Plewe (1997) provides a timely review of the integration of Internet mapping and GIS, and discusses the possible services that such integration could oer. Computer graphics techniques have been extensively used in GIS. However, VR technology, which enables users to move towards a ®ner emulation of the complexities of the `real world', oers new and exciting opportunities to visualize and explore GIS spatial databases (Faust, 1995; Fairbairn and Parsley, 1997; Verbree et al., 1998). Recent developments on the WWW provide a cost-eective alternative for the application of VR technology. The commonly used solution is based on the VRML standard (Rhyne, 1997). VRML is a language or a ®le format for describing 3D objects or `worlds' to be experienced on the WWW [Http://www.vrml.org/home.html]. With VRML, authors can construct entire worlds, together with links to text, audio or video ®les, HTML ®les or sites, or links to other VRML worlds. A VRML model can be viewed by any Web browser that has a VRML plug-in pre-installed. This emergence of aordable virtual reality toolkits (Fairbairn and Parsley, 1997) and Internet GIS is providing a fundamental infrastructure to set up a generic tool that can oer an interactive environment for Web-based visualization of GIS data, whether in 2D or 3D form. ArcView Internet Map Server (IMS) (ESRI, 1997a), developed by Environmental Systems Research Institute (ESRI), is one of the most popular Internet GIS products. As an extension of ArcView, it enables users to put maps and interactive mapping applications on the Web. A user can employ this extension to create information services based on dynamic maps and
Bo Huang, H. Lin / Computers & Geosciences 25 (1999) 1167±1175
1169
Fig. 1. Three-tier client/server architecture of GeoVR.
GIS data. Besides ArcView IMS, ArcView also has several other extensions, which include ArcView 3D Analyst (ESRI, 1997b), allowing users to create, analyze, and display surface data. Unique features of ArcView 3D Analyst include support for triangulated irregular networks (TINs), interactive perspective viewing, VRML creation, and simple three-dimensional vector geometry. Additionally, ArcView also provides the object-oriented Macro Language Avenue (ESRI, 1996) for customizing users speci®c applications. These are some of the advantages that ArcView products are selected as a basis to build the GeoVR tool.
3. Client/server architecture of GeoVR
GeoVR, based on the client/server model, has a typical three-tier con®guration consisting of (Fig. 1): . A WWW client residing with the Web browser (Internet Explorer or Netscape Navigator). . A Web server (Microsoft Peer Web Services for Windows NT Workstation). . A 2D/3D visualization server using ArcView IMS and ArcView 3D Analyst. The client side of GeoVR provides an HTML form which allows users to de®ne properties of 3D scenes, and then submits the request to the visualization server via the Web server. After receiving and processing the request, the visualization server delivers a 2D map or 3D VRML model to the client for navigation and interaction. In this communication process, ArcView IMS plays an important role because its ESRIMap web server extension (esrimap.dll) (ESRI, 1997a) is responsible for checking that an ArcView session with
the appropriate map is currently available, forwarding the request to that ArcView session, obtaining the response from Avenue scripts, and passing it to the Web server so that it can be sent over the Web.
4. Implementation of GeoVR
GeoVR splits its application in both the client and server sides. Since the server side needs to browse a 2D map, and generate 3D scene and VRML representation, the implementation of GeoVR primarily consists of three processes: (a) Setting 3D scene properties in the HTML form, (b) Browsing 2D GIS data; and (c) Creating 3D scene and VRML. They are described next. The datasets used are related to the TsingYi Island of Hong Kong.
4.1. Setting 3D scene properties in the HTML form GeoVR uses an HTML form to provide an interactive front-end for 2D map browsing or 3D scene generation. Like the example shown in Fig. 2, the user is ®rst with the parameter input and selection page. This HTML form connects with the visualization server via the common gateway interface (CGI) program, i.e. the ESRIMap web server extension running on the Web server. This form comprises seven items, which are properties for building a 3D scene from 2D GIS data. The ®rst item is the selection of a 2D GIS data theme for viewing in perspective. This can be a shape®le, coverage, image, or any other ArcView-compatible ®le format. Once the 2D theme is selected, it can be browsed without the input of the following parameters. The sec-
1170
Bo Huang, H. Lin / Computers & Geosciences 25 (1999) 1167±1175
Fig. 2. Parameters input for creating a 3D scene and VRML model.
ond item assigns base height to the selected 2D theme as reference information. It can be a value, an expression or a surface name. In Fig. 2, `tytin' is a TIN surface representing the terrain. The data here can also be a GRID surface because both the TIN and GRID models are supported by ArcView 3D Analyst. The third item adds an oset height to the base height by value or expression. The fourth item allows the user to give a height (z-value) by value or expression to the spatial features in the 2D theme. The `stories' is an attribute of the selected `Tybldg.shp' theme, and the `[stories]34' stands for the vertical value, which is the multiplication of the storey number of any spatial feature in the `Tybldg.shp' theme by 4 m. Such an extru-
sion changes the form of a feature. Points become vertical lines, lines become vertical walls, and polygons become 3D blocks. Sun azimuth and altitude are respectively set by the ®fth and sixth item to de®ne sun position for shading. The vertical exaggeration factor for the 3D scene is de®ned by the seventh item. In addition to the seven items, there are three buttons in the form. `Browse 2D Map' browses the selected 2D theme, `Create 3D-VRML' generates the 3D scene and its VRML model, and `Reset' sets all the parameters with their default values. All the items, including their names and values, are encoded in the uniform resource locator (URL) when the form is submitted. The URL is parsed by an Avenue script in the
Bo Huang, H. Lin / Computers & Geosciences 25 (1999) 1167±1175
1171
Fig. 3. Identifying a selected feature when browsing the selected 2D map.
visualization server to invoke dierent executions. This Avenue script can identify which button is selected, whether it is `Browse 2D Map', `Create 3D-VRML' or `Reset'.
4.2. Browsing 2D GIS data After a 2D theme is selected in the ®rst item of the HTML form, it can be viewed with a Web browser by pushing the `Browse 2D Map' button. By clicking one of the four `radio' buttons, the user can pan, zoom in, zoom out or identify a feature on the map. The `identify' option is used to show the attributes of a selected feature in a table underneath the map (Fig. 3). These
attributes can be employed in de®ning the properties of 3D scenes. The function of browsing 2D map is realized by a set of Avenue scripts, which include the following. Connect: establishes communications between ArcView and the Web server. Dispatch: parses URL requests received from the Web. Page1: generates the ®rst HTML page of the selected 2D map the user sees. Makemap: generates the map that appears on the HTML page. Mapclick: applies the action speci®ed by the user to the map.
1172
Bo Huang, H. Lin / Computers & Geosciences 25 (1999) 1167±1175
Fig. 4. A VRML presentation of buildings on top of a terrain model.
Getmappoint: transforms the user's click on the map image into geographic coordinates. Makehtml: generates each subsequent HTML page. After a `Browse 2D Map' command is issued, the ®rst request that the visualization server receives contains the Cmd=Page1 parameter to launch the Page1 script. This generates an HTML page and sends it over the Internet to the client. This HTML page contains a form with four radio buttons and a clickable image, which is provided by a URL containing the Cmd=Makemap parameter. This URL request invokes the Makemap script which returns a map, using the extent coordinates contained in the URL. The URL request containing the Cmd=Makehtml parameter includes the four radio button options that were active when the form was submitted. It also con-
tains the current extent of the map so that ArcView can draw the view using this extent before applying the map action to it. The Makehtml script generates an HTML page with the same contents as the one generated by the Page1 script. The dierence is that the Page1 script only generates the ®rst HTML page, whereas Makehtml generates the next and all subsequent HTML pages for the client session.
4.3. Creating 3D scene and VRML After the `Create 3D-VRML' button is selected, the URL request comprising of the seven parameters is sent to the visualization server via the Web server. Like the example in Fig. 2, the corresponding URL request is thus:
Bo Huang, H. Lin / Computers & Geosciences 25 (1999) 1167±1175
1173
Fig. 5. A VRML presentation of boreholes under a terrain model
http://137.189.169.105/scripts/ esrimap.dll?name=htmlmap&cmd=vrmlCreDisp& shp®le=Tybldg.shp&baseht=tytin&oht=0&feah3 t=[stories] 4&azimuth=45& altitude=60&zscefactor=1 Since the variables such as shp®le, baseht and oht are not de®ned in the ESRIMap web server extension of ArcView IMS, they are automatically encoded in the URL request by using the `POST' method. Through parsing by the Dispatch script, the vrmlCreDisp command (script) is invoked. The vrmlCreDis script ®rst extracts the parameters for assigning base height, oset height, feature height, sun azimuth, altitude and vertical exaggeration factor from the URL request, then generates a 3D scene by using these parameters. Finally the 3D scene is transformed
into a VRML ®le (with.wrl extension). Meanwhile, the legend in the JPEG image ®le format for the VRML model is also created. Both the ®les are linked to an HTML ®le and sent back to the Web browser for display. By using a Cosmo Player plug-in that has already been established on the Web browser, the VRML model can then be navigated and interacted. Fig. 4 shows the result of the submission of the `Create 3DVRML' button (see Fig. 2), where buildings are placed on top of the terrain model. Certainly, if the selected 2D map is a geological layer, for example, boreholes for detecting structure and physical properties of rock stratum before foundation work, the VRML model displays many vertical lines beneath the terrain surface, from which the three dimensional distribution of boreholes can be seen more clearly (Fig. 5). In this
1174
Bo Huang, H. Lin / Computers & Geosciences 25 (1999) 1167±1175
Fig. 6. A VRML presentation of an image draped over a terrain model.
example, the DTM is represented by gridcells. In the next example, a multispectral SPOT image of the TsingYi Island in the TIFF format is selected as the 2D theme, then the VRML model shows an image draped over the terrain surface of the island (Fig. 6). It is noted that in the above VRML ®les, the TIN model for the terrain surface is mainly represented by the IndexedFaceSet node, under which there are coord and color exposeFields, and coordIndex and colorIndex ®elds. The GRID model is represented by the ElevationGrid node, under which there are color exposeFields, and xSpacing, zDimension, zSpacing and height ®elds. See The Virtual Reality Modeling Language Speci®cation [http://www.vrml.org/ home.html] for more details about these representations in the VRML standard.
5. Conclusions
Over the past decades, large volumes of digital spatial data have been created using geographic information system software, computer-aided design (CAD), and image processing systems. For projects involving geological data such as down boreholes, seismic sections, recumbent or complex faulted structures, 3D visualization is obviously one of the important means for exploring this spatial data (Bonham-Carter, 1994). This paper has explored a cost-eective solution for developing a VR presentation tool in a Web environment based on developments of o-the-shelf Internet GIS and its 3D visualization extensions. The design and development of GeoVR enhances the accessibility
Bo Huang, H. Lin / Computers & Geosciences 25 (1999) 1167±1175 to the current GIS 3D visualization functions, and demonstrates how ArcView 3D extension, ArcView IMS, Avenue and HTML programming work together to provide a convenient environment for Web-based 2D and 3D visualizations. The design of GeoVR, in general, adopts a CGI method. The client side of GeoVR provides an HTML form, which connects to a set of Avenue scripts by utilizing ArcView IMS and ArcView 3D analyst. The connection between the HTML form, Web server and the visualization server is primarily performed by ArcView IMS, while the 3D scene and VRML model generation is performed by ArcView 3D analyst through Avenue programming. The key to this tool development lies in how to ®t the parameters that are not supported by ArcView IMS into the URL request, which is then extracted by the server program. Since most of the current GIS packages lack real 3D data structure and functions, this inevitably aects the simulation of real worlds (Raper, 1989). As GIS evolves, it will provide a more powerful basis for GeoVR to advance. Current GeoVR version provides a minimal frontend. Its user friendliness can be improved by using the Java language to facilitate formulation of some expressions in the HTML form. The interaction such as direct queries on the VRML model for spatial database information needs to be explored.
Acknowledgements
This project is supported by the Research Grants Council of HKSAR government under Grant No. CUHK 150/96H and Grant No. CUHK 4334/98E and by CUHK RAC under Grant No. 4720401. The comments from the anonymous reviewers were very helpful in improving the paper.
References
Batty, M., Dodge, M., Doyle, S., Smith, A., 1998. Visualizing virtual urban environments: CASA Working Paper 1. Centre for Advanced Spatial Analysis, University College London, 32 pp.
1175
Bonham-Carter, G.F., 1994. Geographic Information Systems for Geoscientists: Modelling with GIS. Pergamon, Oxford 398 pp. Doyle, S., Dodge, M., Smith, A., 1998. The potential of webbased mapping and virtual reality technologies for modelling urban environments. Computers, Environment and Urban Systems 22 (2), 137±155. ESRI, 1997a. ArcView Internet Map Server. ESRI, Redlands, CA 60 pp. ESRI, 1997b. ArcView 3D Analyst. ESRI, Redlands, CA 118 pp. ESRI, 1996. Avenue Customization and Application Development for ArcView. ESRI, Redlands, CA (260 pp). Fairbairn, D., Parsley, S., 1997. The use of VRML for cartographic presentation. Computers and Geosciences 23 (4), 475±481. Faust, N.L., 1995. The virtual reality of GIS. Environment and Planning B 22, 257±268. Hearnshaw, H.M., Unwin, D. (Eds.), 1994. Visualization in Geographical Information Systems. Wiley, Chichester 243 pp. MacEachren, A.M., Kraak, M.J., 1997. Exploratory cartographic visualization: advancing the agenda. Computers and Geosciences 23 (4), 335±343. Martin, D., Higgs, G., 1997. The visualization of socio-economic GIS data using virtual reality tools. Transactions in GIS 1 (4), 255±266. Plewe, B., 1997. GIS-Online: Information Retrieval, Mapping, and the Internet. OnWord Press, Santa Fe, NM 311 pp. Raper, J.F. (Ed.), 1989. Three Dimensional Applications in Geographical Information Systems. Taylor and Francis, London 189 pp. Rhyne, T.M., 1997. Going virtual with geographic information and scienti®c visualization. Computers and Geosciences 23 (4), 489±491. Rhyne, T.M., Fowler, T., 1998. Geo-VRML visualization: a tool for spatial data mining. International Cartographic Association Commission on Visualization Working Papers (URL: http://www.geog.psu.edu/ica/icavis/rhyne98.html, accessed in Dec. 1998). 4 pp. Unwin, D., 1997. The virtual ®eld course. Second International Conference on GIS in Higher Education, Columbia, MD, 11–14 September, 4 pp. Verbree, E., Maren, G.V., Germs, R., Jansen, F., Kraak, M.J, 1998. Interaction in virtual world views-linking 3D GIS with VR. International Cartographic Association Commission on Visualization Working Papers (URL: http://gisvr2.geo.tudelft.nl/3dgisvri/ICA-paper.html, accessed in Dec. 1998). 8 pp.