nearestIndex{X,Y} methods