3
V arious companies offer diffent kinds of 3D mapping solutions. In the world of FOSS (Free and Open Source Software) for mapping, there are some desktop GIS with 2D features and a few systems with some kind of visualization in 3D (such as GRASS and OSSIM). In order to store a geographic data, a good FOSS DBMS would be PostgreSQL with PostGIS. Open3DGIS' (O3DG) basic idea is to provide a simple way to integrate a 2D GIS with 3D visualization and interactivity on the web, using only FOSS components and open standards. O3DGs development team defined some initial ideas: • Integration with a 2D desktop GIS that can store and mantain geographic data in DBMS (the most important feature). The goal is to have a database model with few attributes. so that it will be able to work with FOSS 2D GIS (QGIS, gvSIG, OpenJUMP, etc.) reading the same data source from PostgreSQL. These few attributes must enable the generation of a 3D model from 2D geometry; • X3D standards are used for visualization on web browsers. There are many free plug-ins for most platforms (Windows, Linux, etc) that enable 3D visualization of a X3D file format. O3DG works with a simple concept: to view, interact and update a 3D geographic information from a DBMS using a web browser. At this moment, there is no intent of develop- ing spatial 3D analysis, but in the future, there may be some. The concept of a WebGIS (acronym for Web- based Geographical Information System) is nowadays very widespread [Mitchell, 2005]. Solutions such as Google Maps have become very popular in the last few years, thanks to the avail- ability of free geographic data on the World Wide Web. Free and Open Source Software related to geomatics and geo- sciences are still somehow scarce, but there has been a huge increase in the number of projects available nowa- days. In 2006, The Open Source GeoSpatial Foundation (OSGEO) was founded with the following mission: “...to support and build the highest-quality open source geospatial software. The foundation's goal is to encourage the use and collaborative development of community-led projects. ” (http://www.osgeo.org) One of the mature open source projects is MapServer. Simply put, this is a renderer that displays spatial data organized in a GIS DEVELOPMENT APRIL 2007 44 FOSS Open Source 3D WebGIS Open Source 3D WebGIS Helton Nogueira Uchoa I Luigi Castro Cardeles I Luiz Carlos Teixeira Coelho Filho I Paulo Roberto Ferreira The article presents an Open Source Solution to Enable 3D Geographic Systems on the Web 44-46.qxp 4/6/2007 7:05 AM Page 44

Open Source 3D WebGIS

Embed Size (px)

DESCRIPTION

Open 3D GIS intends to enable a geographic database (geodatabase) to be viewed in a 3D visualization on the web, using a web browser (such as Mozilla, Mozilla Firefox, Opera or Internet Explorer).

Citation preview

Various companies offer diffent kindsof 3D mapping solutions. In the world

of FOSS (Free and Open Source Software) for mapping,there are some desktop GIS with 2D features and a fewsystems with some kind of visualization in 3D (such asGRASS and OSSIM). In order to store a geographicdata, a good FOSS DBMS would be PostgreSQL withPostGIS.

Open3DGIS' (O3DG) basic idea is to provide a simple way tointegrate a 2D GIS with 3D visualization and interactivity on theweb, using only FOSS components and open standards. O3DGsdevelopment team defined some initial ideas:

• Integration with a 2D desktop GIS that can store and mantaingeographic data in DBMS (the most important feature). The goalis to have a database model with few attributes. so that it will beable to work with FOSS 2D GIS (QGIS, gvSIG, OpenJUMP, etc.)reading the same data source from PostgreSQL. These fewattributes must enable the generation of a 3D model from 2Dgeometry;

• X3D standards are used for visualization on web browsers.There are many free plug-ins for most platforms (Windows, Linux,

etc) that enable 3D visualization of a X3D file format.

O3DG works with a simple concept: to view, interact andupdate a 3D geographic information from a DBMS using a webbrowser. At this moment, there is no intent of develop-ing spatial 3D analysis, but in the future, theremay be some.

The concept of a WebGIS (acronym for Web-based Geographical Information System) isnowadays very widespread [Mitchell, 2005].Solutions such as Google Maps havebecome very popular in the lastfew years, thanks to the avail-ability of free geographic dataon the World Wide Web.

Free and Open Source Softwarerelated to geomatics and geo-sciences are still somehow scarce,but there has been a huge increase inthe number of projects available nowa-days. In 2006, The Open Source GeoSpatialFoundation (OSGEO) was founded with thefollowing mission:

“...to support and build the highest-quality opensource geospatial software. The foundation's goal isto encourage the use and collaborative development ofcommunity-led projects. ” (http://www.osgeo.org)

One of the mature open source projects is MapServer. Simplyput, this is a renderer that displays spatial data organized in a

G I S D E V E L O P M E N T A P R I L 2 0 0744

FOSS

Open Source 3D WebGISOpen Source 3D WebGIS

Helton Nogueira Uchoa I Luigi Castro Cardeles I LuizCarlos Teixeira Coelho Filho I Paulo Roberto Ferreira

The article presents an Open Source Solution to Enable 3D Geographic Systems on the Web

44-46.qxp 4/6/2007 7:05 AM Page 44

database, or in different files (the mostcommon files would be: shapefiles forvectors, and tiff for images). MapServer,as described in its manual, is not a fullGeographical Information System. Itintends to excel at rendering spatial datafor the web, as described in CGI MapServ-er Reference Manual.

MapServer has been used throughoutthe years in many projects where it wasneeded to display 2D Geographical Dataover the Internet. It is, nowadays, a cheapand stable solution for doing so, beingcomparable to many of the modern com-mercial web applications currently avail-able.

MapServer relies on OpenGIS specifica-tions. These specifications represent aconsensus on how spatial data should bestored, queried and retrieved.

However, neither MapServer, nor thelatest OpenGIS specifications define pre-cisely how to deal with tri-dimensionaldata. Albeit almost all spatial phenome-

na can be satisfactorily modelled using2D data, in some applications,

the knowledge of 3D posi-tion is crucial for dealingwith them. As an example,

many subterranean tubes canbe found under the sewer sys-

tem ofanyurbansce-

nario. Ifa subway

needs to beconstructed

under this area,it is necessary to

know the spatial tri-dimensional distance

between those tubes, other-wise there would probably be

undesirable accidents. In this case,a 2D GIS would not fit. So, there is a

need for 3D data to be correctly dis-played and analyzed in a Web GIS. As

MapServer isalready OpenSource, a naturalsolution would begiving it 3D webfeatures, devel-oped as a plug-in,and also distrib-uted as FOSS. Thisidea (of develop-ing it freely) wasalso in agreementwith the philoso-phy of the institu-tions that are cur-rently sponsoringthis project.

THE IDEABEHINDOPEN 3D GISOpen 3D GISintends to enablea geographic data-base (geodata-base) to be viewedin a 3D visualiza-tion on the web,using a webbrowser (such asMozilla, MozillaFirefox, Opera orInternet Explorer).Basically, version0.1 consists of aseries of scripts,written in Python,which extract spa-tial data obtainedfrom severalsources andloaded into adatabase (in thiscase, PostgreSQLwith the modulePostGIS). The user can choose betweentwo options: export 3D features directlyto this through the cgi_o3dg.py script

loading them from an already openedMapServer rendering window usingHTML query methods, or loading tridi-

45G I S D E V E L O P M E N TA P R I L 2 0 07

FFiigg.. 11 This diagram shows how Open 3D GIS works

FFiigg.. 22 Random curves from which the tri-dimentional mesh was extracted

44-46.qxp 4/6/2007 7:06 AM Page 45

mentional meshes directly from Post-greSQL. This script calls Open 3D GIS andthen converts all objects represented in3D to a surface, through Delaunay trian-gulations.

The modelling script uses Blender'sPython API to generate a 3D scene fromthat tridimensional surface. Blender is anopen source software for 3D modeling,animation, rendering, post-production,interactive creation and playback. It iswell known among the FOSS community.

The scene is stored as a “.blend” file bydefault. Another option is the generationof a X3D scene. Albeit X3D has some limi-tations, if compared to Blender, it is anopen format, widely recommended by

the World Wide Web Consortium (W3C)and fully integrated with the most usedweb-browsers (although it requires anadditional plug-in in order to be correctlyshown). X3D is a XML-based format andhas evolved from VRML.

After the generation of the X3D file, themodel is exported to the browser, and canbe freely viewed by the user. Figure 1explains graphically the proceduresdescribed above.

PROCEDURES AND EXAMPLESIn order to test how Open 3D GIS works, arandom set of level curves (generatedautomatically by a script developed at

OpenGEO) was loaded into MapServer(Figure 2). This experiment is widelyaccessible through the web addresshttp://www.opengeo.com.br/ms/o3dg/.

At first, the whole area is loaded into thebrowser window. After that, the user canselect a subset of that area, that will beseen in a larger zoom. When ready, it ispossible to generate the 3D rendering ofthe selected area, through a button locat-ed at the left of this window.

CONCLUSIONSThis article shows the first steps towardsfully integrating MapServer in order toprovide a full 3D web environment. Thisfirst version of Open 3D GIS serves forvisualization purposes only, and wasdeveloped with the intent to experimentthe trade-offs of dealing with 3D datathrough the web.

Even though the results shown here aresomehow very simple, it is expected inthe near future that new versions shouldinclude the capability of representing 3Dobjects, such as buildings, roads andtrees, and a basic query model, withwhich the user will be able do ask thedatabase about such 3D objects. In nextversions, Blender will be removed fromOpen 3D GIS and the solution will workon a pure X3D engine. Also, through theproject's official page, located athttp://www.open3dgis.org, it is possibleto download the current version of Open3D GIS. It is distributed through the GNUGPL license and has also a SourceForgeproject page, located at http://source-forge.net/projects/open3dgis.NOTE: The entire article with full references can be found at www.gisdevelopment.net/magazine/asia/years/2007/Apr

A P R I L 2 0 07G I S D E V E L O P M E N T46

FFiigg.. 33 X3D renderings for the study area

Helton Nogueira [email protected]

Luigi Castro Cardeles*[email protected]

Luiz Carlos Teixeira Coelho [email protected]

Paulo Roberto [email protected]

* For Correspondence

44-46.qxp 4/6/2007 7:06 AM Page 46