A Distributed Approach to GIS systems and Location-based Service for Internet-enabled Handheld Mobile Devices Arpan Roy, Adway Mitra, Haimasree Bhattacharya, Shibasis Biswas, and Pradip K. Das. Centre for Mobile Computing and Communication (CMCC), Jadavpur University, Salt Lake Campus, Kolkata-700098. Email:-
[email protected]@
[email protected]@gmail.com.
[email protected]
Keywords: GIS, GPRS, GPS, NMEA, Servlet.
Abstract Geographical Information Systems for PCs and mobile devices are rapidly gaining popularity. This paper presents a new server-based GIS architecture which is unique in that it is a totally WAP browser based application with user interface in HTML or WML and J2ME and relying entirely on Internet in mobile devices via wireless LANs or GPRS for accessibility. Wireless Internet-based Distributed GIS (WIDGIS) is a distributed two tier location information system. This distributed GIS architecture is based on a system of Java Servlets deployed in a system with fixed global IP address that regulates the flow of information to clients requesting service from it. The data can be textual or in the form of a map showing the relevant location information. A J2ME application, running at the client‟s handset, is capable of tracking GPS signals, downloading maps and indicating the user‟s exact position on the downloaded map, thus tracing out his movements. Also, it is possible to simulate a particular client‟s movements using a JAVA Swing application deployed in the server.
1 Introduction Wireless Distributed Geographical Information System (WIDGIS) is a Geographical Information System service designed for users of mobile devices having GPS and GPRS capabilities. It is particularly important for people who have come to a new place and have no idea about the location of different amenities available there. On running this application, the user of the handheld device has to select what type of facility he wants to get information about (Educational Institute, Medical Center, Shopping Center, and Terminal for Railways, Buses etc). WIDGIS, discussed in this paper is a WAP based service. An advantage for WIDGIS is that the location method is in the form of latitude and longitude which is easily available from inbuilt GPS tracking infrastructure in PDAs like HP iPAQ, or hi-tech mobile phones like HP Blackberries, Nokia N-Series. WIDGIS being a „pull‟-based [1][8] tool, data is delivered from server (source) to client (sink) only on explicit request from the client. The extensive use of mobile agents and the utilization of wireless Internet
over GSM networks of mobile phones have never been used quite effectively to design a distributed GIS architecture.
2 Related Works An instance of one of the earliest non-cartographic GIS inspired system is Air Quality Information DisseminationAPNEE [4] in Europe via SMS or WAP based services in mobiles. In CMCC (JU) an SMS based location service [7] was developed for assisting mobile users. It is 2-tier server-client architecture with a „pull‟ based client service. It works only in a PDA with a specific version of operating systems for mobiles (Windows 2003 mobile in this case). Server-client exchange of metadata is mediated by the Short Message System (SMS). A Java application in the server polls continuously to detect SMS from the client. Once the SMS reaches the server, the application parses the string of location data to extract the latitude and longitude. It then evokes the database query class which compares the latitude and longitude with the database entries to find the location nearest to it and the resultant data is sent back to the client in the form of an SMS.
3 Architecture Having established the motivation behind the design of a Wireless Internet based Distributed text-based Geographical Information System; this section provides an overview of the WIDGIS architecture (Figure 1) followed by its detailed design and its advantages. As said earlier, this is a distributed architecture [2][3]. 3.1 Overview From the architectural point of view, it has two layers- 1) The Client Interface Layer (CIL) and 2) The Data Server Layer (DSL). The CIL presents the user an interface in HTML/WML for accepting requests and returning textual information, and for showing him his movements graphically on maps (downloaded at regular intervals using GPRS) using a J2ME application. The DSL consists of Servlets, databases and files for accepting client requests, processing them, retrieving requested spatial information from the database and returning the client the requested information, and also the suitable map. Besides, the client-tracking software also runs in this layer.
From the software viewpoint, there are 3 parts- A) a distributed Geographical Information System or Location-Based Textual Information System (LBTIS) (non-map based GIS service), B) a Client-based path-tracing application (map-based GIS service) and C) a Server-rooted client-tracking application.
textual information. The Servlet then dynamically generates the response page using the retrieved information. Database query classes are coded in Java making use of the JDBC Drivers and JDBC API. The location information response consists of the name of the nearest landmark of requested type closest to the client, the approximate direction in which it lies from the client‟s present location and all these are embedded into a single HTML page by the server. Also, there is a file where the server stores each client request. Each record consists of the following field: 1) Latitude 2) Longitude 3) ID of the client 4) date of request 5) Time of request. These records are useful for the Server-rooted Client Tracker Application described later.
3.2 Application Design
II) Client Registration & Sign-in Module (CRSM):- The use of this GIS system is subscription-based. Hence a proper client identification protocol becomes imperative. The WIDGIS authentication module starts functioning a) when unregistered client requests information from the GIS server or b) a registered user seeks location service. If the user is new to WIDGIS a registration page opens up prompting the client to submit a username, credit card information (for registration) and a password of their choice. When an existing user logs into the system he is prompted for his username/mobile number which when authenticated he is taken into the CSDPM.
Location Based Textual Information System (LBTIS)
Handset-based Path Tracing Application
The LBTIS comprises two main modules: I) Client-Server Data Pull Module (CSDPM):- The primary module in the LBTIS is the „Pull‟ [6] based data flow module. It has two sub modules, the data sending module and data receiving module. i) The Client side: - It consists of a markup language based client interface. Pages in HTML (in case of GPRS-enabled HP Blackberry, N-70, Nokia 6600 or laptops using a standard data card for wireless Internet connectivity) or WML (in case of lower order mobiles) are opened by loading the static IP address (or Domain Name) in the micro browser of the client‟s mobile device. The client can request any location-based information the server offers to provide, and submit spatial data in form of the user‟s current latitude and longitude. Then the „doPost‟ method in the Servlet deployed in the server is invoked with the client‟s spatial data as arguments. The Servlet then dynamically generates a HTML page containing the requested information, and returns it to the client ii) The Server side: - This is a system deployed in a system with global IP. Here the Servlets are deployed in Apache Tomcat 4.1 in JDK 1.6 environment. It has three HttpServlets. One of them is the GIS Servlet which deals with the receiving and sending of location information. The other two are registration Servlets required by the client registration and login module. The server has access to databases (designed using MySQL). It forms queries using the client‟s spatial data and connects to the database. The database replies with the suitable
This application is coded in J2ME. Being map based, it lends scalability to this GIS service. It is also distributed like LBTIS, but however most of the processing is done at the client end. The application tracks GPS signals, extracts the current latitude and longitude (similar to LBTIS) and invokes a Servlet deployed at the server end. There is a database of URLs for maps in this server. The Servlet, after processing the data and querying the database, selects a map showing the user‟s position. Also, as in LBTIS, the record is entered into a file to help the tracking application described later. The Servlet returns the map URL to the J2ME application, which establishes another HTTP connection with the map server using this URL. The map is converted into a byte array and downloaded into the device using GPRS. The (latitude, longitude) pair is then used to locate the position of the user in this map, and that position is accordingly indicated. As long as the application is running, the whole process repeats itself at regular intervals to update the current position. The detailed design has been described below. It consists of two different modules, one runs in the client side (CSM), another runs in the server side (SSM).
Figure 1: Layer Structure of WIDGIS
1) Server Side Module (SSM): The server has a GIS database consisting of longitude and latitude values (Degree, Minute, Second), corresponding information and URL of an appropriate map. We have allocated separate maps for 1 minute difference in latitude or longitude data. The server also consists of maps
of the locations enlisted in the database. A Servlet is deployed on the server side which performs the location data receiving (From CSM), database searching and geographical information as well as the map URL writing (To some local files). So, three sub modules are working on the server side. i) Data Receiving Module (DRM): Here the Servlet receives the longitude and latitude of the current location of the client using the doGet method. ii) Database Searching Module (DBSM): The application connects to the database using the JDBC connection and finds out the corresponding information (name, feature) and map URL for that location. iii) Information Writing Module (IWM) : Now the name of the location, information about the location as well as the map URL will be written to three different local files. These will be accessed by the DRM of the CSM to provide the necessary information about the current location to the client. 2) Client Side Module (CSM): The client side module is a J2ME application. It comprises of four sub modules-i) data sending module , ii) data retrieving module, iii) Image Downloading Module, and iv) Animation module. i) GPS Data Sending Module (GDSM): The CSM is run in a PDA (in our case we have used HP IPAQ hw6500) using WEME. A serial port connection is built with the GPS receiver. The module continuously checks the NMEA sentences received at serial port until it receives a complete sentence of the format GPGGA. By proper parsing of the NMEA sentence (of format GPGGA) we find out the correct longitude and latitude values of the current location. An http connection is established to a Servlet and the latitude and longitude values are sent to the Servlet using GET method. ii) Location Data Retrieving Module (LDRM): The LDRM sub module in CSM retrieves necessary information about the current location of the client carrying PDA for example the name of the location, the information about the location as well as a suitable map for the current location from the SSM. After making the connection the content of the files are converted into byte arrays and this byte arrays are received on the client side one by one. These are converted into three strings. The string corresponding to the map URL is transferred to the Image Downloading Module. iii) Image Downloading Module (IDM): Another http connection is established with the map URL. The image is first converted into byte array. This array is received from the server side though GPRS and reconverted into an image on the client side and is shown on the PDA Screen. iv) Animation Module: The second portion of the latitude, longitude data are used by the animation module to show the actual position of the client on the PDA screen over the map. An animation is performed at this particular position to reflect the presence of the client. This CSM will run after every 10 seconds automatically in order to reflect the actual position of the client. If the changes in both latitude and longitude values from the previous location are both less than 1 minute, then the
same image from memory is displayed with the corresponding change in animation. Otherwise a new image will be downloaded and displayed along with the animation. Server-rooted Client Tracker Application (SCTA) It is concerned with tracking WIDGIS users on the basis of the requests made by them to the WIDGIS server. This is primarily a simulation-based application where the actual path of user is traced on the basis of spatial data provided by the client. The client is tracked on the basis of these scalable vector GIS data (SVG) [10] in the form of Google Earth satellite images. The software is composed of two modules, namely i) the display module & ii) the administrator module. Both the modules are completely based on Java Swing API. It requires the support of javax.swing library and requires swing.jar file in JDK‟s lib. i) The Display Module: When the application is launched in the display module, the operator is provided a list of those WIDGIS users who are still subscribed. Simulation can be either real-time or on the basis of their movement records already stored. In either case, the application reads from the file a record and checks if the user associated with that record has been selected by the operator. If so, the application chooses the suitable map from its folder, loads it on the display page, and paints the animation showing the position of that particular user. Also, this can be done in either “NATURAL RESOLUTION” form or in “HIGH RESOLUTION” form. In the first case, the point indicated by the record (by latitude and longitude) will be animated in the suitable map. In the second case, however, the application simulates the movement of the user in greater detail, using interpolation to trace out the route between the last two query-points for that user. It may so happen that those two points are not connected by a straight road. Then, to trace out the path, we also need to store information about roads in that region. ii) The Administrator Module: This module gives the system administrators the option to manually delete or add any client into the client database. This type of client tracking will eventually find use in location based tourism. LBIS is also one of the practical offshoots of the specific types of LBS proposed in [10]. Data delivery can be of two distinct types: - „push‟ or „pull‟ [8]. The WIDGIS architecture makes use of both the concepts simultaneously. The client “pulls” information from the server by making explicit requests with his spatial information, but the server-based tracking application views this information as a “push”, since it uses the same information to simulate the movements of the client.
4 Testing and Results Extensive testing has been carried out over and around the city of Kolkata to test the efficiency of WIDGIS. Provided that a minimum amount of spatial information of the testing region is stored in the server‟s spatial database, server responses have
always been found to be compatible with actual geography of the region of testing. Also this GIS stands on the vantage fact that its textual response is faster in low bandwidth, limited speed GPRS based internet over transfer of textual spatial data to the client site. Response times of server to client requests were recorded over a range of devices (namely HP iPAQ hw6500, Nokia N-70 and Nokia-6600). WIDGIS service was found to handsomely outperform the SMS based location service.
We acknowledge the help and contribution received from Niranjan Patra and Niladrish Chatterjee, in developing the SMS-based location service. We also like to thank the staff of Centre for Mobile Computing and Communication for their valuable co-operation. The authors gratefully acknowledge the infrastructural support provided by the Center for Mobile Computing and Communication (CMCC) set up by the University Grants Commission (UGC), Government of India, under its UPE scheme.
References
Figure 2: Response time of LBTIS
5 Improvements to the Applications A) LBTIS: The present server extracts the landmark nearest to the user‟s location from the database and returns textual information. In a more advanced stage of the work, the server would establish a connection with another server which would generate maps (as images) dynamically when provided with the suitable latitude and longitude. (In this case, the Yahoo! Map Image API [11] may act as the map-server.) The image thus obtained would be embedded by the server into the response HTML page. B) Path-Tracing Application: The process of downloading a map from a remote computer is not always very fast, especially since the connections are wireless. The application developed so far downloads a map after every 30 seconds for real-time path tracing. The need of frequent downloading can be done away with, if it is possible to pre-fetch and store some maps in the memory of the mobile devices. The only way to implement this in GPS-enabled iPAQ is by using RMS (Record Management System).
6 Conclusions WIDGIS software takes advantage of inbuilt GPS tracking in PDAs or GSM networks to direct the client to his destination. Accolade for this application mainly lies in the fact that most of the GSM networks work on 2G wireless telephone technology using GPRS of a lower bandwidth. With the arrival of higher speed 3-G technology, the transfer of cartographic data over the GPRS would become easier and its advantages over WIDGIS will increase. However arrival of 3G technology in most countries is still quite far away.
Acknowledgements
[1] Demet Aksoy & Mason Sin-Fai Leung "Pull vs Push: A Quantitative Comparison for Data Broadcast” in GlobeCom 2004, IEEE Communication Society [2] Jihong Guan, Shuigeng Zhou, Fuling Bian and Aoying Zhou "Mobile Agent-Based Distributed Geographic Information Systems under Internet Environment" in Database and Expert Systems Applications, 2000. [3] Juhong Guan, Shuigeng Zhou and Fuling Bian " A Mobile-Agent and GML Based Framework for Integrating Distributed GIS" IAPRS Volume XXXIV, Part-2, Commission II, Xi'an, August 2002 [4] Kostas Karatzas, Gertraud Peinel, Thomas Rose “GISbased Dissemination of Air Quality Information in APNEE”, Project APNEE (Air Pollution Network for Early warning and online information Exchange in Europe) 1999-2000 [5] Manhoi Choy, Mei-Po Kwan, and Hong Va Leong "On Real- time Distributed Geographical Database Systems" Research Report no.21, UC Santa Barbara, December 1993 [6] http://www.cs.ucdavis.edu/~aksoy/PLASMA/ [7] Pradip K. Das, Niranjan Patra “Server-based locational management system for GPS enabled vehicles” Technical Report, 2007. Centre for Mobile Computing and Communication (CMCC), Jadavpur University. [8] Serge Boucher and Prof. Esteban Zimányi “Software Engineering Issues in Location Based Services” Université Libre de Bruxelles, Brussels, Bou Masters Thesis 2005 [9] Wu Binzhuo and Xia Bin "Mobile Phone GIS based on Mobile SVG" in Geoscience and Remote Sensing Symposium, 2005. [10] http://www.trimble.com/mgis_mobilegis.shtml [11] http://developer.yahoo.com/maps/rest/V1/mapImage.html Adway Mitra is currently a final year undergraduate student of Computer Science and Engineering in Jadavpur University, Kolkata, India. His main areas of interest are Sensor Networks, Mobile Computing and Computational Geometry.