Geoevent: Create Line from Points

1437
6
01-16-2018 01:15 AM
ElleW
by
New Contributor III

Is there a way to change the geometry of incoming point events to line in GeoEvent? 

Tags (1)
0 Kudos
6 Replies
XanderBakker
Esri Esteemed Contributor

There is a relatively old thread here: Generating Tracks from Events that mentions that is was in the backlog back in 2014. 

RJ Sunderman : any update on this topic?

RJSunderman
Esri Regular Contributor

Hello Elle / Xander -

Your options for adding and updating a track line as a Polyline feature record have not changed. In the thread Xander Bakker‌ references, Generating Tracks from Events‌ (April 2014), I mentioned a processor we were considering that would do this for you. The "reconstruct tracks" processor ended up being implemented as part of GeoAnalytics Server -- not GeoEvent Server. You can read more about that capability here:  Reconstruct Tracks

In that same thread I suggested using an Incident Detector to help create your track line. That is still an option:

Please see my update to theRe: Generating Tracks from Eventsthread.
Using an Incident Detector this way is a very bad idea.

You would select Polyline for the processor's Geometry Type to configure the processor to build and update a polyline rather than point features. You will also need to make sure that the Incident Type is Cumulative (not PointInTime) ... and set the processor's Expiry Time to a sufficiently high value that the incident will not be automatically closed when no updates are received for a period of time; the default is 300 seconds (5 minutes).

GeoEvent Server Inbound connectors, such as Receive JSON on a REST Endpoint, offer the ability to Construct Geometry From Fields, but this is necessarily limited to Point feature geometry with a single X / Y coordinate value pair. The GeoEvent Server input cannot iterate over an array of coordinate values to build out a polyline or a polygon.

Your only other option, using GeoEvent Server, would be to incorporate a series of Field Calculator processors into a GeoEvent Service to perform specific string manipulations and transform coordinate information from a received event record into a JSON string representation of an Esri Polyline or Polygon geometry. The GeoNet thread How to switch positions on coordinates provides an example of how you might approach this. The specification for the Esri Feature JSON can be found beneath the ArcGIS REST API Geometry objects topic.

Please also see comments from Tanu Hoque‌ and Thomas Colson‌ in the thread Tracking Analyst in Pro‌. Thomas offers an approach using SQL to create a time ordered set of GPS points which can be used as vertices to create a polyline. Tanu includes animated illustrations of how he got this to work.

Hope this information was helpful --

RJ

EricIronside
Esri Contributor

Xander Bakker‌ & Elle W‌ Just adding some more ideas to how one might produce polylines from events in GeoEvent Server:  

Use a stream service

Assuming you don't need to store the lines anywhere, you can set the visualization settings in your stream service item within portal (or on the web map when you add it).  Below are some suggested settings for vehicles (arrow symbol for current location, transparent previous point locations, red line for track). While these lines are temporary, they look good.

Use the Motion Calculator

The Motion Calculator Processor is a custom processor on the GeoEvent Gallery. It will calculate a line geometry from your event points. It also provides additional information about that line (length, direction, etc.) and can even handle 3D geometry. 

https://www.arcgis.com/home/item.html?id=03c440742bbd4686b16420164d30e448 

Best,

Eric

AndySkelton
New Contributor III

Eric,

I'm liking the Motion Calculator idea; I'm also in the same position as Elle. Do you know if it will work in or be updated for 10.7.x?

0 Kudos
EricIronside
Esri Contributor

Please use the current release. It should be compatible with any version 10.6 or later.

We recently changed our release strategy for Gallery items. We will no longer be releasing a new item for each new version of GoeEvent. The items are now compiled against the earliest version that is supported (in most cases this is 10.4). Each release will be compatible with any version at or later than the compiled version (so if it is released against 10.4.0, it will be compatible with any version 10.4.0 or later). The version of the Gallery item you use does not need to match the version of GeoEvent Server.

EricIronside
Esri Contributor

Adding one more reference to this question:

You can use the Timetree Processor to create lines out of N points or Y period of time: https://community.esri.com/t5/arcgis-geoevent-server-blog/geoevent-delaying-and-or-time-sorting-even... 

If your events sometimes arrive out of order, causing your lines to be incorrect, you can add the Delay Processor to the mix before your Motion Calculator or Timetree to properly order your events: https://community.esri.com/t5/arcgis-geoevent-server-blog/geoevent-delaying-and-or-time-sorting-even... 

0 Kudos