Comment on page
Examples
The following examples can be found on this page:
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.
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.

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

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.

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.

File | Link | Security Key |
---|---|---|
Data Stream | Geofence Example.xuc | C0mp|ex123 |
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.
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.

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

- 1.
- 2.Select the attributes from input data that represent Latitude and Longitude.
Apply the changes.

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.
File | Link | Security Key |
---|---|---|
Data Stream | Geofence Function Example.xuc | C0mp|ex123 |
Sample File | Geofence.csv | |
Last modified 1yr ago