Possible To Check Two Incoming Feeds Then Incident Detector?

3790
7
08-08-2013 03:50 AM
JithenSingh
Esri Contributor
Hi There,

I would like to know if my what I am trying to do is possible with a processor.
See my screenshot.

I basically have a feed of vehicle positions coming in called assetsincoming.
I then also have geofences setup.  I can easily setup an incident detector to tell me if one of the vehicles is inside a geofence.

My question is: Can I setup an incident detector to tell me if one of my vehicles is inside a geofence ONLY IF that geofence is set Active = True.

Is this possible? We plan on updating the geofences through another app to toggle active = true or false.

I thought a way to go about doing this is to poll the geofence fc which is why I setup gfincoming which is polling AGS for the geofences.

I'm trying to figure out how I join the two? Any ideas?

Thanks
0 Kudos
7 Replies
RyanElliott
New Contributor III
Yes, you can do this.  In fact the Incident Detector does this without any special conditions set by you.  You can disconnect the "gfincoming" input from your Incident Detector and remove the "Active = true" from the conditions.  Instead, configure your synchronization rule to have the "active" status of each geofence driven by a field in the source feature service like in the attached screenshot.
[ATTACH=CONFIG]26575[/ATTACH]

Any geofences that are pulled into GeoEvent Server will be active only if that field in the Feature Service was "true". 

If you want to have that feature service populated by your "gfincoming" input, you can create an output that goes to the geofence feature service, and connect the "gfincoming" input to that new output.
0 Kudos
JithenSingh
Esri Contributor
Ryan,

Thanks for this. I think you have pointed me in the right direction.
I was using the above scenario to understand if this will work on my actual scenario which is:

1. Have a feed of traffic information coming in. This is a JSON feed and its updating a feature class in AGS. The traffic information is a line feature which shows congestion information for each road.

2. I have a number of assets as per assetsincoming which is updating a feature class in AGS as well. I can easily monitoring speed or other attributes on the assets fine.

Now my understanding is that GEP does not support dynamic geofencing? I want the ability to sent out alerts if the asset is on a section of the road which is congested or with heavy traffic.

A solution I have come up with is to buffer all of the roads that have congestion information so I end up with polygons and have these as a geofence, then when the traffic information comes, I can easily check if its congested and update the geofence.

Question: How do I setup a processor so that an alert fires ONLY if assetsincoming is on a section of road that is "congested". Will what you have suggested below work?

Thanks for your help so far.

Cheers

Yes, you can do this.  In fact the Incident Detector does this without any special conditions set by you.  You can disconnect the "gfincoming" input from your Incident Detector and remove the "Active = true" from the conditions.  Instead, configure your synchronization rule to have the "active" status of each geofence driven by a field in the source feature service like in the attached screenshot.
[ATTACH=CONFIG]26575[/ATTACH]

Any geofences that are pulled into GeoEvent Server will be active only if that field in the Feature Service was "true". 

If you want to have that feature service populated by your "gfincoming" input, you can create an output that goes to the geofence feature service, and connect the "gfincoming" input to that new output.
0 Kudos
RyanElliott
New Contributor III
That sounds like something you can accomplish.  I would suggest that you store the buffers around each road segment as a polygon layer in a feature service, but add an extra field representing the "active" state.  Then use the incoming traffic feed to update that active field to turn on/off depending on how heavy the traffic is for the road segment that you used to generate the buffer.  Next create a sync rule that pulls in those buffers as geofences.  The sync rule should be configured to use the active field in the buffer feature service, which in turn is populated by your live road sensor data.  Then feed your incoming vehicle locations to an incident detector that uses those geofences, and it will only generate incidents for vehicles entering "active" (heavy traffic) areas.

Since the buffers don't change their shape, you don't need to change the feature service at all except to turn that active flag on/off.
0 Kudos
JithenSingh
Esri Contributor
Excellent. Thanks Ryan. Will give this a go now.

By the way: Is this the only way to achieve this right now? Using the active field/? Would definitely work if I only wanted to check the one type of congestion (heavy traffic) but if wanted to check heavy and also light and send alerts that would be harder?

I guess I could create another geofence sync and follow the same pattern?

Thanks

That sounds like something you can accomplish.  I would suggest that you store the buffers around each road segment as a polygon layer in a feature service, but add an extra field representing the "active" state.  Then use the incoming traffic feed to update that active field to turn on/off depending on how heavy the traffic is for the road segment that you used to generate the buffer.  Next create a sync rule that pulls in those buffers as geofences.  The sync rule should be configured to use the active field in the buffer feature service, which in turn is populated by your live road sensor data.  Then feed your incoming vehicle locations to an incident detector that uses those geofences, and it will only generate incidents for vehicles entering "active" (heavy traffic) areas.

Since the buffers don't change their shape, you don't need to change the feature service at all except to turn that active flag on/off.
0 Kudos
RyanElliott
New Contributor III

I guess I could create another geofence sync and follow the same pattern?


For now, that's cleanest way to do it without doing some tricky buffer-nameing in the feature service.  But note that creating two sync rules will double the amount of RAM consumed by GeoFences in the GeoEvent Processor.  Keep an eye on the RAM consumed by your GeoEvent Processor.

Actually, it might make more sense to populate a field in the buffer feature service that contains a textual description of the traffic levels in the buffer, such as "LIGHT", "MEDIUM", and "HEAVY".  Then configure your sync rule to use that field to populate the geofence's 'category'.  Now you create two incident processors, one that uses geofences in the "HEAVY" category, and one that uses geofences in the "MEDIUM" category.
JithenSingh
Esri Contributor
Awesome. Thanks Ryan.
Trying this now.

Cheers

For now, that's cleanest way to do it without doing some tricky buffer-nameing in the feature service.  But note that creating two sync rules will double the amount of RAM consumed by GeoFences in the GeoEvent Processor.  Keep an eye on the RAM consumed by your GeoEvent Processor.

Actually, it might make more sense to populate a field in the buffer feature service that contains a textual description of the traffic levels in the buffer, such as "LIGHT", "MEDIUM", and "HEAVY".  Then configure your sync rule to use that field to populate the geofence's 'category'.  Now you create two incident processors, one that uses geofences in the "HEAVY" category, and one that uses geofences in the "MEDIUM" category.
0 Kudos
JithenSingh
Esri Contributor
Thanks for the pointers and suggestions Ryan. I have this scenario working as described.

Thanks
0 Kudos