ArcGIS Pro

Geofencing with Real-Time Data in ArcGIS Pro 2.4

Geofencing is about triggering an action when one feature comes close to another one. With the availability of smartphones, geofencing in not uncommon to us. We set up alerts to notify us as our kids arrive home from school or to remind us to buy something at the grocery store after work. As a public works official, you may want to be notified as soon as snowplows reach a snowed-in area and as they leave afterward.

This blog describes how you can achieve all that, using stream layers and the new real-time API  in ArcGIS Pro 2.4.

Visualize Features Differently When They Are within a Geofence

This is something that you can do easily using an ArcGIS Arcade expression:

var polygonJSON = {
'rings' : [[[-122.6818,45.5215], [-122.6801,45.5210], [-122.6806,45.5201], [-122.6822,45.5207], [-122.6818,45.5215]]],
'spatialReference' : {'wkid' : 4326}
};
var geom = Polygon(polygonJSON);
iif(Intersects($feature, geom),1,0);

Please note that this approach only works when features are drawn using Shape marker symbols.

Geofence - use Arcade expression to change symbol as features enter a restricted area
Geofence - use Arcade expression to change symbol as features enter a restricted area

Send Alerts

Geofence - notifications as vehicles enter a restricted area
Geofence - notifications as vehicles enter a restricted area

I have used a stream service that simulates two vehicles moving along streets in Portland, Oregon. The sample code, data, and ArcGIS Pro project can be accessed from https://arcg.is/0jH09i.

About the author

Tanu is a product engineer on Esri Mapping Team focusing on map service, print service, and ArcGIS Pro. He also works on spatio-temporal analysis, spatial aggregation and real-time data. Tanu’s background includes a masters in Urban Planning from University of Akron, Ohio, USA and a bachelor degree from Khulna University, Bangladesh, and worked as GIS Coordinator in City of West Springfield, and GIS Specialist in a hydrology modeling center in Bangladesh before joining Esri in 2007.

Next Article

Embed your web map into your organization's website

Read this article