X3D language directly supports this approach and we
want to evaluate their performance in X3DOM. The
LOD node allows that a single model could have mul-
tiple representations including high-resolution detail
(when users are close) and adequate lower-resolution
detail (when seen from a distance): LOD provides an
important capability for making overall performance
scalable when many scenes are composed together.
Specifically, the final scene has three levels of de-
tail: buildings, block of buildings and non-visible.
The first one is the most elaborated model, being ac-
cessible when users are located five hundred meters
away. If the distance is more than 500 hundred me-
ters and less than 1000, then the block of buildings
are visible. All buildings and blocks situated further
away are not renderized. Therefore, as only the geom-
etry of the nearest elements are loaded in the scene,
the memory usage is considerably reduced.
Once the procedurefor automatic modeling the ur-
ban geometry has been explained, next we describe
the interaction process with the buildings and the
street furniture.
3 INTERACTION WITH URBAN
ELEMENTS USING X3DOM
Integrating web 3D applications and geodatabases for
real time interaction is an important challenge in 3D
urban information systems. In this paper we propose
a prototype based on a client-server architecture in
which the client device visualizes and interacts in an
urban virtual world, while the server provides the ge-
ometric and thematic information. The application
has been implemented using open-source technolo-
gies like WebGL, X3DOM, MySQL and Ajax. Next
we describe the process for retrieving and visualizing
the scene information (urban geometry and street fur-
niture).
In our system, certain urban elements like build-
ings and street furniture are sensible to users’ inter-
action by generating a database query. For instance,
if a building is clicked, a window in the client side
is shown with a brief description in a straightforward
way. In the case of street furniture, some related infor-
mation is obtained, for instance the timetable of letter
boxes.
To implement this functionality, a function for
controlling events is needed. Unlike geometry, events
management in X3DOM is usually different from
X3D. For example, clicking event control in X3D re-
quires using a special type of node named touch sen-
sor. This node generates the clicking event, which
will be sent to other nodes via ROUTE statements.
Thus, the output field of a touch sensor can be con-
nected with the input field of another node (a script,
generally). In X3DOM touch sensors can be replaced
by the onclick HTML events.
The “click” action on sensible objects in the scene
generates a query in the geodatabase. However for se-
curity reasons, JavaScript functions are not allowed to
directly access to the database. To solve this problem,
we use Ajax technology and PHP code as an inter-
mediate mechanism to execute the queries. Ajax is a
group of technologies used on the client-side to create
interactive web applications. It can retrieve data from
the server asynchronously in the background, making
possible an increase in interactive or dynamic inter-
faces on web pages. In our application, Ajax retrieves
the additional information about the buildings or the
street furniture using PHP code.
Finally, when all the processes described above
are finished and the information is retrieved, the ap-
plication shows the results. For this purpose, we use
the JQuery library
2
, compatible with any browser.
4 RESULTS
Our prototype has been tested using Firefox and
Google Chrome browsers. In both cases users can
move freely around the 3D model of the city and ob-
tain additional information about certain urban urban
elements, as depicted in Figure 2. In this example, an
info window is shown on the client device screen af-
ter clicking on the window. This dialog includes the
opening hours of the shops located in the block.
As can be seen in Figures 3 and 4, we have ob-
tained a realistic city model in which both pedestrian
and flight navigation are allowed. All textures in the
scene are real photographs of the city of Ja´en. Thanks
to the use of LODs, the loading memory is reduced
because the geometry is in fact very simple and more
complex models are downloaded only when user is
close to them. Therefore, the time response and the
interaction with the scene is improved.
5 CONCLUSIONS AND FUTURE
WORK
In this paper we have described a prototype of a web-
based application to renderize an urban model using
open-source technologies like WebGL and X3DOM.
This achievement is obtained by creating a geo-
database which stores the main geometric and non-
2
http://jquery.com. Accessed October 2011.
NAVIGATION AND INTERACTION IN URBAN ENVIRONMENTS USING WEBGL
495