Map Objects from Geography Field Type to EDD

<< Click to Display Table of Contents >>

Navigation:  Collect > Collect Enterprise > Template Designer Page > Formula Builder >

Map Objects from Geography Field Type to EDD

The Geography field type stores data in a JSON array, as shown below. Pulling data out of the JSON array to map to the EDD requires using the JSON function.

 

Example:

{"Latitude":31.052925224562387,"Longitude":-40.305775836250611,"Accuracy":0.0,"Altitude":0.0,"AltitudeAccuracy":0.0,"Heading":0.0,"Speed":0.0,"TimeStamp":"2023-10-26T16:38:28.6621183-04:00","IsEmpty":false}

 

To map the Latitude and Longitude from the Geography field output to Location_v1.x_coord and Location_v1.y_coord respectively, the following formulas would need to be placed in the Value of the appropriate mapping:

 

Col-Geography_Field_Formula-Example

 

Note: When entering coordinate values, DT_GEOGRAPHY.GEOGRAPHY expects the longitude value to come before the latitude value. For example, a point at latitude 31.052925224562387 and longitude -40.305775836250611 would be written as: POINT(-40.305775836250611 31.052925224562387).