I am not sure I understand the problem fully, e.g. what to do if there are
observations A,B and C with A to B and B to C less then treshold and A to C
over treshold, but anyway.
Could you first apply a kind of grid to your observations? What I mean is
to round your coords to, say, 1/2 arcsec on each axe and group the results.
I think you will have most observations grouped this way and then use your
regular algorithm to combine the results.
Best regards, Vitalii Tymchyshyn