1 of 20

Location Based Service

2 of 20

User Location

  • Cell Tower
  • Wi-Fi
  • GPS

3 of 20

Cell Tower

4 of 20

Wi-Fi

  • The device determines the location of each access point by looking it up in a Wi-Fi location database.
  • It then estimates its own location based on the found locations and their signal strength using trilateration.

5 of 20

GPS

  • Why does GPS positioning require four satellites?

6 of 20

Map Projections

7 of 20

Mercator

  • Google Maps
  • Bing Maps

8 of 20

Find POI Nearby

9 of 20

SQL Approach

  • Select * from Places where Latitude between X-D and X+D and Longitude between Y-D and Y+D

10 of 20

What’s geohash

11 of 20

Construct a �geohash

12 of 20

  • (37.77564, -122.41365) results in the binary sequence “0100110110010001111011110” and produces the geohash “9q8yy”.

13 of 20

Geohash Proximity Search

14 of 20

Geohash in Redis

15 of 20

Rideshare

16 of 20

Quadtree

17 of 20

Driver Location

  • Quadtree partition
  • Real-time location

18 of 20

Google S2

19 of 20

Uber H3

  • The H3 grid is constructed by laying out 122 base cells over the Earth, with ten cells per face. Some cells are contained by more than one face. Since it is not possible to tile the icosahedron with only hexagons, twelve pentagons are introduced, one at each of the icosahedron vertices. 

20 of 20

Thank you!