Using compact GML to Deploy Interactive Maps on Mobile Devices

Emanuela De Vita
CRS4, Center for Advanced Studies, Research and Development in Sardinia
VI strada Ovest, Z.I. Macchiareddu
I09010 - Uta (CA), Italy
(+39) 070 27961
emy@crs4.it
Andrea Piras
CRS4, Center for Advanced Studies, Research and Development in Sardinia
VI strada Ovest, Z.I. Macchiareddu
I09010 - Uta (CA), Italy
(+39) 070 27961
piras@crs4.it
Stefano Sanna
CRS4, Center for Advanced Studies, Research and Development in Sardinia
VI strada Ovest, Z.I. Macchiareddu
I09010 - Uta (CA), Italy
(+39) 070 27961
gerda@crs4.it

ABSTRACT

As users get connected with new-generation smart programmable phones and Personal Digital Assistants, they look for geographic information and location-aware services. In such a scenario, developers need infrastructures and standards in order to provide geographic data and cartographic tools to a wide set of applications and small mobile devices. GIS market offers a rich set of powerful tools for geographic information management, but a simple and lightweight protocol to easily add cartographic functionalities to mobile applications is still missing. This paper presents the compact Geographic Markup Language (cGML), a custom version of GML tailored for mobile devices. By using small tags, server side pre-projected and pre-scaled coordinates, it allows development and deployment of map-based software for mobile phones and PDAs with strong constraints on connection, CPU and memory.

Keywords

XML, mobile cartography, GML, J2ME

1. INTRODUCTION

The diffusion of hand-held devices (like Personal Digital Assistant, PDA), new generation of programmable cellular phones (SmartPhone) and the availability of development environments for such devices have made possible the design and development of new kind of software. Mobile users require specialized applications for mobility support and personal information management. Many of such applications are specialized for geographic data management and cartographic presentations (i.e. navigation systems, interactive maps for tourism and commerce). Current mobile cartographic systems are based on ad-hoc approaches, tailored for a specific device. Moreover, they are stand-alone applications, aimed only to support user mobility. At the same time, software development for mobile devices and web applications is moving from digital mapping and travel assistant applications to Location Based Services (LBS) [3], in which content and information is filtered according to user position. The need for embedded maps into general purpose application is emerging.

2. GEOGRAPHIC DATA FOR MOBILE APPLICATIONS

There are mainly three approaches to mobile cartography implemented in commercial products. A common solution is based on native application and data installed on client device. Such an approach doesn’t require any Internet connection: all data has been stored locally on the device before the trip.
Another one is based on a web application: the user connects to a web site which provides a form-based interface. The user can specify a zoom factor, a search key and preferences about map details but each result is always a static, non-interactive sequence of images. Moreover, such an approach requires a permanent Internet connection, in order to submit queries and get results.
The last one mixes the twos: the user browses the map service using a PC and transfers final (static) map to the target device. During his trip, the user doesn’t need an Internet connection but he will not be able to modify pre-loaded map.
These three approaches share a common drawback: they are stand-alone applications. They are not (nor can be) integrated with other application, like an agenda or a address book. This is not a issue for very specific applications (like professional cartographic programs), but often a large set of mobile application need a simple map-like representation of geographic data (and maps are only an ”accessory” functionality, not a must). A new scenario emerges: simple maps should be retrieved remotely and described in a platform independent format. Such a solution can be easily implemented with web services technology and XML-based languages.

3. ENCODING GEOGRAPHIC DATA IN A XML LANGUAGE: GML

The Geography Markup Language (GML) is an open standard for encoding geographic information in a XML language defined by the Open GIS Consortium. It is not related to any specific hardware or software platform: data encoded using it can be easily read and understood by any programming language and software system able to parse XML streams. GML encodes vector geographical information together with metadata on spatial and non-spatial resources. GML can be easily converted in a different language using standard XML transformation facilities (XSLT). There are commercial and open source tools that translate GML data into SVG format, in order to display maps on standard plug-ins. Sometimes SVG is not suitable for target applications, since they need to access data model (GML) instead of getting a ”plottable” representation of such a model (SVG or other).

4. GEOGRAPHIC DATA FOR MOBILE DEVICES: COMPACT GML (CGML)

There are mainly two drawbacks in using GML for mobile devices. First, it is memory- and bandwidth-consuming for storage and transfer respectively. Moreover, maps described with it have to be projected and scaled before being plotted. These characteristics make the GML not directly accessible with small devices.
Starting from these considerations, we tried to customize and reduce GML size in order to make cartographic data accessible from mobile devices. Long GML tags has been substituted with shorter ones (see Table 1). Output file remains human-readable, but considerably smaller. At a first sight it could be considered a trivial strategy, but it permits to reduce bandwidth and memory occupation by 60%. Moreover, since it uses a static, well-known vocabulary, no computation has to be performed to decompress incoming stream.

   

GML cGML
FeatureCollection FtCl
FeatureMember FtMb
LineStringMember LnStMb
coordinates cd
Table 1. Comparison between some GML and cGML tags.
As said before, GML data has to be projected and scaled before painting operations. Coordinates express geographic locations with high definition, with more details respect to actual user needs and visualization capabilities of the device. Anyway, projecting and scaling geographic data can be unpracticable on small appliances, since many devices (e.g., all MIDP-compliant mobile phones) have not a native support for floating-point math. Therefore, maps sent to mobile devices could be pre-projected and pre-scaled by the server, according to the device profile of client machine (screen size, color depth, memory size). Such a strategy permits to easily plot geographic data with a few computation, with up to three in-out zoom factors. Since cGML is tailored at runtime for actual client, it adds some tags to GML syntax for encoding device dependent information.

5. ARCHITECTURE

We have tested cGML on a web service that exports geographic data provided by a GIS service to a Java client. The client requests maps from the server by providing absolute coordinates of required area, name of layers and device profile. Query format is not complitely defined, we are still working on it and testing a templatebased approch, in which the client send a ”blank” cGML file as request. In order to test map data provisioning on real devices, two cGML engines has implemented, running on a PersonalJavacompliant PDA (Compaq iPAQ) and J2ME/MIDP enabled Smart- Phone (Nokia 7650) respectively. The former has been tested with a wireless 802.11b connection, while the latter used a GPRS connection. Both tests have shown that the adoption of cGML model optimizes bandwidth usage and improves rendering process (since no calculation must be done to plot the map on the screen).

cGML provisioning through a web service
Figure 1. cGML provisioning through a web service.

6. RELATED WORKS

Other works [2] has shown that map provisioning for mobile devices requires a complex infrastructure to be implemented. cGML can simplify application implementation and deployment, by means of XML-based language and web services infrastructure. In the field of User-Adaptative Maps [3], it has been shown that it is not enough to focus on adaptations to technical parameters (device characteristics, QoS, Location) but maps need to be dynamically generated according to a wider range of variables. cGML is on-fly generated according to device profile, but it can be tailored according to any other user (or device) property (specified in the query sentence).

7. CONCLUSIONS

GML provides an open standard to exchange geographical data but is not suitable for low-end mobile devices. We have proposed a compact version of GML (cGML), based on short tags and encoded with pre-projected and pre-scaled coordinates, according to target device profile. In our approach, it acts as model and view at the same time; data model can be totally transferred to client device for caching and local operations without a permanent connection to the server. cGML keeps some key features of GML: it is platform independent (while it is session dependent), easily extensible, human readable. It has been used in the e-MATE project [1], where it has been a key component in the development of multimodal location-aware distributed applications for wireless devices.

8. REFERENCES

  1. D. Carboni, et al. E-mate: An open architecture to support mobility of users. Databases and Information Systems II - Fifth International Baltic Conference, Baltic DB & IS 2002, Tallinn, June 2002.
  2. T. Reichenbacher. The world in your pocket towards a mobile cartography. 20th International Cartographic Conference, Beijing, August 2001.
  3. A. Zipf. User-adaptive maps for location-based services (lbs) for tourism. 9th International Conference on Information and Communication Technologies in Travel & Tourism - ENTER 2002, Innsbruck, January 2002.