indx is sorted together with coords in bilinear.py.