Michael, revision 14319 "Simplify spatial direct ref selection with FFMIN3()" is wrong! The intent is to select the smallest +ve number or -1 if there is +ve. Using FFMIN3 is not going to do this. It does not ignore -ve values. Cheers, Paul