Location Functions

Function
Name
Description
LAT(locationval) Latitude Returns the latitude in decimal degrees of the given Location field value
LON(locationval) Longitude Returns the longitude in decimal degrees of the given Location field value
HEADING(locationval) Heading Returns the heading against true north in decimal degrees of the given location value
ALTITUDE(locationval) Altitude Returns the altitude above/below sea level in metres of the given location value
ACCURACY(locationval) Accuracy Returns the accuracy in metres of the given location value
STREETNUM(locationval) Street Number Returns the street number for the given location value. Matches ‘sub_thoroughfare’ on OASIS Specification.
STREET(locationval) Street Name Returns the street name for the given location value. Matches ‘thoroughfare’ on OASIS Specification.
CITY(locationval) City / Locality Returns the city / locality name for the given location value. Matches ‘locality’ on OASIS Specification.
COUNTY(locationval) County / District Returns the county / district area for the given location value. Mainly USA specific. Matches ‘sub_admin_area’ on OASIS Specification
STATE(locationval) State / Province Returns the state / province for the given location value. Matches ‘admin_area’ on OASIS Specification.
POSTCODE(locationval) Postal / Zip Code Returns the postal / zip code of the given location value. Matches ‘postal_code’ on OASIS Specification
COUNTRY(locationval) Country Code Returns the ISO country code of the given location value. Matches ‘country’ on OASIS Specification.
MIBETWEEN(startPoint, endPoint) Miles Between Finds the miles between two geo-points, using great-circle math. Geo-points are strings in ‘lat lon’ format, Location field answers are also geo-points. e.g. MIBETWEEN(‘-8.45234 27.7623423’, {{myGpsField}})
KMBETWEEN(startPoint, endPoint) Kilometres Between Finds the kilometers between two geo-points, using great-circle math. Geo-points are strings in ‘lat lon’ format, Location field answers are also geo-points. e.g.  KMBETWEEN(‘-8.45234 27.7623423’, {{myGpsField}})
INPOLYGON(point, polygonPoints) Is In Polygon (geofence) Returns a true/false answer on whether the given geo-point is within the given polygon. Polygon values must be pipe-seperated string of geo-points. e.g.  INPOLYGON({{myGpsVal}}, ‘-8.6782523 27.2918257|-8.6672229 28.7094422|-7.6447228 29.3849982’)