Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Tile 38 ile GeoLocation İşlemleri

Tile 38 ile GeoLocation İşlemleri

Fatih Kahveci

June 15, 2019
Tweet

Other Decks in Programming

Transcript

  1. Use Cases? • Live/Static Geofence • Hooks (webhooks, redis, rabbitmq,

    kafka, sqs vs.) • Replication • Latitude/Longitude, GeoHash, GeoJSON • RESP (Redis Serialization Protocol)
  2. Set/Get SET uber riza FIELD rating 90 FIELD type 1

    POINT 33.5123 -112.2693 SET uber deniz FIELD rating 80 FIELD type 2 POINT 33.5123 -112.2693 SET factories factory1 BOUNDS 33.7840 -112.1520 33.7848 -112.1512 GET uber deniz
  3. Nearby NEARBY uber WHERE type 2 2 WHERE rating 80

    +inf POINT 33.5123 -112.2680 6000 The NEARBY command searches a collection for objects that are close to a specified point
  4. Intersects SET uber riza FIELD rating 90 FIELD type 1

    POINT 38.450054 27.208334 SET uber deniz FIELD rating 80 FIELD type 2 POINT 38.449037 27.210244 INTERSECTS uber BOUNDS 38.450054 27.208334 38.449087, 27.210759 INTERSECTS searches a collection for objects that intersect a specified bounding area.
  5. Within SET uber riza FIELD rating 90 FIELD type 1

    POINT 33.5123 -112.2693 SET uber deniz FIELD rating 80 FIELD type 2 POINT 33.5123 -112.2693 WITHIN uber BOUNDS 33 22 35 25 WITHIN searches a collection for objects that are fully contained inside of a specified bounding area.
  6. Roaming Geofence NEARBY uber MATCH deniz FENCE ROAM uber riza

    100 NEARBY uber FENCE ROAM uber * 1000
  7. Static Geofence NEARBY uber MATCH riza FENCE DETECT inside POINT

    33 25 500 NEARBY fleet FENCE DETECT inside,outside POINT 33 25 6000 • inside is when an object is inside the specified area. • outside is when an object is outside the specified area. • enter is when an object that was not previously in the fence has entered the area. • exit is when an object that was previously in the fence has exited the area.
  8. Hooks SETHOOK uniqhookname http://example.com/hook NEARBY fleet FENCE DETECT inside,outside POINT

    33 25 6000 SETHOOK testhook redis://127.0.0.1:6379/testhook NEARBY fleet FENCE DETECT inside,outside POINT 33 25 6000