These options affect the calculation of measurements that depend upon the gauge point.
Reference Distance is the distance of the gauge point below track level. Most North American railroads use a 5/8" gauge point.
The Maximum X and Y Gap values come into effect when the gauge point falls in a gap between contour fragments. If the size of the gap does not exceed these maximum values horizontally or vertically, the gauge point is calculated as falling on the straight line connecting the end-points of the two adjacent fragments.

Small gap; gauge point is defined
If either gap exceeds the maximum, then the gauge point may or may not be defined, depending on the direction of the horizontal change across the gap. The gap is defined by the end-points of the adjacent contour fragments. If the upper point is inside the inner point (i.e. closer to the centerline), then the gauge point is considered to be unknown. Measurement values that depend on the gauge point, such as track gauge and face wear, will also be labeled as unknown.

Large gap with upper point inside; gauge point is unknown
However, if the upper point is outside the inner point, the probable cause is a wide lip (horizontal plastic flow) that sticks out far enough to shadow the gauge point. When there is flange contact causing face wear a horizontal lip does not develop. In this case, the algorithm uses the lower end-point of the gap to establish a horizontal reference for the gauge point. That is, it assumes that the actual face at the gauge point has the same X coordinate as the portion of the face that can be seen below the shadow.

Large gap with upper point outside; gauge point is assumed
If no part of the face is visible below the gauge point reference line, the unworn rail profile is used as a reference. If the measured profile contour ends inside the unworn profile, the gauge point is treated as unknown.

Contour only above gauge line, ending inside unworn profile; gauge point is unknown
If the measured contour ends outside the unworn profile, it is treated as lip, and the gauge point is assumed to lie on the unworn profile; i.e. zero wear is assumed.

Contour only above gauge line, crossing unworn profile; gauge point is assumed