際際滷

際際滷Share a Scribd company logo
Building Location-Aware Apps
with Open Source & Open Data
#openmaps
Matthew Smollinger
@mattsmollinger
Chuck Greb
@ecgreb
SXSW Interactive | 14 March 2015
Mapzen is an open source mapping lab
building and supporting open data and
software to promote a healthy mapping
ecosystem.
Skaffl is an EdTech company that
specializes in mobile solutions for the K-12
market.
start where you are
Part 1: Overview
 Location-aware apps
 Open source and open data
Part 2: Maps
 Raster tiles
 Vector tiles
Part 3: Geolocation, Search & Routing
 Location services
 Geocoding
 Navigation
Part 4: Beacons & BLE
 Monitoring and ranging
 Indoor positioning
Agenda
#openmaps
Part 1:
Overview
Building Location-Aware Apps
with Open Source & Open Data
#openmaps
3 kinds of location-aware apps
 Mapping applications
 Location-based apps
 Apps with location-aware features
Location-Aware Apps
Mapping applications
Bu
Bu
Bu
Location-based apps
Bu
Bu
Bu
Wearable integration
Apps with location-aware features
Bu
Bu
Common features
 Maps
 Geolocation
 Search
 Navigation
Location-Aware Apps
Building Location-Aware Apps
with Open Source & Open Data
Code
Open Source
Philosophy
Open Source
License
Open Source
Community
Open Source
Advantages
 Transparency
 Flexibility
 Compatibility
 Free!
Location-Aware Apps
Open source is not free like beer
Open Source
Open source is free like a puppy
Open Source
Building Location-Aware Apps
with Open Source & Open Data
Availability & Access
Open Data
Reuse & Redistribution
Open Data
Universal Participation
Open Data
Open Knowledge Foundation
https://okfn.org/
Open Data
OpenStreetMap (OSM)
 Crowdsourced & public data
 Local knowledge
 Attribution
 Share-alike
Open Data
Bu
#openmaps
Part 2:
Maps
Datasource
Maps
Tiles
Maps
Raster Vector
256 x 256 pixels
Maps
Zoom level 0:
1 tile for the world
Maps
Zoom level 1:
4 tiles for the world
Maps
Zoom level 2:
16 tiles for the world
Maps
# of tiles = 2z
x 2z
Maps
Bu
http://tile.openstreetmap.org/8/58/105.png
http://tile.openstreetmap.org/14/3743/6745.png
http://tile.openstreetmap.org/8/58/105.png
http://tile.openstreetmap.org/14/3743/6745.png
http://tile.openstreetmap.org/8/58/105.png
http://tile.openstreetmap.org/14/3743/6745.png
http://tile.openstreetmap.org/8/58/105.png
http://tile.openstreetmap.org/14/3743/6745.png
http://tile.openstreetmap.org/8/58/105.png
http://tile.openstreetmap.org/14/3743/6745.png
Layers & Overlay
Maps
http://wiki.gis.com/wiki/index.php/Overlay
Maps
Style
Bu
Why open source maps?
 Cost
 Customization
 Privacy & security
Maps
osmdroid
#openmaps
osmdroid
 Android only
 Raster tiles
 Started in 2008
 Based on Google Maps API v1
 Online and offline tile sources
 Icons, tracking, and shapes
Maps
Bu
Mapbox
#openmaps
Mapbox
 iOS & Android SDKs
 Raster & vector tiles
 Simple integration with Mapbox tile server
 Alternate tile servers also supported
Maps
Bu
OpenScienceMap
#openmaps
OpenScienceMap
 Universit辰t Bremen
 Pure vector maps
 Native rendering engine
 Java wrapper
 Objective-C translation
Maps
Bu
Tangram ES
#openmaps
Tangram ES
 Embedded systems version of Tangram for web
 Native C++ rendering library
 iOS, Android, and Raspberry Pi
 EARLY work in progress!
Maps
Bu
#openmaps
Demo:
Maps
#openmaps
Part 3:
Geolocation, Search & Routing
Geolocation
#openmaps
Location Services
Geolocation, Search & Routing
Bu
Location Providers
 GPS
 Wi-Fi
 Cell network
 Passive
 Sensors
 BLE
Geolocation, Search & Routing
https://developers.google.com/events/io/sessions/325337477
Location Providers
 GPS
 Wi-Fi
 Cell network
 Passive
 Sensors
Geolocation, Search & Routing
Fused Location Provider (Android) &
CoreLocation (iOS)
One interface to rule them all.
X
Bu
Bu
#openmaps
LOSTLocation Open Source TrackerLocation Open Source Tracker
Not all those who wander are lost.
 J.R.R. Tolkien, The Fellowship of the Ring
LOST talks directly to the
LocationManager
LOST
Optimizations
 Frequency
 Accuracy
 Battery Life
LOST
Search
#openmaps
Geocoding:
Real world address -> Lat/Lng
Geolocation, Search & Routing
Bu
Reverse Geocoding:
Lat/Lng -> Real world address
Geolocation, Search & Routing
Bu
Geographic Search Engine
Pelias
Pelias
#openmaps
Pelias is a modular open-source geocoder built on top of
ElasticSearch for fast geocoding.
Pelias
/suggest
The suggest endpoint provides a super-fast autocomplete.
This API can be used to quickly find location names which
BEGIN with the input text.
http://pelias.mapzen.com/suggest?input=big%20ben&lat=51.5&lon=-0.06
Pelias
Bu
/search
The search endpoint provides a full-text search. It will try to
account for spelling mistakes and will search for your input at
any position in the location name.
http://pelias.mapzen.com/search?input=shoreditch&lat=51.5&lon=-0.06
Pelias
Bu
/reverse
The reverse endpoint returns the nearest locations to your
input lat/lon.
http://pelias.mapzen.com/reverse?lat=51.5&lon=-0.06
Pelias
Bu
Routing
#openmaps
Turn-By-Turn Navigation
Geolocation, Search & Routing
Public Transit
Geolocation, Search & Routing
Open Source Routing Machine (OSRM)
#openmaps
OSRM
#openmaps
Demo:
Geolocation, Search & Routing
#openmaps
Part 4:
Beacons & BLE
Beacons are awesome!
 How they work
 Cool stuff you can do
 Products and frameworks
 Examples
Beacons & BLE
A (quick) Guide to BT4
 Basically three protocols in one
 Bluetooth Low Energy
 Operates in Two modes - Advertise and Connect
 Only advertise is required - connect support is
optional
Beacons
 Beacons implement advertise only
 Transmit at regular intervals
 Simplification of the BLE implementation
 Replaces MAC address with UUID
 Major number is for grouping
 Minor number is for individualization
Indoor Location
 Several different ways to accomplish
 Wifi Triangulation
 Ultrasonic Location
 BLE Triangulation
 Wifi is lackluster for triangulation
 Ultrasonic need custom hardware
 BLE range is poor compared to wifi or ultrasound
Open Source Indoor Location
 Currently in very early discussions in OSM
 A few frameworks / attempts are being made:
皙 Redpin
皙 Cricket from MIT
皙 iLocate
皙 indoor.io
 Needs more time to bake
 In the mean time...
#openmaps
Demo:
Beacons & BLE
Thanks!
#openmaps
Matthew Smollinger
@mattsmollinger
Chuck Greb
@ecgreb
http://sxsw.feedogo.com/fdbk.do?sid=IAP31861

More Related Content

Bu