Location-Based Information Systems

Size: px
Start display at page:

Download "Location-Based Information Systems"

Transcription

1 Location-Based Information Systems Developing Real-Time Tracking Applications Miguel A Labrador Alfredo J Perez Pedro M Wightman CRC Press Taylor & Francis Group Boca Raton London New York CRC Press Is an Imprint of the Taylor & Francis Group, an Informa business A CHAPMAN & HALL BOOK

2 Contents 1 Introduction 1 11 Definition and Classification of LBS Types of LBS Applications 2 12 Location Provider Architectures 3 13 A Complete LBIS Real-Time Tracking System Example 6 14 Software Architecture Client-Side Software Architecture Server-Side Software Architecture A Brief Look into the Future Organization of the Book 13 2 The Mobile Phone Introduction The Hardware Architecture The Microprocessor Digital Signal Processors (DSPs) The GPS Receiver Memory Future Trends and Challenges The Software Architecture The Java ME Virtual Machine The Execution Engine The Heap The Garbage Collector The Loader The Verifier The Thread Manager The Mobile Phone and the LBIS Tracking System Example 26 3 The Java Platform Micro Edition (Java ME) Introduction The Java ME Platform The Connected Limited Device Configuration (CLDC) Layer Java Programming Language and Virtual Machine Fea tures 30 xix

3 XX Contents Profile 332 Libraries and APIs 30 The Mobile Information Device (MIDP) Layer Optional Packages The Java ME Platform and the LBIS Tracking System Example 35 4 MIDlet Development Introduction MIDlets A Hello World MIDlet The User Interface API Lists, Text Boxes, Forms, and Alerts The Media API The Record Management System API Working with Record Stores and Records Security Information Security Goals and Mechanisms MIDlet Security Network Security Privacy MIDlet Development and the LBIS Tracking System Example 54 5 Other Important Programming Aspects Introduction Memory Management Concurrency Defining and Starting Threads Stopping Threads Joining, Interrupting, and Sleeping Threads Monitors and Locks Waits and Notifications Dynamic Linking Energy Management Other Important Programming Aspects and the LBIS Tracking System Example 66 6 Obtaining the User's Position Introduction The Global Positioning System (GPS) The Format of the GPS Navigation Message Lateration The GSM Cellular Network Cell Identification or Cell ID Enhanced Cell Identification Enhanced Observed Time Difference (E-OTD) Uplink-Time Difference of Arrival (U-TDoA) 75

4 Contents xxi Assisted GPS (A-GPS) Indoor Positioning Systems Indoor Positioning Techniques Skyhook's Hybrid Positioning System (XPS) The Location API Improvements from Version Criteria and LocationProvider ProximityListener Landmark and LandmarkStore New Features Landmark Exchange Formats Geocoding Map User Interfaces Navigation Obtaining the User's Position and the LBIS Tracking System Example 86 7 Storing and Retrieving the Data: The Database Introduction Background Design of the LBIS Tracking System Database 722 Structure of a Relational Database The Structure Query Language (SQL) Data Definition Language (DDL) Data Manipulation Language (DML) Data Retrieval PostGIS and Geographical Databases Structure of PostGIS Creating a Table with Geographical Columns Inserting Geographical Data in a Table Retrieving Geographical Data Useful Geometric Operators Accessing the Database Using Java Connecting to the Database via JDBC Data Insertion Data Queries pgadmin III: Postgres's Database Administration Tool 741 Creating a New Database Creating a New Table Using the Wizard Using the SQL Execution Module The Database and the LBIS Tracking System Example

5 xxii Contents 8 Sending and Receiving Data: Communications Introduction The Generic Connection Framework (GCF) of the CDLC The Mobile Information Device Profile (MIDP) A TCP Client Example A UDP Client Example A Generic Server Example A TCP Server Example A UDP Server Example A HyperText Transfer Protocol (HTTP) Example The Wireless Messaging API (WMA) A Multimedia Messaging Service Example Communications and the LBIS Tracking System Example A Java ME Tracking MIDlet Using UDP Server-Side Application Java ME Web Services Introduction An Overview of Web Services The Web Services API (WSA) The JAX-RPC Package The JAXP Package A Web Service Example Web Service Creation MIDlet Creation Web Services and the LBIS Tracking System Example 10 System Administration Introduction The World Wide Web (WWW) Google Web Toolkit Creating System Administration Functions Client-Side Code Creating System Administration Functions Remote Procedure Calls in GWT Server-Side Code Compiling and Deploying the Application with GWT System Administration and the LBIS Tracking System Exam ple Data Visualization Introduction Visualizing the Users' Positions in Google Maps Configuring the GWT Project 184

6 Contents xxiii Import the Library into the GWT Eclipse Project Configure the GWT Project xml File Client-Side Code Server-Side Code Google Earth KML Language Generating KML Documents Dynamically Embedding Google Earth in a Web Application The GWT JavaScript Native Interface Loading Google Earth in a GWT Web Appli cation Data Visualization and the LBIS Tracking System Example Processing the Data Introduction Mobile Device-Side Processing Server-Side Processing Finding the Closest Friend Integration of LBIS and Wireless Sensor Networks for Situational Awareness Processing the Data and the LBIS Tracking System Example A Installing the Software Development Environments (SDE) 221 Al Introduction 221 A2 Server-Side Software Development Environment 222 A21 Sun Java Development Kit (JDK) Standard Edition A22 GlassFish Application Server 222 A221 Administrator Information and Communica tion Ports 223 A222 Recommended Options 223 A223 Special File Replacement 225 A224 Starting and Stopping the Application Server 225 A23 Postgres 226 A231 Administrator Information 227 A232 Communication Port 227 A24 PostGIS 228 A241 Database Information 228 A25 JDBC Drivers 228 A26 Registering the Database in the Server 231 A261 Creating a Connection Pool 231 A262 Creating a JDBC Resource 236 A3 Server-Side Application Development Environment 238 A31 Registering NetBeans 238 A4 Client-Side Application Development Environment 241

7 xxiv Contents A41 Sun Java Development Kit 243 and the GWT Maps API 243 A42 Google Web Toolkit (GWT) A43 The Eclipse Integrated Development Environment 244 A44 Installing the GWT in Eclipse 244 A5 Mobile-Side Software Development Environment 245 A51 Cellular Phone Emulators 246 A511 Sprint Wireless Web Toolkit (SWWT) 246 Bibliography 251 Index 257