Skip to content

Forecast Geofence Events

locationservice_forecast_geofence_events R Documentation

Evaluates device positions against geofence geometries from a given geofence collection

Description

Evaluates device positions against geofence geometries from a given geofence collection. The event forecasts three states for which a device can be in relative to a geofence:

ENTER: If a device is outside of a geofence, but would breach the fence if the device is moving at its current speed within time horizon window.

EXIT: If a device is inside of a geofence, but would breach the fence if the device is moving at its current speed within time horizon window.

IDLE: If a device is inside of a geofence, and the device is not moving.

Usage

locationservice_forecast_geofence_events(CollectionName, DeviceState,
  TimeHorizonMinutes, DistanceUnit, SpeedUnit, NextToken, MaxResults)

Arguments

CollectionName

[required] The name of the geofence collection.

DeviceState

[required] The device's state, including current position and speed.

TimeHorizonMinutes

Specifies the time horizon in minutes for the forecasted events.

DistanceUnit

The distance unit used for the NearestDistance property returned in a forecasted event. The measurement system must match for DistanceUnit and SpeedUnit; if Kilometers is specified for DistanceUnit, then SpeedUnit must be KilometersPerHour.

Default Value: Kilometers

SpeedUnit

The speed unit for the device captured by the device state. The measurement system must match for DistanceUnit and SpeedUnit; if Kilometers is specified for DistanceUnit, then SpeedUnit must be KilometersPerHour.

Default Value: KilometersPerHour.

NextToken

The pagination token specifying which page of results to return in the response. If no token is provided, the default page is the first page.

Default value: null

MaxResults

An optional limit for the number of resources returned in a single call.

Default value: 20

Value

A list with the following syntax:

list(
  ForecastedEvents = list(
    list(
      EventId = "string",
      GeofenceId = "string",
      IsDeviceInGeofence = TRUE|FALSE,
      NearestDistance = 123.0,
      EventType = "ENTER"|"EXIT"|"IDLE",
      ForecastedBreachTime = as.POSIXct(
        "2015-01-01"
      ),
      GeofenceProperties = list(
        "string"
      )
    )
  ),
  NextToken = "string",
  DistanceUnit = "Kilometers"|"Miles",
  SpeedUnit = "KilometersPerHour"|"MilesPerHour"
)

Request syntax

svc$forecast_geofence_events(
  CollectionName = "string",
  DeviceState = list(
    Position = list(
      123.0
    ),
    Speed = 123.0
  ),
  TimeHorizonMinutes = 123.0,
  DistanceUnit = "Kilometers"|"Miles",
  SpeedUnit = "KilometersPerHour"|"MilesPerHour",
  NextToken = "string",
  MaxResults = 123
)