The DISTANCE routine calculates and compares the distance between two (2) points represented by latitude and longitude and returns the score. Distance will be measured in kilometers, miles, or nautical miles.
DISTANCE Routine Modifiers
This routine uses the following two sets of modifiers to find matching scores: "KM, MI, NM" and [DIST90] [DIST80] [DIST70] [DIST60] [DIST50]
The "KM, MI, NM" modifiers specify the distance unit. If this modifier is not specified the default is "KM", kilometers. The valid values for this modifier are:
- KM - kilometers
- MI - miles
- NM - nautical miles
The [DIST90] [DIST80] [DIST70] [DIST60] [DIST50] modifiers specify the set of defined values for returning the score. Values can be any user-defined values including decimal notation (for example, [1.5]), but they should be listed in ascending order. If this modifier is not specified, all records that are an exact match will return the score 100, all others will return the score 90. Based on the latitude/longitude that exist in the records, the distance between the two (2) records determines what score is used.
Example
- Record A: latitude 33980530, longitude -118463733
- Record B: latitude 34125891, longitude -084338400
- ROUTINE_MODIFIER MI
- ROUTINE_MODIFIER ([5][10][15][20][25])
Score |
Description |
---|---|
100 |
Exact match, including 0 versus 0. |
90 |
Distance between A versus B is less than or equal to [DIST90]. |
80 |
Distance between A versus B is less than or equal to [DIST80]. |
70 |
Distance between A versus B is less than or equal to [DIST70]. |
60 |
Distance between A versus B is less than or equal to [DIST60]. |
50 |
Distance between A versus B is less than or equal to [DIST50]. |
40 | Any non-numeric digit |
0 |
Any other distance |