GeoTagging and the GeoTag Format

3192
4
01-08-2014 12:29 PM
MarkCollins
Occasional Contributor
I have two questions:

Is there any documentation on the GeoTag format property of the Processor element? I don't really understand the purpose or intended usage of this option.

I'm trying to use the ${FIELD-NAME} function in the message body of my IM output. Is there anyway to access the separate items in the geotags fields? I'm trying to do something like: ${GeoTags[0]}  to give me the first item in the list. 

Thanks,
Mark
0 Kudos
4 Replies
RJSunderman
Esri Regular Contributor
Hello Mark -

Is there any documentation on the GeoTag format property of the Processor element? I don't really understand the purpose or intended usage of this option.
No, the Tutorial" rel="nofollow" target="_blank">http://www.arcgis.com/home/item.html?id=265c334a47994dcc95e... - Introduction to GeoEvent Processor currently available on the Product Gallery does not explain the three options for the GeoTag Format property of the GeoTagger processor. It uses the default (DelimitedValue) without explaining what the other options (Group and List). I will work to better address this in the version of the tutorial being developed for the 10.2.1 product release. If I remember correctly, 'Group' will create a cardinal list of group elements, with the GeoFence name (and optionally the category name) of each GeoFence which satisfies the spatial expression (e.g. INSIDE .*/.*) whereas 'List' generates a simple cardinal list with the GeoFence name (and optionally the category name) of each GeoFence as separate list elements. So the 'List' enrichment similar to 'DelimitedValue', except that each value is in a list rather than in a String separated with commas.

Your best bet for now is to review the GeoEvent Definition created by the GeoTagger processor and look to see how it defines the field element containing the event enrichment values.

Is there anyway to access the separate items in the geotags fields?
If you are using the default, DelimitedValue, to combine the GeoFence names (and optionally category names) of the different GeoFences in which your event is INSIDE (for example), then you only have a comma separated list of values with no way to index into the string. If you were to experiment with using either the Group or the List output format options, then you might be able to include an expression like ${GeoTags[0]} to obtain the first ordinal from a cardinal field GeoTags. Whether that gives you a String (Category/FenceName) or a Group element (with subfields .Category and .Name) depends on whether the GeoTagger processor is configured to enrich events with a 'Group' or 'List'.

I haven't tried this myself, so I'm not sure of the syntax. I will try to make some time to do so and reply back to this thread.

- RJ
0 Kudos
MarkCollins
Occasional Contributor
Thanks for your reply.

I have tried ${GeoTags[0]} with all three format options and it does not appear to work.
0 Kudos
RJSunderman
Esri Regular Contributor
Mark -

I was able to confirm that neither the syntax ${FieldName[idx]} nor ${Fieldname}[idx] appear to work with the 10.2.1 product release when attempting to configure an SMS or E-mail output to pull values out of a list added to a GeoEvent by a GeoTagger processor.

I think I'm able to do what you're trying to do, however, if I incorporate a Field Calculator. I reconfigured the GeoTagger processors in my service to use the 'List' GeoTag Format rather than the default DelimitedValue format. Then, before the enriched event is sent to the Output connector,  I configured a Field Calculator (see illustration below) to extract a String element from the List into a new field. Then I reference the new field in the email-text-out Output, to avoid having to combine the square-brackets required for indexing with the curl-brackets used to indicate in the Output's configuration that we are inserting a value from an event field.

[ATTACH=CONFIG]30413[/ATTACH]

You might recognize that a GeoTagger processor is really a specialized implementation of a Field Enricher processor and a spatial filter and consider exactly what you are trying to accomplish with the event enrichment being performed by the GeoTagger. If you were to configure the GeoFences property of your GeoTagger with ".*/.*" the processor would consider all GeoFences in all GeoFence Categories. In this case, I don't think you'll be guaranteed that enrichment will occur in the same order every time. That is to say, if you always pull the 0th item from the GeoTags field (assuming that field is a List) you may not always get the name of a GeoFence from the same category (assuming that you have GeoFences in more than one category). Multiple GeoFences, which may or may not overlap, which are organized in multiple categories, might necessitate you take a specific approach when designing your GeoEvent Service.

We will look into addressing the apparent syntatic limitation when working with event fields which are Groups and Lists in the different Notification output connectors.

Hope this information helps -
RJ
0 Kudos
MarkCollins
Occasional Contributor
RJ,

Thanks for the explanation. I've ended up using a field enricher approach that vlad helped me with to solve this for the time being. I don't think this will deal w/ the overlapping geo fences situation but I can deal with that for the time being.

Details here: http://forums.arcgis.com/threads/100211-GeoTagging-several-fields-from-one-geo-fence

-Mark
0 Kudos