I've found the bug. I wonder how is it possible that no one noticed this before! A side effect of the bug is that distance(a,b) can be different from distance(b,a). This applies to your testcase (urgh). http://postgis.refractions.net/bugs/bug.php?op=show&bugid=108 If you can give a try to current head you should find it fixed. Thanks for your report. --strk;