SVG for adaptive visualisations in mobile situations

Tumasch Reichenbacher
Department of Cartography
Technical University Munich
Arcisstr. 21

80333 Germany
fax: ++49 89 280-9573

Keywords: mobile cartography; adaptive visualisation


New technologies, such as telecommunication, mobile Internet, and handheld computing devices, offer new chances to the everyday use of geoinformation. The limited resources in a mobile environment, ranging from low CPU and memory to small screens and low network bandwidth, constitute a major problem. Hence, after a brief description of the characteristics of the mobile environment, we will sketch a general conceptual framework for geoinformation usage in a mobile environment based on an adaptive approach. This paper will be focused on adaptive and dynamic generation of visualisations for mobile users on the basis of SVG. We present the concept adaptive visualisation, i.e. the personalisation of the presentation mode to the current user as well as the situation, the device. We will put emphasis on the adaptation of the presentation form and demonstrate how to use SVG for delivering adapted content to mobile users. We will briefly address the dynamic generation of SVG files from database content, depending on user, context, and constraints. SVG seems well suited for the goal of presenting dynamic and adapted geoinformation content to mobile users, since it offers a lot of useful features for this task. To illustrate the theoretical concept sketched in the first part, we will present some small demo examples showing the generation of different visualisations from the same information source. The examples should also outline some possible adaptation methods in SVG.


The field of geoinformation technology and cartography have seen dramatic changes in the last twenty years. In the past GIS technology and partly web mapping have been a tool for geoinformation experts rather than commonplace to the masses. These systems could only run on expensive machines and required many skills. In the early nineties easy-to-use desktop GIS were introduced and with the Internet and web mapping a further "democratisation" of geoinformation use took place. And now, after the tremendous success of the Internet and the cellular telephone in the last decade the next technological wave seems to be the convergence of the two: the wireless Internet or mobile Internet. This takes Web GIS and Mapping a step further. The dissemination of digital geospatial data is no longer bounded by the desktop platform.

The emergence of mobile computing and wireless devices has brought about a whole palette of new possibilities and chances for geoinformation science and cartography. New mobile devices such as PDAs, Smartphones and the like put forward several advantages for personal assistance during mobility: they can present up-to-date spatial/non-spatial information in an individual, dynamic, and flexible way. Since these devices are portable, mobile users can take them anywhere and access information when needed during mobility. They can provide and run many other services/applications (appointment scheduler, address book, e-mail, etc).

In this paper we will develop a vision for geospatial assistance during mobility with a strong focus on the visualisation part. A conceptual framework of mobile cartography is presented. Mobile cartography deals with theories, methods, and technologies of dynamic visualisation and mobile usage of spatio-temporal information as well as the adaptation to this mobile usage, i.e. to the situation, specific characteristics and activities of the mobile user. We will show the potential of Scalable Vector Graphics (SVG) for the presentation of spatial information to mobile users.

The mobile environment

Before we start looking at the visualisation of geoinformation on mobile devices, we try to characterise the mobile environment in more detail to get a clearer notion of the background. In this section we describe some of the building blocks, the mobile devices, the mobile communication, the positioning technology, and the mobile usage situation, to get a better idea of the chances and potentials, but also the problems and obstacles involved.

Mobile device is a rather wide term meaning information terminals, information appliances, personal digital assistants, mobile phones, etc. For the purpose of this paper we have devices such as Personal Digital Assistants (PDA) and Smartphones in mind. The table below shows the relevant characteristics of a typical stet-of-technology PDA. Most devices are extendable with GPS receivers, GSM card, digital cameras, MP3 players and so on.

Table 1: Characteristics of PDAs
weight 300 grams
display size 4" - 5"
display resolution 160x160 - 240x230 px
colours 256 - 65536
CPU 32 bit; -250 Mhz
memory - 64 MB
input pen & touch screen
interfaces infrared, Bluetooth

As we can see, the versatility of these mobile devices, however, is only possible under certain resource limitations: screen size, colours, resolution, CPU power, memory, and power supply are limited compared to stationary computing devices. This affects also the visualisation capabilities. They are to date limited as well compared to analogue (paper) and stationary digital visualisations.

The mobile Internet, i.e. the access to the Internet independent from a fixed location, relies on modern telecommunication technology. There are several technologies in use, such as radio networks, Wireless LAN (WLAN), Infrared or Bluetooth. To date radio networks play the major role. In Europe and other parts of the world the GSM standard is still in use. GSM is a second-generation mobile communication network standard reaching data rates of 9.6 kbits/s. This is sufficient for speech, for increasingly dynamic Internet content, however, not to speak of multimedia content, this is by far too little. In Japan I-Mode, a very powerful and multimedia-focused system is already mature. I-Mode is just being implemented in Germany now. But the next the third generation (3G) standards are just now being implemented in USA and Europe. This Universal Mobile Telecommunications System (UMTS) will allow a theoretic bandwidth up to 2Mbit/s. In practice the capacity will be much lower depending on velocity and concurrent connections. For video streams this might still be insufficient, though for the purposes of mobile cartography it seems to be a major improvement. The major advantage of UMTS (and I-Mode) is that it is circuit switched and packet switched, meaning you are always-on. It also means, that you do not pay the connection time, but the amount of data transferred.

The position of a mobile user, i.e. the mobile device position, can be determined by either a network-based or a handset-based positioning technology. [1] gives a comprehensive overview of the different positioning methods. In a network-based case the device needs to be subscribed to a mobile radio communication network. The position is calculated at the network operator's side on the basis of signal runtime measuring and geodetic operations. This position is used by the operators anyway, though not necessarily that accurately. At least the Cell Global Identity (CGI) is needed in order to guide the phone calls to the cell the subscriber is situated in at the moment of calling.
In the case of handset-based positioning the device holds a sensor for position determination. This will be a GPS receiver in most cases. The position is independently calculated in the device itself. This might be important concerning privacy and security issues. However, to profit from location-dependent information, the position will probably anyway have to be passed to other parties.
Neither of these methods will determine the orientation of the device. Nevertheless, this information is important for many applications in spatial processing.
The location obtained using methods described above simultaneously defines the context in which the user moves around. This allows context-based information rendering, whereby the filter function results not only in a reduced information amount, but in a more relevant, detailed, accurate and hence appropriate information content to meet the user's needs.

The mobile usage situation differs a lot from the one at a Desktop PC at home or at work. First, but most important of course, the user is in movement. This fact means that some energy, concentration, maybe hands or arms are used for the movement. It also means that it becomes more difficult to catch the information, maybe due to shakings, noise or other distractions, but also because of limited resources such as the smaller size of the display device. Time is another important limited factor closely coupled with mobility. In general a mobile user has less time, is in a hurry or needs to make immediate decisions. Taking all this into account - and this is the central issue of mobile usage - it means that the user is conducting any activity apart from the mobile information usage. This fact is stated precisely by [2]: "The presentation [...] must be conditioned by the user's activities and by the state of the world around them. The key driver however is not the bandwidth, nor the display restrictions of the wireless user, but rather the more fundamental fact, that he or she is doing something other than being connected to the Internet. The wireless user is busy."
In the next section we will have a closer look at these activities, since they are important for the concept of mobile cartography.

User activities in mobile situations

Geoinformation tasks and needs during mobility differ from those in a stationary environment. Different tasks (and different contexts) can require different forms of information transmittal. For mobile cartography it will be crucial to select different modalities, i.e. human perception channels, for communicating information dependent on the user's activities, since not all activities necessarily require a visual information representation. For some of them a visual presentation may not make any sense, is inefficient or can even cause danger. Let's just think of the distraction potential of visual stimuli. In a car, route directions in speech form might be more appropriate than graphical presentation. On foot, where stops are easier, directions drawn on a map make more sense. Further research has to be done to evaluate which type of information presentation is appropriate for which activities in which situations.

An activity is a sequence of actions conducted by a human being aimed at achieving a goal. The goal can be solving a problem or a task. An action itself is composed of one or several operations conducted unconsciously. Actions are planned by human beings to change a situation or an object to achieve the intended goal. In mobile situations goals of users could be orientation, finding persons or objects, finding the way to an object, etc. Clearly there are many activities possible sharing the same intention. However, often there are different actions imaginable to achieve the same goal. Elementary activities are localising, way finding, and searching. It is important to separate goals and plans of a user (e.g. navigation: get from here to point A) from the actions needed to achieve them (direction following, translation of position on the display to the real world environment, etc.).

Different user groups or different roles of the same user will typically perform different activities. A first step on the way to a more personalised and adapted presentation of geoinformation is therefore the distinction of different user groups, for example:
- professionals
- explorers
- tourists
- everyday users

These user groups differ in their knowledge, information needs, quality requirements, skills, activities, and so on. Professionals at work might need more (explicit) analytical functions, data capture and editing functions, and complex visualisation. Other users probably might desire more explorative functions, a variety of visualisations and maybe even Virtual Reality. Tourists would appreciate multilingual support, hidden functionality, easy usability, familiar visualisations, and multimedia. The next step is the identification of releveant user characteristics and the elicitation of user models. The purpose of user modelling is to know the user better in order to adapt systems behaviour to the user and increase the usability, hence the user's acceptance of a system or service. The elicitation of user models can be achieved by using different methods, such as user profiling, neural and Bayesian nets, Markov models, etc. A good introduction to these methods is given by [3]. The application of user models for adapting hypermedia information is demonstrated by [4]. The need for user models in the field of cartography is touched by [5] and [6].

In order to serve as an assistance system to answer spatial related questions, the analytical part will have to be extended to include context and user characteristics. There are two reasons for this:
- the analysis can be based on the context and user characteristics to bring forward more relevant results
- the analytical functions are necessary to support adaptation to context and personalisation (e.g. routing or neighbourhood analysis)

Apart from context and user characteristics, time has to be integrated in the analysis process. Reasons for that are time-critical applications and the achievement of short response times. The determination of the nearest cinema playing the movie "Mobilator 2" would for example only make sense, if the cinema was not closed due to a Bank Holiday. On the other hand we could imagine analyses triggered by events, e.g. the calculation of an alternative route if a traffic jam is noticed just ahead of our vehicle.
Enhancing response times can also be achieved by using context and user models trying to predict necessary analyses in advance and pre-calculate them on a server.

Mobile cartography

Before discussing the essence of mobile cartography, we start with a vision of the use of geospatial information. The vision is to present the mobile user always the right information at the right moment at the right place. Whoever the user is, he or she will always get the information relevant to his or her position, context and interests, knowledge and skill level, presented in a way he or she is used to. The use of such a system would be as easy as using a telephone or a remote control, since most of the complex functionality will be hidden from the user and as many tasks as possible will be automatically performed by autonomous agents, though interaction should always be possible when needed.
In a way the core of this vision is not new: we face mobile users having spatial (and non-spatial) tasks to fulfil or having spatial questions of all sorts. A mobile GIS will answer the questions and support the activities of a mobile user. This understanding easily fits into the concept proposed by [7], where three categories are distinguished: questions, functions, and answers. However, the existing notion of mobile GIS as mainly a data capture system in field falls too short for this purpose. In order to be a true mobile assistance system, mobile GIS must be extended by including further analytical functions, awareness of the user's context and characteristics.

For the visualisation part of this vision, [6] introduced a conceptual framework for mobile cartography. The goal is a more personal, easy to use, and flexible GIS for mobility purposes. Figure 1 shows the framework for mobile cartography.

Figure 1: Conceptual framework of mobile cartography

By information we mean the distributed, very heterogeneous sources of spatial, spatio-temporal, and non-spatial type. This could be anything such as maps, images, geographic features, texts, tables, or other resources. The information might differ in scale, quality, underlying data types, price, and availability. It can be either explicitly or implicitly geocoded. In the latter case automated geo-referencing mechanisms are needed. Furthermore, extraction procedures and spatial data fusion techniques have to be developed in order to make efficient use of this information pool. For a successful search and extraction process metadata play an important role.

The most important context element is of course location. However, there are many more facets of context, which can partly be derived from location. Other examples of context parameters are time, weather or medium of transport. The context in which a user is performing his activities has a strong connection to his information needs and can control the content and the visualisation mode of the information. There are also technical context elements, such as network quality, device characteristics and so on.

The activities a user wants to accomplish during mobility are very much dependent on context and vice versa. The activities need information and can be supported by visualisations for better efficiency, but at the same time they also influence the visualisation mode of the information.

The user plays the central role in mobile cartography. His knowledge, intentions, skills, preferences, abilities, and personality are the major parameters for a more personalised information extraction and visualisation. The user's privacy is a significant issue in mobile cartography. As mentioned above, there are many different activities a user can perform in a mobile environment and for which appropriate information visualisation techniques have to be developed.

For better task fulfilment and support of the visualisation process a broad palette of spatial analysis and reasoning functions are necessary.

Mobile cartography is primarily a very flexible and dynamic way of presenting spatial data to a mobile user based on the user's context and profile. The visualisation in a mobile context raises many requirements associated with graphics and generalisation. Furthermore it becomes necessary to visualise new types of information, for instance displaying positions within a certain tolerance range etc.

As mentioned in the section about the mobile environment, there are a lot of technical issues involved in mobile cartography. Many of them are already known from IT, GIS, telecommunication technology, and web mapping. Critical are the characteristics and limitations of portable, mobile devices (e.g. screen size), wireless data transmission networks, and new data types and formats.

To date only few research projects or groups study geoinformation usage issues in mobility, e.g. the DeepMap project [8] the EC CRUMPET [9] project, the LoL@ project [10] or the WebPark Project [11]. Much stronger are the (commercial) efforts related to developing location based services (LBS). "A location service, in the broadest sense, is any service or application that extends spatial information processing, or GIS capabilities, to end users via the Internet and/or wireless network." [12]. The OGC defines location services as follows: " ... location (application) services are any application software services that access, provide or otherwise act upon location information." [13]. The mobile network operators - at least in Europe - hope to get back some of the high investment costs for the establishing of 3G communication networks by offering value-added services, such as LBS to their subscribers.
It is very doubtable, if these services will bring the big money. At least the major criteria for the success of LBS can be established quite precisely. They are after [14]:
- speed of delivery
- completeness, compactness or clarity, currency, and relevance of delivered information
- simplicity of use

Seeing this list, we can try to think of some cartographic methods in order to meet at least partly these criteria. In the next section we present one possible approach, the adaptive visualisation.

Adaptive geoinformation visualisation

Using the concepts mentioned in the previous sections, a new way of visualisation of spatial information for mobile users can be accomplished. This visualisation is characterised by features like adaptation, user focus, dynamism, and context awareness. Figure 2 shows the basic principles of adaptive visualisation.

Figure 2: Process of adaptive geoinformation visualisation

By adaptive geoinformation visualisation we mean the ability of the visualisation technique to adapt to a specific user, his activities, and the current context or situation. Activities and context influence the information demand of a user. However, user, activities, and context also define the amount and detail of information extracted from these servers, the generalisation degree, and the way this information is visualised.

The adaptation takes place on different levels:
1) on the information level, the content of the information is adapted to user, activities, and context
2) extracted data from data servers, geodata servers, and map servers might need to be adapted to special data formats
3) data could be further adapted for transmittal over a wireless network (e.g. compression due to limited bandwidth)
4) data to be transmitted will have to be adapted to specific devices with different characteristics (display size and resolution, memory, CPU power, etc.)
5) and last the visualisation of the information will be adapted again to the user, his activities and context.

This means that for the same location different visualisations can be generated for different users. Moreover for the same user different maps could be rendered according to different contexts. Our adaptive map rendering approach is similar to the portrayal services proposed by the OGC [13]: " ... these services provide for the customisation, tailoring, and understanding of the display geospatial information." This is much different from current web mapping technology where mostly previously generated maps with fixed symbolisation are held in databases to be downloaded. Often these maps are simply scans of paper maps and do not allow many adjustments, because they are stored in raster format.
The symbolisation of the data could be generated dynamically for instance on a web server. Concerning generalisation a mixed approach will probably be taken. On the one hand there will be multiple representations for different scales. On the other hand minor generalisation operations might partially be generated on the fly as demonstrated in [15].

Requirements for maps on mobile devices

To achieve the mentioned adaptive visualisation - at least to a certain degree - we can list a couple of functional requirements that should be met by maps to be displayed in mobile environments. Basically they should be
- displayed in a fast rendering process
- flexible in content, i.e. the content should be dynamically updateable
- changeable in style
- easily legible
- crisp
- linkable to other information
- adaptable to different users, activities, and situations
- compatible to other web services
- derivable from existing information

The benefits of SVG for adaptive visualisation on mobile devices

Let us consider now the possible ways of presenting mobile users geoinformation on mobile devices. The easiest way would be to apply the well established web mapping approach. This means a user request (typically in the HTTP protocol) is handled by a web server and passed to a web map server. The web map server would respond by sending a rendered map in raster format. Although this is quite straightforward, there are several drawbacks. There is hardly any adaptation possible to the device characteristics (mainly the small display). Problems occur on maps with texts which might then be hard to read. Raster maps are static in nature. If the user's environment changes, this cannot be reflected in the map, or a complete new map must be requested. Raster maps also tend to be rather big in file size. Applying compression techniques only partly solves this problem, since there happen to occur negative effects, mainly with text.

As an alternative we could use vector graphics. The vector format for maps has a great potential on the web. This fact becomes obvious in the evolution of vector formats for the fixed-line Internet. It is even more apparent for the mobile Internet. The vector approach has some advantages over the raster format, such as smaller file size, flexibility, which will be honoured in the mobile environment. Among different vector formats on the Web, SVG seems to be especially useful for good reasons. SVG has a couple of features making it almost predestined for usage on mobile devices:
- small file size
- non-static; scriptable by using the Document Object Model (DOM)
- linkable
- adaptable
- no detail loss while zooming; better text readability
- open format; XML based; transformable
- searchable

If we compare this list of features with the one above referring to the requirements, we can state a pretty good match. [16] describe the features of SVG that can be applied to cartography. From a cartographic perspective the prominent elements of SVG are the <path> element for describing irregular geometric boundaries of map features, the <g> tag for grouping similar map elements for symbolisation or manipulation, the <mask> element for defining masks, the <script> tag for including some logic into to documents allowing for interactivity or event-based manipulation of elements, the <textPath> element which can display texts along a path, and eventually the <symbol> and <use> tag to define reusable elements such as point symbols.
First prototype applications using SVG can be found in [15], [16] and [17]. Although these examples address rather the desktop web mapping environment, they show the advantages and major methodology that will also apply to some degree for mobile cartography.
The current specification of SVG, the W3 SVG 1.0 specification, was mainly designed with desktop PCs in mind. It works well for them as the applications mentioned above show. However, since mobile devices can differ quite a lot in their characteristics and are all more or less limited compared to desktop PCs, SVG 1.0 runs into some problems in the mobile environment. With the planned, version 1.1 of SVG, currently in the candidtae reccomendation status, this problem is tackled. The modularisation of SVG lays the basis for an adapted subset of SVG more suitable for mobile devices. In version 1.1 the content of SVG 1.0 plus some additional features are grouped into a set of modules. Mobile SVG uses these modules to set up two profiles, SVG Basic and SVG Tiny. SVG Basic is aimed at PDAs and SVG Tiny at cellular phones. SVG Basic is of special interest for our purposes . It comprises a subset of the 1.1 modules. The idea is that SVG 1.1 can be transcoded to SVG Basic with least loss of functionality necessary. Apart from text, clipping, and filter module, all modules correspond to the full version of SVG 1.1

Structuring SVG documents

By structuring we understand the decomposition of a mobile map into several single SVG documents, but also the structure of unique elements or layered elements in one single SVG document.
A first simple approach is the separation of the spatial information into two groups: the base map including the geometric reference, (e.g. buildings, major roads, rivers and so on) and a superimposed layer of information that will be changed more often and maybe dynamically (e.g. point of interests, routes, point symbols, text/labels).
The base map and the dynamic map are stored in separate SVG documents. The dynamic SVG document(s) are then referenced by the base document.
In a single SVG document the structure affects order, grouping, and reusability of elements. Most importantly the order of elements in the document has the major impact on the visualisation, due to the SVG rendering principle which will paint the elements in the order of appearance in the document.
In the example section Figure 5 shows the base map for the city of Munich which contains three layers: background, buildings, and rivers.
Figure 8 shows the referencing of SVG documents. The base map SVG document links using the <use> tag and the xlink attribute to the document containing the point symbols which themselves refer using an <use> tag to the SVG document holding the symbol definitions. The referencing of external SVG documents is currently only supported by the Batik 1.1 Browser. Hence the SVG document in Figure 8 is composed of the three mentioned SVG documents to display properly. Below is the part of the document linking the external SVG document.

<use id="poi" xlink:href="view_symbol.svg#dynamic" />

Dynamic generation of SVG documents

A major advantage of SVG is its possibility to programmatically generate and modify documents. This power is needed for the adaptive visualisation approach mentioned earlier. In combination with database content, scripting languages (e.g. Perl or PHP) could be used for the dynamic generation of SVG documents in a web server context.
We will show some possible applications of Perl and the module allowing for the generation of SVG documents within Perl. The code examples in the examples section are all based on this SVG module. Although these examples are standalone programs they could quite easily be implemented as server-side scripts in a web server context.

Adaptive functionality using SVG

SVG offers a whole bunch of adaptive functions supporting the concept of adaptive visualisation. We can distinguish the adaptation to technical elements (network bandwidth), to the user, and to situations and activities. Following a few examples are given to illustrate the features SVG offers for adaptation.

Adapting to transfer bandwidth

Adapting to transfer bandwidth means to handle low capacities in order to achieve short transfer times for saving transfer costs or realising reaction times on the device. Commonly this is achieved by reducing the document size. The W3 Consortium suggests a couple of tricks to get smaller SVG documents (after
a) use the <path> element
b) use <symbol> and <use>
c) use SVG fonts (XML character data)
d) apply CSS (no need to define each element individually; can be cached)
e) apply filters
f) compress documents with gzip

Progressive rendering is another approach for handling the discrepancy between file size and display time. Progressive rendering means that elements are rendered successively and not all at once as the complete document. In the Batik 1.1 SVGbrowser preferences under browser options there is a checkbox 'Show rendering'. Checking turns on progressive rendering. This concept is sensible in combination with structuring the content in different documents as described above.

Adapting to user capabilities and intentions

In a simple case this adaptive functions could include the selection of appropriate language for the GUI, but also for the map content. Assuming a user wanting to get an overview, it would be much easier for him to read the labels of the most important map features in his native language. Such information could be stored and retrieved in a multilingual database.
But also the general map style could be adapted to the user's customs or cultural conventions. A simple approach is the use of different pre-defined style sheets that can be applied to the same SVG documents. Furthermore it is possible to store point symbols in a database. The appropriate symbol can be attached to the SVG document depending on the user's skills. Figure 8 shows an example of the dynamic generation of point symbols from a database.

Adapting to situations and activities

Imagine having a database with opening times of shops/restaurants. The symbolisation of map elements, mainly point symbols, referring to closed or unavailable objects could be displayed with a different symbol or different styles (e.g. other transparency value or colour). Figure 9 shows an example of the dynamic adaptation of point symbols depending on the opening times extracted from a database.

Example of an adaptive map generation

For the following example of adaptive functions in mobile maps we assume the following mobile usage scenario: a user is visiting the city of Munich. We know he is interested in museums, especially technical museums. We further guess he must be hungry, since he travelled all this Sunday morning from Castle 'Neuschwanstein' to Munich and now it is lunchtime. We know his native language is English. As he has just visited the Town Hall, we assume he will visit the 'Deutsches Museum' next and wants to know the route by bus, because it is raining.
The SVG examples in Figure 4 - 10 are designed for a PDA with a display format of about 60 by 80 mm.

1. Source data in proprietary GIS formats

The information available is held in Arcview GIS. Points of interests (POI) are stored in a Dbase table 'poi.dbf'. This table will later be accessed for dynamic point symbol generation.


Figure 3: Base data in Arcview GIS

2. Conversion to SVG

In this step the proprietary format, in this case Arcview Shapefiles, are converted to SVG. We used the SVGMapper 1.3

Figure 4: Raw SVG document

3. Adaptation of content (e.g. selection)

Next a SVG document is generated containing only the base map elements.

Figure 5: Selected content for base SVG document

5. Adaptation to user capabilities and skills (e.g. language)

Now we adapt to the user's abilities. We choose the native language and label some features in the document in English using Javascript. Clicking the boxes will select the language, i.e. the user can switch between German and English labels.

Figure 6: Adaptive text; Javascript based language selection

6. Adaptation to user customs (e.g. style sheet)

To adapt to the user's customs or some professional conventions we change the symbolisation applying a style sheet (CSS).

Figure 7: Style sheet applied to base SVG document

7. Adaptation to user intentions (dynamic symbol generation)

In this step we try to adapt to the user's interests or activities. We select the relevant objects (museums, restaurants, public transport) from the POI database and generate a point symbol document. The Perl code listed below will generate an SVG document called view_symbol.svg containing the point symbols. The single symbols in this document are referenced by a <use> statement from the symbol library, the document symbols.svg. The generated document view_symbol.svg itself is referenced by the base map document. This works well with the Batik 1.1 SVGbrowser, but not with the Adobe SVG Viewer. Therefore we merged the symbols, the symbol library, and the base map into one single document which is displayed in Figure 8 below. The same applies to the document in Figure 9. However, to see all this working, you can get the Batik 1.1 SVGbrowser and load the document example_symbols.svg.

Figure 8: Symbolisation according to user intentions

#!C:\Programme\Perl\bin\perl -w
# Data-driven SVG generation ...

use strict;
use SVG;

my $database = "poi.dbf";
my $symb_lib = "symbols.svg";

open DOC, ">view_symbol.svg";

# ---------------------------------------------------------------
my $svg = SVG->new(width=>60,height=>80, viewBox=>'4468310 -5333330 874 1056');
my $grp = $svg->group(id=>'dynamic');

# ---------------------------------------------------------------
use Win32::ODBC;

my $db = new Win32::ODBC($database);

print "\tOpening ODBC connection for $database ...\n\t\t";
    if (!($db = new Win32::ODBC($database))){
        print "Failure. \n\n"

        print "Success (connection #", $db->Connection(), ")\n\n"

my $sql_string = ("SELECT X, Y, SYMBOL FROM poi WHERE SYMBOL <>''");
$db->Sql ($sql_string);

# ---------------------------------------------------------------
my @data = ();

while ($db->FetchRow() ) {

@data = $db->Data();

my $x=($data[0]-30);
my $y=($data[1]+30);

  $grp->use(x=>$x, y=>-$y, '-href'=>"$symb_lib#$data[2]");
# ---------------------------------------------------------------
my $out=$svg->xmlify();

print DOC "$out";

close DOC;

8. Adaptation to situations (e.g. opening times)

We adapt the generated point symbol document to the current situation. From the POI database we select the objects which are closed on Sundays and display the symbols with a lower opacity value to reflect the disabled status of these objects. The Perl code listed below will generate an SVG document called view_symbol_open.svg containing the point symbols with different opacities. Again, the different documents are merged into one for displaying correctly with the Adobe SVG Viewer. To see the referencing working you will need to load the document example2_symbols.svg in the Batik SVG Viewer.

Figure 9: Symbolisation according to situation (e.g. opening times)

my $sql_string = ("SELECT X, Y, SYMBOL, CLOSINGDAY FROM poi WHERE SYMBOL <>''");
$db->Sql ($sql_string);

# ---------------------------------------------------------------
while ($db->FetchRow() ) {

my @data = $db->Data();

my $x=($data[0]-30);
my $y=($data[1]+30);
my $symbname = $data[3];
  if ($symbname ne "sunday") {
    $grp->use(x=>$x, y=>-$y, '-href'=>"$symb_lib#$data[2]");

  else {
    $grno->use(x=>$x, y=>-$y, '-href'=>"$symb_lib#$data[2]");

9. Adaptation to activities and situation: (e.g. route animation)

In the last step we adapt to the user's situation. The user wants to visit a museum and would like to get an idea how to get there. Since it is raining, an animation of the bus route is generated. The code listed below generates a document bus_animation.svg containing an animation of a circle along a path representing the bus route. The last part of the trip is a short walk which is reflected in the animation by changing the circle's colour. After slight modification this document can be intergrated in the base map document.

Figure 10: Animation of bus route

#!C:\Programme\Perl\bin\perl -w
# Animated SVG generation ...

use strict;
use SVG;

my $aox = 4468630;  # -- center point of animated object; x-ccordinate
my $aoy = -5333260; # -- center point of animated object; y-ccordinate

open DOC, ">bus_animation.svg";

# ---------------------------------------------------------------
my $svg = SVG->new(width=>'60mm',height=>'80mm', viewBox=>'4468310 -5333330 874 1056');
my @x=();
my @y=();
my @x2=();
my @y2=();

     @x = (4468630, 4468625, 4468470, 4468409, 4468434, 4468366, 4468518, 4468513, 4468534, 4468579, 4468722);

     @y = (-5333260, -5333207, -5333103, -5333015, -5332979, -5332913, -5332741, -5332704, -5332679, -5332682, -5332516);
     @x2 = (4468722, 4468802, 4469034, 4469071);
     @y2 = (-5332516, -5332433, -5332619, -5332565);

# ---------------------------------------------------------------
my ($coordinates, $p);
$coordinates = $svg->get_path(x=>\@x, y=>\@y,-type=>'path');
$p = $svg->path(%$coordinates, style=>{'stroke'=>'navy', 'stroke-width'=>'6', fill=>'none'});

my $coordinates2 = $svg->get_path(x=>\@x2, y=>\@y2,-type=>'path');
$p = $svg->path(%$coordinates2, style=>{'stroke'=>'steelblue', 'stroke-width'=>'6', fill=>'none'});
# ---------------------------------------------------------------
my $i = 0;
my $n = scalar @x;    
while ($i < $n) {
$i = 0;
$n = scalar @x2;    
while ($i < $n) {

my $an_circle = $svg->circle(cx=>$aox, cy=>$aoy, r=>15, fill=>'rgb(255,0,0)');

   my $animation_coor = $svg->get_path(x=>\@x, y=>\@y,-type=>'path');

 $an_circle->animate(-method=>'Motion', dur=>"9s", fill=>"freeze", path=>($animation_coor));

 $an_circle->animate(-method=>'Color', attributeName=>"fill", values=>"red;darkgreen", begin=>"9s", dur=>"2s", fill=>"freeze");

   my $animation_coor2 = $svg->get_path(x=>\@x2, y=>\@y2,-type=>'path');
 $an_circle->animate(-method=>'Motion', begin=>"11s", dur=>"8s", fill=>"freeze", path=>($animation_coor2));  

# ---------------------------------------------------------------
my $out=$svg->xmlify();

print DOC "$out";

close DOC;

These examples are intented to show the basic principle of adaptive visualisations and the potential of SVG for mobile cartography. Naturally there are a lot of improvements thinkable. First, the kind of scripts showed in the examples must be integrated in a web server context. Furthermore we should address load balancing. What kind of adaptations can be realised client-side using scripting and the DOM? What adaptive functionality is only managable server-side? The examples do not contain any text masks. For better legibility of the maps text masks are a necessity. These masks can be implemented with the clipping functions of SVG. Another legibility issue is the the possible overlapping of text labels and symbols. We will have to include certain logic in our document generation scripts to handle this problem. A similar appoach of map adaptation is propsed in [18]. It features the storing of map styles and configurations in XML files.


As we have seen in the first part of the paper, many technologies exist already. Still there is a lot of research to be done. As a proof of concept we plan to develop a prototype web service for a mobile device. The main focus will be on adaptive functions for mobile users and the handling of dynamic symbolisation. Based on the conceptual framework proposed in this paper we will try to establish a few typical mobile usage scenarios.
Our future work will include the study and classification of activities relevant for mobile cartography, the elaboration and implementation of adaptive methods, and the investigation of the question when adaptation (or generation) of SVG documents should take place on the server and when on the client.


[1] "Ericsson's mobile location solution", G. Swedberg, 1999. In: Ericsson Review (4), S. 214-221.

[2] "Location-Based Services & GML: Laying the Geo-spatial Web Foundations", Galdos Systems Inc., March 15, 2001. Available at:

[3] "Predictive Statistical Models for User Modeling", I. Zukermann and D. W. Albrecht, 2001. In: User Modeling and User-Adapted Interaction (11), S. 5-18.

[4] "Adaptive Hypermedia", P. Brusilovsky, 2001. In: User Modeling and User-Adapted Interaction (11), S. 87-110.

[5] "User-Centred Human-Computer Interaction In Cartographic Information Processing", D. Dransch, 2001. In: Proceedings of the 20th International Cartographic Conference, Beijing, China, August, 6 - 10, 2001.

[6] "The World In Your Pocket - Towards A Mobile Cartography", T. Reichenbacher, 2001. In: Proceedings of the 20th International Cartographic Conference, Beijing, China, August, 6 - 10, 2001. Available at:

[7] "Geographic Information Systems : A management perspective", S. Aronoff, 1991. WDL Publications, Ottawa.

[8] "Deep Map: The Multilingual Tourist Guide", R. Malakka, 2000. Available at:

[9] "Personalized and Easy-to-use Mobile Services for Tourists", B. Schmidt-Belz et al., 2001. Available at

[10] "Cartographic Concepts for Realizing a Location Based UMTS Service: Vienna City Guide Lol@", G. Gartner and S. Uhlirz, 2001. In: Proceedings of the 20th International Cartographic Conference, Beijing, China, August 6 - 10, 2001.

[11] "WebPark". Available at

[12] "What are Location Services? - From a GIS Perspective", I. Koeppel, 2000. Available at

[13] "OpenLS Initiative - Request for Technology", Open GIS Consortium, 2000. Available at

[14] "Web mapping. Get mobile, it's the place to be, V. Geake, 2000. In: GIS Europe (09/2000). Available at

[15] "Multiskalierte Datenbanken und kartographische Generalisierung als Elemente guter Internetkartographie", A. Cecconi and M. Galanda, 2001. In: Proceedings of the AGIT 2001, Salzburg, Austria.

[16] "Vector-based Web Cartography: Enabler SVG", A. Neumann and A. Winter, 2000. Available at

[17] "Generalizing XML-Encoded Spatial Data On The Web", L. Lehto and T. Kilpelainen, 2001. In: Proceedings of the The 20th International Cartographic Conference, Beijing, China, August, 6 - 10, 2001.

[18] "User-Adaptive Maps for Location-Based Services (LBS) for Tourism", A. Zipf, 2002. Available at