Using GeoEvent to do Proximity Alerts

1008
4
04-01-2015 06:34 PM
MorakotPilouk
Esri Contributor
3 4 1,008

A number of people asked me whether it is possible to use GeoEvent to do proximity alerts or collision avoidance. For example testing whether two airplanes or ships are within a certain distance between each other current positions.

The bad news is there is no Proximity operator in the current GeoEvent 10.3 to help you. The good news you can compose a solution that works even if there are thousands of tracks (of moving objects).

GeoEvent 10.3 added a number of key elements that allow composing a solution to perform this kind of operation. First is a fast in-memory spatial indexing which is a Quadtree-based to help finding an object in space very quickly. Second is Stream Service which is a WebSocket-based that allows push-based real-time streaming output. Third is the GeoFence Synchronization with Stream Service. And the fourth one is the Buffer Creator Processor. Other components are also needed.

First the input data should be output to a Stream Service as is (i.e. point geometry) to make it available for GeoFence Synchronization then a Synchronize GeoFences needs to be created by connecting to the Stream Service URL outputting from the first step. Once this is done, proximity test processing logic can be set up by first using the Buffer Creator to create a circular geometry for each point. Use GeoTagger to tag the incoming event (the results from the Buffer Creator) with the name of the GeoFence using a Spatial Operator, e.g. "Contains Any". This is pretty much a point-in-polygon test. Please note that there can be more than one GeoFence contained in the resulting field value due to the fact that a buffer polygon can contain more than one point -- which is what we want anyway. If the resulting GeoTag field is not null then trigger the proximity alert by using a filter. The buffers that were GeoTagged can be output to a feature or stream service for displaying on a WebMap in real-time. I tested this with the flight tracking data and obtained results display in a WebMap as shown below:

flight proximity alerts.png

4 Comments
Sardar_FaisalAbbas
New Contributor II

Hi Morakot,

I have a question, and I think you are the best person to ask it from.

Before going straight to the questions, let me briefly explain what I am trying to achieve with GeoEvent. We have 27000 assets (points, polylines and polygons), stored as feature layers (3 layers). We get a real-time JSON feed (points) from a URL, which we need to plot on the map. Now the output that I need to achieve is that, if the points (from the feed) lies inside or in a close proximity (1 kilometer of the point) of an asset(s) on the ground (static feature layer on Operations Dashboard), then the system should notify user via an email that the “point (from the feed) is inside or close to Asset say 123”.

The only thing I am stuck is how to check whether a point is in close proximity/inside an asset?

how can i achieve this, do i need to create 27000 geofences? or is there another way of solving this problem?

Thanks in advance

Morakot Pilouk

MorakotPilouk
Esri Contributor

Since these required geometric operations, using geofences looks to be the right approach to me. You may want to consider different strategies to do geofencing. For example, if majority of static assets are points you can also keep them as points and generate buffer for each point from the incoming feed before doing geometric test. This will help speeding up the geometric operation to a certain degrees (a polygon against a set of points vs a point against a set of polygons).

At the 10.3.0 release, GeoEvent added fast and efficient in-memory Quadtree indexing to speed up geometric operations in real-time. While 27000 geofences may seem to be a lot, the Quadtree indexing will help reducing number of candidate geofences to be tested against the incoming point data from the feed. Holding all 27000 geofences in memory will need RAM. The complexity of geofences (e.g. number of vertices per polygon) will be a factor determining how much RAM/memory allocation will be needed.

The rate of the incoming feed also determines the load. To meet the required outgoing rate, the hardware resource running GeoEvent will need to be tuned and scaled accordingly, e.g. adding more RAM, cpu-cores, JVM allocation, or adding more instances of GeoEvent.

Hope this helps,

Morakot

Sardar_FaisalAbbas
New Contributor II

Thanks Morakot,

yup after sending the above comment, I went back to work and thought of the exact same idea; i.e., to create buffer for each incoming points. And yes, you are right that the process takes a while!!!! Let me upgrade my RAM from 6GB to 12GB and will share the result here.

Thanks once again!

Sardar_FaisalAbbas
New Contributor II

Morakat,

One question, can I do my above task with using just the geometry of the feature layer rather than creating thousands of geofences to achieve the task ?