How to update an attribute of a feature based on a geoevent

1320
2
11-08-2017 10:59 AM
CassidyKillian
Occasional Contributor II

I am having a hard time with the logic/programming setup for updating the status of an area feature(snow plow district) based on a geoevent(trucks entering area).

Specifically what we are trying to do is update the status attribute of the plow district to "active" based on two trucks(avl) entering that area.

Is this possible?

Thanks for any help/ideas!

0 Kudos
2 Replies
CassidyKillian
Occasional Contributor II

I am still struggling to figure this out if anyone has any suggestions to try.

Thanks!

0 Kudos
RJSunderman
Esri Regular Contributor

Hello Cassidy --

I've replied to your comments on field enrichment of multiple attributes based on a spatial query?

If I understand the question you are asking here, you want to detect when at least two assets are within a work area and update a feature attribute which allows that area to be displayed as "cleared". For this case, I would recommend taking a look at a scenario / demo illustrated in one of our technical workshops. Here's the URL:

GeoEvent Server: Applying Real-Time Analytics - YouTube 

Jump forward to minute 27:05 ... the scenario I'm fast forwarding to suggests that if you were to ingest the GPS event records from your assets and broadcast those via a stream service, you could synchronize a set of dynamic (point) geofences. You could then periodically poll the (polygon) feature service in which you were maintaining your work area features to process *those* event records separately and use a GeoTagger to detect spatial coincidence with one or more positions of tracked assets. The scenario goes on to show how you could use a Field Calculator expression to count the number of asset positions (geofences) which intersect the polled work area feature record.

I would probably recommend using a Field Mapper to strip unwanted fields from a polled work area feature record, so that I had only a asset_count attribute and a unique identifier of the work area. I would allow the GeoTagger to create a field -- which coincidentally exists as an attribute field in the work area feature records -- then use a Field Calculator to write a count of the asset identifiers found inside the area to the asset_count. You can use an add/update output to update just the assets_list and the asset_count in the feature class ... and filters to discover if there are "less than two" or "two or more" assets working the area, and update a feature overlay accordingly.

-- RJ