MOBILE LOCATION-BASED APPS Lecture in University of Tartu Jaak Laineste, 16.10.2012 Part 1 LOCATION-BASED SERVICE OVERVIEW Jaak Laineste
Total Page:16
File Type:pdf, Size:1020Kb
MOBILE LOCATION-BASED APPS Lecture in University of Tartu Jaak Laineste, 16.10.2012 Part 1 LOCATION-BASED SERVICE OVERVIEW Jaak Laineste • GIS/LBS experience 17 years in GIS/mapping, 12 years in LBS Mobile operator LBS in all over the world Nutiteq since 2006 • Nutiteq and mobile development Part of Mobi Solutions group since 2009 J2ME, Android, BlackBerry, iPhone teams Naval navigation apps Location-Based Services 1. Location-based: 80% of data 2. Service (or mobile application) 3. Mobile technologies (phones, networks) 4. Mobile positioning • LBS is a technology, not application type Can be aspect of any application type Two meanings of LBS • „Classical“ definition: Mobile Positioning – MPS Mobile operators User Interface: SMS, Web, WAP, USSD, IVR • Today’s LBS : Smartphones with GPS, tablets mobile apps, web services, HTML5 Google Maps, PND, Check-ins, Google Now Operator-based LBS • Mobile Positioning Find location using mobile network Works with any mobile, no requirements Accuracy with Cell-ID: 300m ... 30 km (~1 km avg) Operator can also use in-phone GPS with A-GPS Only operator can do it, Can give to trusted 3rd party • Typical services FriendFinder, Games Find Nearest SMS Fleet Management • Recent trends Operators open APIs, including location There are aggregators: e.g. LocationLabs, Loc-Aid Location-based advertising – www.flipper.ee (EMT, Estonia) Popular LBS apps in smartphones • Navigation Tomtom, Navigon, Garmin, Nokia maps etc. Also Waze • Business around you Reviews, events, classifieds etc Yelp, Loopt, Qype, Zvents, Eventful, Opentable etc • Transit and traffic info US, West Europe • Trapster speed camera warnings • Social: Facebook checkins • Games: Foursquare • Sports trackers: Runkeeper, Endomondo Un-successful applications • Friend tracking • Track & publish my location • Location-based advertising • Location-based alerts • Augmented reality (with maps) Hard problems • GPS takes too much battery • GPS coverage and accuracy is bad No indoors • Maps are limited No indoors No walking level • Real user needs are hard to estimate Successful apps • Local is local • Content is the king, but expensive • Understand topic pymwymi • There is no killer app but you can create killer service • Location is just a technology Not the core differentiator Part 2 GIS INTRODUCTION GIS definition • Geographic With geographical dimension • Information • System Software, servers, computers • Wikipedia: a system designed to capture, store, manipulate, analyze, manage, and present all types of geographically referenced data. In the simplest terms, GIS is the merging of cartography, statistical analysis, and database technology „Classic“ GIS • Started in early 1970’ies • Key companies, drivers ESRI, Intergraph, MapInfo, AutoDesk, Oracle Universities • Key focus Desktop-GIS – special GIS tools Servers, client-server model • Expensive, specialized, heavy • Recent developments (from late 90ies) OGC standards: WMS, WFS, GML etc Cloud-based, mobile Neo-geography • Web/Internet-based Easy to use Cloud services • Cool startups GeoIQ, CartoDB, OpenGeo, MapBox, GISCloud • Free commercial tools Google: Maps, Earth, SketchUp, FusionTables etc Yahoo, Microsoft Bing, MapQuest • Open source software OSGeo.org: server, desktop, web • Open sourced data OpenStreetMap Mobile LBS future trends • Augmented Reality Issue: mobile sensors Needs powerful image processing • 3D 3D earth (2.5D) Buildings, textures etc – Apple iOs 6 Maps • 360-degree view Issue: bandwidth • Walking/local/indoor maps Issue: content update is expensive • Your ideas ! GIS TECHNOLOGY AND DEVELOPMENT Why special approach • Data is quite complex Two-dimensional (or 3D, 4D) Complex relations Nice visualization is processing-hungry • Base maps Big datasets, different features • Specific map data Dynamic, can be big etc A lot of data in a single screen Type – 4 bytes Name – 100 bytes Point on map – 16 bytes Base map – 32+ KB 27 relations 205 ways (lines) 1920 points (x 16 b) Checkins – 4 bytes People – 4 bytes Geo basics • Data models vector raster other • Coordinates Projections, coordinate systems Data models • Raster PNG for maps, lossless JPG for aerials GeoTIFF, coverages Key parameters: bitmap resolution, size • Vector Base objects: points, lines, polygons Collections: multi-point, multi-line, multi-polygon Attributes (fields): text/boolean/numeric/binary etc Texts on map - labels from attributes Layer – same as „table“ in DB Special cases: topological models, graphs GIS Layers Other data models • Elevation models DEM – Digital Elevation Model TIN - triangulated irregular network • 3D worlds Collada, X3D Google Earth Warehouse • Point clouds Lidar – laser measurements Hillshade from DEM TIN Point cloud 3D model GIS layers simplified • One base layer Background map: Google, OpenStreetMap etc Raster-based • Overlay layer(s) Points of Interest, markers GPS location – dynamic info Lines, Polygons Clustered points Demo • Quantum GIS with vector in action • Open vector data layers • Styling map QGIS with OSM data Typical vector data operations • Display map Request data for bounding box (BBOX) Reprojection (if needed) Show set of layers Style data – colors, symbols etc Different map zooms have different data • Geocoding – address to coordinates • Reverse-geocoding • Find nearest neighbour(s) • Find objects in radius (buffer) • Calculate distance between objects • Find Point in area (polygon) • Routing – find optimal path in graph • Clustering - show big datasets on map Common GIS Data formats • Shapefile (ESRI) – most common 4-5 files per layer: .shp, .dbf etc One geometry type per layer allowed No style information, pure geometry Optional projection file .prj • KML (Google, open standard) Vector data, includes styles Special data types: 3D data (Collada), linked data, visual coverages Can have only WGS84 coordinates Can be KMZ – zipped file • Other formats SpatiaLite: vector and raster data. Any projection, no styles. Text files with coordinates or addresses Every commercial GIS has own format(s) Free converter: http://www.gdal.org/ogr/ogr_formats.html Spatial SQL database basics • Special column data types(s): Geometry, Point, Polygon ... • Geographical indexing Usually R-Tree, based on object bounds (bbox) • Geographical functions: Manipulations, relations, queries etc etc • Metadata table: Defines coordinate system, data type for every Geometry column Geometry primitives in WKT (2D) Multipart geometries in WKT (2D) PROJECTIONS Coordinate systems • Geographical – spherical Units: Latitude and Longitude Based on an ellipsoid, e.g. WGS-84 Datums, also WGS84 for GPS DMS for display, decimal degrees for programming • Projected - cartesian Units: usually meters (can be km, miles) Hundreds of named projections, mostly for local regions Reduce distortions: keep angles, distances, areas equal Geographical coordinate space Cartesian (projected) coordinate space Different projections • The Globe Applet http://www.jhlabs.com/java/maps/proj/ • Check out some Oblique Mercator, Cassini, Rectangular Polyconic • Common in real life Plate Carre, Mercator, Spherical Mercator, UTM, Lambert Conformal Conic (in L-EST) Short and long projection description <EPSG:3301> EPSG codes: PROJCS["Estonian Coordinate System of 1997", GEOGCS["EST97", DATUM["Estonia_1997", • EPSG:4326 – WGS84 SPHEROID["GRS 1980",6378137,298.257222101, AUTHORITY["EPSG","7019"]], • EPSG:3301 – Estonian system TOWGS84[0,0,0,0,0,0,0], • EPSG:3587 – „Google web“ AUTHORITY["EPSG","6180"]], PRIMEM["Greenwich",0, Was also EPSG:900913 AUTHORITY["EPSG","8901"]], UNIT["degree",0.01745329251994328, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4180"]], UNIT["metre",1, AUTHORITY["EPSG","9001"]], PROJECTION["Lambert_Conformal_Conic_2SP"], PARAMETER["standard_parallel_1",59.33333333333334], PARAMETER["standard_parallel_2",58], PARAMETER["latitude_of_origin",57.51755393055556], PARAMETER["central_meridian",24], PARAMETER["false_easting",500000], PARAMETER["false_northing",6375000], AUTHORITY["EPSG","3301"], AXIS["Y",EAST], AXIS["X",NORTH]] Coordinates as QR-Code • http://zxing.appspot.com/generator/ „GEO:26.7144,58.3784“ MAP DATA SOURCES Web maps • Google Maps Javascript, Flash, Static APIs, Earth 3D Geocoding and Directions (routing) services Mobile APIs: Android, iPhone • Bing Maps Web, Mobile API (WP7, iPhone) • Nokia Ovi Maps Web, Mobile (Qt, J2ME) Web map restrictions • Technical restrictions Cannot be restyled, no visual customization Limited to provided API-s, feature limits Can’t get map data, or even images Some mobile platforms not served at all • Commercial limits Some services (e.g. Navigation) require special license Advertising is added Commercial map data • Global vendors Vector: Navteq (Nokia), TeleAtlas (TomTom), AND Aerial/Satellite: DigitalGlobe, Blom ASA ... • Local vendors Regio, Maa-amet In almost every country, more detailed to globals • Specifics Technically quite flexible Usually quite expensive OpenStreetMap (OSM) • Free and open data Vector data in 2D Streets, roads, buildings, amenities etc • A lot of services Map images (tiles), geocoders, routers etc Special views: opencyclemap, openpistemap etc • Everyone can improve the map www.openstreetmap.org www.maakaart.ee – in Estonian Potlatch2 – web-based OSM editor JOSM – OSM main editor OSM advantages • Free and open to use No advertising, restrictions • Vector data access Custom styles for mapping Own filters of data on map (layers) Interactive data overlays (POI layers) Advanced services: routing, search, analysis • Fast and easy updates Find error – go fix it yourself!