Location Based Services: A Gentle Introduction Presented to: Computer Science 1001 By Shashi Shekhar Computer Sc. Faculty University of Minnesota May 2nd, 2007 Source: http://www.northwoodssurvival.com/content/navigation_class.jpg Outline • • • • • • Introduction What are LBS? How are LBS useful? How does it work? What’s special about it? Where to go next? Introduction • Q? watched any of the following movies? – – – – – • Batman, Mission Impossible, Spy Kids 2: The Island of Lost Dreams Minority Report GPS … Ex. What LBS are featured in these movies? GPS – The Movie A group of adventure seeking college kids embark on a GPS treasure hunt in the Northwest wilderness. http://www.gpsthemovie.com/ LBS - Examples • Q? Have we used the following ? – E.g.: MapQuest, Google Maps, … – Q? Are these location-based services ? Courtesy: Microsoft Live Search (http://maps.live.com) Navigation Devices • Cell-phone, watch, custom • For in-vehicle or portable use Outline • • • • • • Introduction What are LBS? How are LBS useful? How does it work? What’s special about it? Where to go next? Source:www.gamma-project.info/images/lbs.jpg What is LBS? - Wikipedia Perspective What are LBS? • Cell-phone-centric definition – a way to send custom advertising and other information to cell-phone subscribers based on their current location (Wikipedia) • Generalized definition – Service customized to given locations – It begs 3 questions! 1. Which Location? – Individual’s current location • • Or favorite locations, e.g. home, work, … Or Specified location, e.g. a travel destination – Group of individuals and their locations (?) 2. What implicit spatial relationship to given location? – Identify service instances near given location(s) – Neither far nor near given location(s) 3. Which Service? Outline • • • • • • Introduction What are LBS? How are LBS useful? How does it work? What’s special about it? Where to go next? Suspenseful, terrifying, full-length film about a 30' trimaran's capsize due to poor seamanship in a big storm while on its way from Vancouver, Canada to Costa Rica. The 74-day survival efforts … Based on a true story. (Source: www.multihullsmag.com) Outline • • • • • • Introduction What are LBS? How are LBS useful? How does it work? What’s special about it? Where to go next? Measuring motion and deformation of Earth Source: wwwrses.anu.edu.au/~anya/polenet/science_gps.htm Source:www.where2getit.com/products/ How are LBSs useful? • Numerous Applications • Emergency Service – Public Safety – E911, Crime Mapping – Security – Reverse 911, Evacuation Routes • Information Services – Location-based Search – nearest facility – Routing, Navigation – commuters, travellers ?Future? • Social Networks – Location-based friend search – Smart mobs • Commerce – Location based billing, content-push, … – Asset tracking, Facilities Management • Science – Tracking animal habitat, migration, … GPS Collar, Implantable GPS chip Sources: www-research.ge.ucl.ac.uk/bear/htm/prtns/va.html , www.gpsworld.com/gpsworld/article/articleDetail.jsp?id=360842 Business Applications • Business Questions – – – – Predicting consumer spatial behaviors Delineating trade / service areas Analyzing market performance by regions Locating retail and service facilities • Huff model [1963] : utility = f ( square footage / distance ) Source: http://people.hofstra.edu/geotrans/eng/ch7en/meth7en/hufflaw.html Location Based Patterns and Scientific Discoveries • The 1854 Asiatic Cholera in London – Precursor to germ theory Location based service in Public Health • Sample Local Questions from Epidemiology [TerraSeer] – – – – What’s overall pattern of colorectal cancer Is there clustering of high colorectal cancer incidence anywhere in the study area Where is colorectal cancer risk significantly elevated Where are zones of rapid change in colorectal cancer incidence Geographic distribution of male colorectal cancer in Long Island, New York (Courtesy: TerraSeer) Critical locations in Climatology • Teleconnection – Find (land location, ocean location) pairs with correlated climate changes • Ex. El Nino affects climate at many land locations – Precursor to global warming theories Average Monthly Temperature (Courtsey: NASA, Prof. V. Kumar) Global Influence of El Nino during the Northern Hemisphere Winter (D: Dry, W: Warm, R: Rainfall) Location brings context and aids understanding! • Location helps bring rich contexts – Physical: e.g., rainfall, temperature, and wind – Demographical: e.g., age group, gender, and income type – Problem-specific, e.g. distance to highway or water • Understanding of a physical phenomenon – Though, final model may not involve location • Cause-effect e.g. Cholera caused by germs – Discovery of model may be aided by spatial patterns • Many phenomenon are embedded in space and time • Ex. 1854 London – Cholera deaths clustered around a water pump • Spatio-temporal process of disease spread – => narrow down potential causes • Ex. Recent analysis of SARS Technology Risks Source: http://archive.salon.com/comics/tomo/2001/07/09/tomo/index.html, www.gpsworld.com/gpsworld/article/articleDetail.jsp?id=360842 Outline • • • • • • Introduction What are LBS? How are LBS useful? How does it work? What’s special about it? Where to go next? Navstar ii GPS Satellite Navigation System using Timing And Ranging (Source: www.spacetoday.org/Satellites/GPS.htm)l How does GPS work? • GPS Receiver – listens to 3 or more satellites – Uses triangulation algorithm – To estimate position • Challenges – Multi-path reflections – Obstructions • overbridges, skyscrapers – Leads to errors – Typical accuracy • Basic GPS - Few meters • Differential GPS – sub-meter Source: GPS Explained www.kowoma.de/en/gps/positioning.htm How does it work? • • • How does GPS determine locations ? How does LBS software work ? What if need more sophisticated spatial reasoning ? How does LBS Software work ? • Buy or Build? – – • Reusable Libraries are becoming available Open standards emerging Ex. Open Location Services – Core Services 1. Directory Service – online directory (e.g., Yellow Pages) to find the location of a specific or nearest place, product or service. 2. Gateway Service – fetches the position of a known mobile terminal 3. Location Utility Service provides – Geocoder : place name coordinates • – Example: Street address (latitude and longitude) Reverse Geo-coder: coordinates place name 4. Presentation Service portrays a map – – a base map derived from any geospatial data and a set of Abstract Data Types as overlays 5. Route Service – determines travel routes and navigation information between two or more places Standards: OGC • What if my application needs more spatial sophistication? – Ex. Reasoning with extended geographic features – Q? List restaurants in Minneapolis near rivers or lakes. • Open GIS Consortium – Simple Features Model – Basic spatial data types: e.g. point, line, polygons – Several spatial operations on these spatial data types Operator Type Operator Name Basic Function SpatialReference, Envelope, Boundary, Export, IsEmpty, IsSimple Topological/Set Operations Equal, Disjoint, Intersect, Touch, Cross, Within, Contains, Overlap Spatial Analysis Distance, Buffer, ConvexHull, Intersection, Union, Difference, SymmDiff Examples of Spatial Operations in OGC Model Mashups: Location Based Web-Services Mashups: Location Based Web-Services • Simple APIs – – • Google Earth – KML Microsoft Virtual Earth SDK Example Code: KML (Source:http://www.econym.demon.co.uk/googlemaps/kml.htm) <?xml version="1.0" encoding="UTF-8"?> <kml xmlns="http://earth.google.com/kml/2.0"> <Document> <name>KML Example file</name> <description>Simple markers</description> <Placemark> <name>Marker 1</name> <description>Some stuff to put in the first info window</description> <Point> <coordinates>-122.1,37.4,0</coordinates> </Point> </Placemark> </Document> </kml> What is special about LBS? • • • • • • Introduction What are LBS? How are LBSs useful? How does it work? What’s special about it? Where to go next? Source:http://ssnds.uwo.ca/sscnetworkupdate/2006winter/images/gis.jpg Data in Location Based Services • Non-spatial Information – Same as data in traditional data mining – Numerical, categorical, ordinal, boolean, etc – e.g., city name, city population • Spatial Information – Spatial attribute: geographically referenced • Neighborhood and extent • Location, e.g., longitude, latitude, elevation – Spatial data representations • Raster: gridded space • Vector: point, line, polygon • Graph: node, edge, path Raster Data for UMN Campus Courtesy: UMN Vector Data for UMN Campus Courtesy: MapQuest Spatial Relationships • Relationships Categories – Set-oriented: union, intersection, membership, etc – Topological: meet, within, overlap, etc – Directional: North, NE, left, above, behind, etc – Metric: e.g., Euclidean: distance, area, perimeter – Graph-based: shortest path – Shape-based and visibility – … • Granularity Granularity Elevation Example Road Example Local Elevation On_road? Focal Slope Adjacent_to_road? Zonal Highest elevation in a zone Distance to nearest road Mathematical Foundations – Topological Operations • Topology – 9-intersections using • Interior • boundary • exterior ( Ao B o ) ( Ao B) ( Ao B ) o (A B ) (A B) (A B ) ( A B o ) ( A B) ( A B ) Topological Relationship 9-intersection model disjoint meet overlap equal 0 0 1 0 0 1 1 1 1 0 0 1 0 11 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 1 0 0 0 1 Q? Define 9-intersection for following operations: inside. Spatial Autocorrelation (SA) • First Law of Geography – “All things are related, but nearby things are more related than distant things. [Tobler, 1970]” Pixel property with independent identical distribution • Vegetation Durability with SA Spatial autocorrelation – Nearby things are more similar than distant things – Traditional i.i.d. assumption is not valid – Measures: K-function, Moran’s I, Variogram, … Location Prediction – Spatial Statistics vs. Classical Statistics! Nest Locations Water Depth Vegetation Distance to Open Water Spatial Discontinuities may be anamolous • Spatial Outliers – Traffic Data in Twin Cities – Abnormal Sensor Detections – Spatial and Temporal Outliers What is special about LBS? • • • • • • Introduction What are LBS? How are LBSs useful? How does it work? What’s special about it? Where to go next? Source: http://qcpages.qc.cuny.edu/career/Career/pictures/assessments/newRoadmap5.jpg Where to go next? • Books • Courses at the U • Web-sites – www.spatial.cs.umn.edu – www.geog.umn.edu/umucgis/ – www.opengis.org Spatial Thinking Across Disciplines Courses at U of M