GEO (standardization function)

The GEO standardization function converts latitude/longitude location coordinates into a standardized format that can be consumed by GEO comparison and bucket functions.

The mpi_memaddr and mpi_memelig tables each contain a 40 character-length geotext1field that stores the latitude/longitude. If you are creating an implementation-defined segment (IDS), your IDS table requires a 40 character field for latitude/longitude storage. The data used to derive the latitude and longitude should be in the same row as the associated geotext field. Since the latitude/longitude is typically derived from the member address, memaddr is suggested.

Output Type
geotext1, up to 40 characters
precision - specified as a number of decimal places
Number of input fields
Number of output fields
  1. The input format accepted by GEO consists of a latitude coordinate followed by a longitude coordinate. The latitude is separated from the longitude by one or more spaces or tab characters. The latitude/longitude coordinates must be valid (-90 <=lat <= +90, -180 < long <= +180) or the geocode is treated as a missing or anonymous value.
  2. Both the latitude and longitude consist of a sign and an angle.
    1. For a latitude, the sign is a single character from the set: “+-NS”. The characters “+” and “N” denote a north latitude and the characters “-“ and “S” denote a south latitude.
    2. For a longitude, the sign is a single character from the set “+-EW”. The characters “+” and “E” denote an east longitude and the characters “-“ and “W” denote a west longitude.
    3. The sign for latitude and longitude might be omitted. If omitted, the sign of the latitude is assumed to be “N” and the sign of the longitude is assumed to be “E”.
    4. For both latitude and longitude, the angle might be specified in either degrees/minutes/seconds/fractional seconds or degrees/fractional degrees. Minutes, seconds, and fractions are separated from each other by a period (.). In order to avoid ambiguity, when specifying degrees/minutes/seconds all three values must appear.

      For example, all of the following inputs represent the coordinate with latitude 30 degrees, 17 minutes, 59 seconds north, and longitude 97 degrees, 41 minutes, 59 seconds west:

      N30.17.59 W97.41.59

      +30.17.59 -97.41.59

      30.17.59 -97.41.59

      To express the same coordinate in degrees and fractions, the following forms can be used:

      N30.3 W97.7

      +30.3 -97.7

      30.3 -97.7

  3. The standardized form represents both latitude and longitude as degrees/fractional degrees. Latitude is separated from longitude by the character ‘X'. The letters “NSEW” are used to represent the sign of the angles and the decimal point is represented by the character “V”.

The standardized form of the coordinate described above is:


The default precision of the standardized coordinates is 12 decimal places. This precision can be changed by using an optional argument to the standardization function. Specify the precision by entering the number XX where XX is the number of decimal places of precision wanted.