Extracting Geometry Coordinates from JSON String

6128
11
06-11-2014 04:54 PM
TomFlahive
New Contributor III
With the GeoEvent Processor, is there a way to extract the coordinates from a JSON field when the coordinates are embedded in a single string?:

"CREATED_LOCATION":"31.555114:-117.458182:12.792526:10.000000:3.000000:0.000000:-1.000000:1402525011.385171"


I'm just trying to pull out the 31.555114 and -117.458182 to be used in creating Geometry for a feature service.  I asked a similar question recently (http://forums.arcgis.com/threads/109721-Converting-Lat-Long-Coordinates-in-JSON-Feed-to-Geometry?p=3...), but this case is a little trickier since the coordinates are now embedded in a single string.
0 Kudos
11 Replies
SaraAbasi
New Contributor III

I have a field mapper in the service and I've mapped the created geo definition to the flat definition. 

then I used the flat one in the output and datastore. 

I feel like there is something wrong with the fields and cardinalities. Please see the screenshots below.

"Bird-Status-changes- created" is the geo definition automatically created by the input. 

Field mapper processor in the service:

Output connector:

Auto-created geo definition: (we added "construct geometry field, I am not sure how they are used to construct the geometry?"). I have added the "Geometry" manually. 

Flat geo definition:

0 Kudos
TomFlahive
New Contributor III
Thanks RJ, I would have never figured that out.  This will work.

Tom
0 Kudos