Hi all, I'm fairly new to GeoEvent Server, and I'm having a heck of a time figuring out how to do something that, at least on the surface, seems like it should be straightforward.
I have two feature classes: one point feature class representing patrol vehicles, and one polygon feature class representing patrol areas. The goal is to update the patrol area's LAST_PATROLLED_DATE when a patrol vehicle intersects with it.
So far, I have successfully created a stream service reprenting the vehicles, and imported the patrol areas as GeoFences. Where I'm stuck is actually using the GeoFences (I'm assuming GeoFences and a stream service is the recommended approach).
How does one configure a process to be triggered when a vehicle enters a GeoFenced area? My hope is the input of this process would include the definitions of both the geofence entered, and the vehicle that entered it.
Update 1:I"ve figured out I should be using a Filter element wired-up to my GeoFences, however I don't see any way to update the feature corresponding to the intersected GeoFence. Is there a way to query a feature layer in a GeoEvent Service?
Update 2:
In addition to the reply below I marked as the solution, I found this community post very helpful. The input connector used in the post is different, but everything else seems to apply.
Solved! Go to Solution.
Hi @JonSwoveland,
I have a couple of ideas for you, note I have not actually had to do the 'update feature' bit myself:
My thinking is: input vehicle event -> geotagger with fence for enter -> filter to only pass events if the fence is not NULL -> field calculator to get currentTime() -> field reducer to remove everything you don't need -> update a feature with the timestamp.
The main thing I'm not sure about is if the "Update a Feature" output will let you update it with only objectid and timestamp, or if it will also require all the other fields in the schema. If it does, you could use the Field Enricher (Feature Service) to lookup all the additional field details for that specific fence using objectid, then just pass them through unaltered to the output.
Let us know how you get on!
Hi @JonSwoveland,
I have a couple of ideas for you, note I have not actually had to do the 'update feature' bit myself:
My thinking is: input vehicle event -> geotagger with fence for enter -> filter to only pass events if the fence is not NULL -> field calculator to get currentTime() -> field reducer to remove everything you don't need -> update a feature with the timestamp.
The main thing I'm not sure about is if the "Update a Feature" output will let you update it with only objectid and timestamp, or if it will also require all the other fields in the schema. If it does, you could use the Field Enricher (Feature Service) to lookup all the additional field details for that specific fence using objectid, then just pass them through unaltered to the output.
Let us know how you get on!
Thanks Jordan!
You were right on the money with the GeoTagger suggestion. I've got a simple service working by distilling the process shown in this post. My plan is to update the service so a patrol area is only marked as patrolled when a vehicle is within it for a certain length of time (which is exactly what the post I linked explains how to do).
One more thing...
The GeoEvent Service model is as follows: