Tile38

Tile38

  • Commands
  • Documentation
  • GitHub
  • Get Tile38

›Geofences

Getting Started

  • Installation
  • Configuration
  • Object Types
  • Command Line Interface
  • Network Protocols
  • Client Libraries
  • Replication
  • Filter Expressions
  • Commands

Geofences

  • Geofencing
  • Roaming Geofences
  • __no_label
  • __no_label
  • __no_label
  • __no_label
  • __no_label
  • __no_label
  • __no_label
  • __no_label
  • __no_label
  • __no_label
  • __no_label
  • __no_label
  • __no_label
  • __no_label
  • __no_label
  • __no_label
  • __no_label
  • __no_label
  • __no_label
  • __no_label
  • __no_label
  • __no_label
  • __no_label
  • __no_label
  • __no_label
  • __no_label
  • __no_label
  • __no_label
  • __no_label
  • __no_label
  • __no_label
  • __no_label
  • __no_label
  • __no_label
  • __no_label
  • __no_label
  • __no_label
  • __no_label
  • __no_label
  • __no_label
  • __no_label
  • __no_label
  • __no_label
  • __no_label
  • __no_label
  • __no_label
  • __no_label
  • __no_label
  • __no_label
  • __no_label
  • __no_label
  • __no_label
  • __no_label
  • __no_label
  • __no_label
  • __no_label
  • __no_label
  • __no_label
Edit

SETCHAN

Syntax

SETCHAN name [META name value ...] [EX seconds] NEARBY|WITHIN|INTERSECTS key [WHERE field min max ...] [WHEREIN field count value [value...] ...] [WHEREEVAL script numargs arg [arg...] ...] FENCE [DETECT what] [COMMANDS which] param [param...]

Description

Creates a Pub/Sub channel which points to a geofenced search. If a channel is already associated to that name, it'll be overwritten. Once the channel is created a client can then listen for events on that channel with SUBSCRIBE or PSUBSCRIBE.

Examples

Set a simple channel.

SETCHAN warehouse NEARBY fleet FENCE POINT 33.5123 -112.2693 500

In this example we created a channel named warehouse that watches for changes to objects in the fleet collection. When a change occurs the channel warehouse is notified with a detailed message. The message contains a member named 'detect' which has one of the following values:

  • 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.
  • cross is when an object that was not previously in the fence has entered and exited the area.

For more information on the format of this message and the use of WHERE please see the topic on Geofencing.

NEARBY, INTERSECTS, and WITHIN are supported search types. The FENCE keyword must be present.

Related Commands

CHANS
DELCHAN
PDELCHAN
PSUBSCRIBE
SETCHAN
SUBSCRIBE

  • Syntax
  • Description
  • Examples
  • Related Commands
Copyright © 2024 Tile38, LLCLicense
Docs
Getting StartedGeofencesCommands
Community
Stack OverflowSlackTwitter
More
GitHubStar