creating flat structure GeoEvent Definition from Verizon Networkfleet

3351
22
Jump to solution
02-05-2019 09:31 AM
ErikBlake
Occasional Contributor III

So I am completely new to GeoEvent Server. I am trying to understand how to map verizon's networkfleet message to a flat structure. The appendix page that comes with the instructions on how to install the connector is not very informative for a newbie like me. I need some more guidance. Is there anymore detailed info out there that shows how to do this? 

I have all the definitions that get created when you add the adapter. I am confused about how you get this:

"GPSFix.Speed[0].Value"

"GPSFix.Speed[1].Value"

"GPSFix.Speed[2].Value"

I am not sure what the "value" part of this is, or the number in the brackets.

Also confused about the appropriate outputs to use. I have a feature service created. Just trying to figure out how I can get my feature service updated with the location of our vehicles. The end result I want is to have one point representing each vehicle in our fleet that shows their location every so often based off our contract with verizon. Don't need any elaborate set up. just a simple output showing locations with vehicle label. 

Any help with where to find more documentation, or even an example of someones Geoevent service structure that they have created, would be greatly appreciated from a newbie such as myself

Thanks.

 

 

0 Kudos
1 Solution

Accepted Solutions
MikeSchonlau
Occasional Contributor III

Hello Folks

We have been using Verizon NetworkFleet inputs with GeoEvent for about the past 18 months. I'm happy to share what we've learned (mostly the hard way). We currently have public snow plow maps displaying live vehicle locations around the City. Here a few notes that we have discovered along the way:

  • The Verizon GPS payload is really the only one we care about
  • For adding attributes like a vehicle id, vehicle group, or driver names, we found using the Field Enricher (feature service) is the most reliable way to go
  • It is a good idea to come up with a data retention policy for AVL data because it can grow large fast and it will ultimately slow your feature service down if you don't truncate/archive it

Here is some information I recently shared with another user about we setup our GeoEvent services to add vehicle id's and other custom attributes:

To solve the vehicle labeling problem, I first published a hosted feature service in ArcGIS Online (you could also publish this to ArcGIS Server). This is my lookup table that contains the VIN's and their corresponding Vehicle ID's and Vehicle Groups. Here is the schema:
And this is how that attribute table is populated:
I needed our Public Works folks to create this table for me and then I loaded their table into this feature service. The geometry of the records is not important and not used, so I just gave all of the records a geocodable address.
Now in GeoEvent, here is the service I created:
I think the data stream I am getting from Verizon is actually just the GPS payload data, so I probably don't need the filter. The Field Mapper looks like this:
You can see I'm creating a new GeoEvent Defintion that includes the new fields I want to populate.
Now I send those GeoEvents to the Field Enricher, which looks like this:
The Enrichment Fields are the new fields I want to populate using info from the lookup hosted feature service. The join is happening on the VIN field from both the incoming GeoEvents and my lookup hosted feature service.
I am then sending the resulting GeoEvents to my output feature services - one for the current location only and another for the cumulative locations:
I hope this is helpful. Feel free to contact me if you have other questions. 
Mike

View solution in original post

22 Replies
EricSpangenberg
New Contributor III

Erik - we are in the same situation here.  Total newbie to GeoEvent Manager and Verizon Networkfleet.  I have been reading the training modules and like you, I just want to see how to create the flat structure that the Verizon document noted.

My plan here was to create the output and eventual geoevent service as a streaming service, but if there is a better option I would welcome any input.

Like you, just want to show where the assets (snow plows) are in the city.

I'll share here if I find more

0 Kudos
ErikBlake
Occasional Contributor III

Eric

I appreciate that. I will do the same. 

0 Kudos
NathanKemphues
New Contributor III

Hi Eric and Erik

Thanks for asking this, it has made me finally document our primary GeoEvent service! With GeoEvent, even a simple sounding task often winds up being quite convoluted. 

For your main question the type of output connector you will need is Update a Feature. This will require that you have created a featureclass in an SDE geodatabase and published it with ArcServer (or Portal?) with at least query, add, and update access.

The bit about "GPSFix.Speed[0].Value" has to do with the data coming in as an array (or series of arrays, if I understand correctly). Hooking your input up directly to a text output (JSON) will let you see what the raw data looks like. In this case, you have two levels of array: GPSFix has several values (VIN, MessageTime, Latitude, Speed, etc.) Thus you have "GPSFix.Speed." However, there are three different speed readings: instantaneous, average, and maximum (since the last message, I think). Thus "GPSFix.Speed[2].Value" will give you the number for the maximum speed; you could also ask for "GPSFix.Speed[2].Units to learn that this is in MPH.

I'm attaching a screenshot of our service and another of a JSON. I have more I can share if you like.

One word of advice: you will want to pay close attention to GeoEvent Definitions. Some processors work best if you have created the definition yourself (say, when you are using the Field Mapper to ensure that you output matches the schema of your feature class), while other processors will want to create their own (like the field enricher). 

Good luck!

EricSpangenberg
New Contributor III

Nathan -

Thank you very much for sharing your GeoEvent service workflow, more questions on that later.

 

My struggle early was that I kept trying to create our output as a streaming service, nothing worked.  Early last week I decided to do what you just shared – I created an Output “Add Feature to the Spatiotemporal Big Data Store”  

 

With that done we were able to create a GeoEvent Service – this is where the Field Mapper Processor comes into play in order to ‘flatten’ the Verizon hierarchical field structure.  We created our own GeoEvent definition to match the desired fields as outlined in the Verizon training document.

 

In the original Source Fields for the field mapping processor the values were all GPSFix.Speed.Value.  update those source fields with the respective [0], [1], [2] doing so appeared to resolve correctly.

  

Now, after reading Nathan's post, I’m wondering if what we need to do is create a new service that will Update the feature ?   

 

The existing Add a Feature appears to be working in that we have points on the map now… a lot of points.

 

Nathan, would you be willing to share the details in the various processors you use in your GeoEvent service?  The Current Time, Add Fleet Data, Pass Through…all of those have me very curious about what more we can do with this.

 

I know I need to read the GeoEvent Tutorials, but I’d just like to get something up for our street department.

Thank you for your response – very much appreciated.

NathanKemphues
New Contributor III

You are correct Update a Feature is what you want. If you only want to show trucks that are actually on the road, it has an option to delete records after a given time.

"Current Time" is a field calculator to ensure that we always have at least one field that displays in the correct timezone. "Add Fleet Data" is the 'field enricher' to processor to add data to make it more readable (our truck numbers, operators, etc.)

"Pass through" is merely a placeholder in case we make some changes ; )

Also note the filter "GPS"- verizonnetworkfleet sends out several different types of message (i.e. "Diagnostic") with different definitions. Selecting only those messages with the correct definition ensures that you are working with a consistent set of incoming data.

EricSpangenberg
New Contributor III

Wow, that tidbit of information about the "GPS" filter was huge.  I applied that just now and a whole series of log errors just went away!

Earlier this morning I asked our street crew to provide a file in anticipation of using something like field enricher - your comment and Michael's below are a huge help.

Thank you very much!

ErikBlake
Occasional Contributor III

Thanks Nathan for all your help and sharing of your workflow. Much appreciated. 

0 Kudos
ErikBlake
Occasional Contributor III

Nathan

After I apply my GPS filter it would make sense that my In/Out counts are no longer the same, right? my In count is higher then my out count.

0 Kudos
NathanKemphues
New Contributor III

Yes, exactly. The other messages (diagnostic etc) are coming in, but not

making it past the filter.