DISTANCE comparison

Computes the distance between two points and prorates the weight based on the distance between the points. You can use this comparison for matching geographic coordinates where the farther the points are from each other, the lesser the weight that is applied.

Note: The distance is calculated as a Pythagorean distance, which is the square root of the sum of the squares of the coordinates.

Frequency information is not taken into account when this match comparison is used but a two-source match requires four input streams. If you use this match comparison with a Two-source Match stage job, create two dummy file inputs instead of files that contain frequency information.

Required Columns

The following data source and reference source columns are required:

  • Data. The X coordinate from the data source.
  • Data. The Y coordinate from the data source.
  • Reference. The X coordinate from the reference source.
  • Reference. The Y coordinate from the reference source.
Note: Coordinates must be positive or negative integers; decimal places are not permitted.

Required Parameter

The following parameter is required:

Param 1. The maximum distance to be tolerated.

Example

The distance is in the units of the coordinates. For example, if the coordinates are in thousandths of a degree, a maximum distance of 100 tolerates a distance of 0.1 degrees.

If the distance between the points is 0, the agreement weight is assigned. If the distance is 0.05 degrees, the midpoint between the agreement and disagreement weight is assigned. If the distance is greater than 0.1 degree, the disagreement weight is assigned.