Geocode functions perform different actions on Geocode objects, such as calculating the distance between two Geocode values or obtaining a Geocode's latitude coordinate.
This table describes the Geocode functions that Transform supports. The same functions are described in the Transform API Reference (Groovydoc).
| User Function | Return Data Type | Description |
|---|---|---|
| distance(Geocode geo1, Geocode geo2) | Double | Calculates the distance between two Geocode values, in kilometers. Note that geocode functions do not accept type Long. |
| getLatitude(Geocode geo) | Double | Returns the latitude coordinate of a Geocode value. Note that geocode functions do not accept type Long. |
| getLongitude(Geocode geo) | Double | Returns the longitude coordinate of a Geocode value. Note that geocode functions do not accept type Long. |
| isGeocode(String s) | Boolean | Determines whether a String is a valid Geocode value. |
| toGeocode(String s) | Geocode | Converts a String to a Geocode value. |
| toGeocode(Double lat, Double lon) | Geocode | Converts a pair of latitude and longitude coordinates to a Geocode value. For the inputs to this function, ensure that you enter valid latitude and longitude values. The range for valid latitude values is from -90.0 to 90.0. The range for valid longitude values is from -180.0 to 180.0. |