Examples

The following examples can be found on this page:

Dynamic

This example demonstrates how to use the Geofence Function to check whether an asset's location is within a geofenced area from an external data source.

Refer to configuration to understand all configuration options of this Agent.

Step 1: Add the Agent

Drag the Agent onto the canvas, link the input endpoint to the asset location data, the geolocation_input endpoint to the geofence data and the output to the printer. Rename the Agent and save the Data Stream.

Step 2: Configure General

Select the Agent and click Configure. In this case, keep the default Collection.

Step 3: Configure Settings

Change the Source from Static to Dynamic

Select the attributes from the geofence input data that represent Latitude and Longitude.

Select the attributes from the input data that represent Latitude and Longitude. Apply the changes and Save the Data Stream.

Step 4: Results

Publish the Data Stream and observe that a new attribute Inside GeoFence is added to each output event and its value is False as soon as the Asset leaves the Geofenced area.

Files

See the Import, Export, and Clone - XMPro article for steps to import a Data Stream

Static

This example demonstrates how to use the Geofence Function to check whether an asset's location is inside or outside a geofenced area from an uploaded CSV file.

Refer to configuration to understand all configuration options of this Agent.

Step 1: Add the Agent

Drag the Agent onto the canvas, link the input endpoint to the asset location data, and the output to the printer.

Save the Data Stream.

Step 2: Configure General

Select the Agent and click Configure. In this case, keep the default Collection.

Step 3: Configure Settings

  1. Select a Geofence file, an example can be found here.

  2. Select the attributes from input data that represent Latitude and Longitude.

Apply the changes.

Step 4: Results

Save the Data Stream and publish it.

Let's look at the Live Data view. Observe that a new attribute Inside GeoFence is added to each output event and its value is False as soon as the Asset leaves the Geofenced area. A complete example and the files used are provided below.

Files

See the Import, Export, and Clone - XMPro article for steps to import a Data Stream

Last updated