seeking help with ENTER spatial filter

676
1
11-30-2019 12:32 PM
LynnCarlson__GISP
Occasional Contributor

Hello, I have a project requiring a text message be sent to an end user upon entering any geofence "assigned" to them.

Problem:  The Enter spatial filter is not working

Geofence set up:

Geofences are polygons originally digitized in ArcGIS Pro 2.4 as a feature class.  WGS1984 is set as the coordinate system in order to avoid on the fly projection once imported to Geoevent.

There is a different feature class to “become” geofences for 8 individuals (so there are 8 feature classes).  Each feature class has fewer than 10 polygons.

All polygons in each feature class are simple – at most 6 vertices.

Each polygon in each feature class is given a unique name (text/string) in an attribute “fencename”.

The feature classes are each published from ArcGIS Pro to ArcGIS Online as hosted feature layers.  I can see and interact with (open the table, identify the fencename, etc.) these hosted feature layers by adding them to a Map Viewer in ArcGIS Online.

From within GeoEvent Server Manager, I import each hosted feature layer from ArcGIS Online into Geoevent from the Sites > Geofence panel.  I select the attribute containing the unique identifier for the fence name, and enter the category manually (not from an attribute as I do for the fence name).  (I understand entering the category name manually is allowed based on the documentation and the Best Practices blog by Christopher Dufault).

The geofences are static; I do not need synchronization so am performing a one-time import for each feature service.

The default setting of Active is set to true.  I am not using a Time Start / Time End.

 

Geoevent Service set up:

 

ArcGIS Enterprise 10.6.1 with Server and GeoEvent on the same server.  It is unfederated.

Input connector is a rest-json-in.  Incoming data is from an iOS app called SensorLog. The app has been installed on each of the 8 end users’ cell phones and runs in the background of their phone.  The SensorLog app has a place to enter the Custom URL generated by the GeoEvent rest-json-in input connector.  Each person is using this same single, custom URL on their phone so everyone’s data is coming into GeoEvent in one “place”. 

The Geoevent Definition created for the incoming data was modified to include the tags for TrackID (the app sends this as the serial number of a given cell phone) and Geometry (constructed from cell phone GPS x y, also sent by the app).

There are three separate GeoEvent Services set up to process the incoming data (points).

1) A geoevent service to send incoming points to an ArcGIS Online hosted feature layer via a Add A Feature output connector so the data can be analyzed.  This works as expected.  Points are constructed and I can download, examine the data for each end user collected in this single hosted feature layer.

2) A geoevent service to send incoming points to a stream service (on the ArcGIS Enterprise Server - not ArcGIS Online) so I can see the data stream for each end user in real time.  This works most of the time (although I frequently have to re-start the Stream Service, this is not critical)

3) sent to an output SMS connector.  This is the critical piece that is not working. A graphic of this GeoEvent Service is attached.

The SMS text messaging GeoEvent Service first filters the incoming data by the TrackID tag (which in this case is the serial number of each individual’s cell phone as set in the Geoevent Definition)  In the graphic, these first filters are "kristie, nancy, angee, lynn" respectively for each TrackID. 

Next, I have placed a spatial filter for each filtered TrackID (cell phone) based on the Geometry Tag. In the graphic these are "kristiefencing, nancyfences, angeefencing, lynnfencing" respectively.

When the Spatial Filter is set to Within or Inside the individual’s GeoFences (CategoryName/.* ), the text messages are sent to each person and received by the end user on their cell phone.  Based on the success of the text message delivery, I know that the output SMS connector is set up properly.  I also know that the xy coordinates are being recognized as having a relationship with the geofence.  In the graphic the SMS output connectors are,"sms-kristie, sms-nancy, sms-angee, sms-Lynn" respectively for TrackID.

However, as soon as I set an individual’s Spatial Filter to Enter their respective GeoFences, the text messages are no longer sent or received, despite situations in which the incoming events are clearly outside the geofence and then entering the geofence.

I understand that in order for an Enter to be recognized, there must be previous coordinates (events) recognized by Geoevent as being outside the fence.  I can see that this is in fact the case, as I can view the events via the stream service and as points in the hosted feature service.  I can literally watch the incoming events as they travel from outside the geofence (from quite a distance), and then enter the geofence.  See attached notextmessages.mp4. 

Multiple troubleshooting methods have been attempted: rebuild and reimport the geofences; separate the individual text messaging Geoevent Services so each person has their own Service; grouped them together into one Geoevent Service; set a GeoTag Processor instead of a Spatial Filter (which I didn’t think would work because that is just meant to enrich the output with the name of the fence, but saw this setup in one of the tutorials); set a GeoTag processor Spatial Filter combo, both set to Enter; and tried to employ an incident detector instead of the spatial filter.

(Note: In the graphic, the file-json-out* output connectors are being collected for use by esri tech support ongoing).

 

Does anyone have ideas on what to try next?  Do I need to set a separate input connector for each person (a unique incoming URL Rest Endpoint?).  This would seem to defeat the purpose for having the ability to filter the data by an attribute / TrackID, and increase the load on GeoEvent…).  What is the missing piece of the puzzle? 

Thanks in advance for any clarification / ideas / etc.

Lynn

0 Kudos
1 Reply
DanWade
Esri Contributor

The outcome of the Support case was as follows:
There was sporadic behavior with GeoEvent Server geofences. These geofences were being used together with the spatial ENTER for a Filter. While ENTER can be finicky for a spatial filter it was determined that the cause of this geofence behavior was that the third-party mobile application was sending a large amount of events with NULL values which was then leaving the last known ENTER event in an unknown state prior to entering the geofence. However, a solution was found where the first Filter being used to separate all deviceIDs was added onto with an AND filter that filtered for the devideID and an additional attribute field that had a valid value.This filter then eliminated all NULL events going to the Filter performing the spatial ENTER.