Actually the jsi library (http://jsi.sourceforge.net) is perfect for this problem. It was written to support this exact scenario.
When searching for the closest rectangles (or points) you can provide the maximum distance, and it will return the results in increasing order of distance.
It does not support the request "return every point within a radius of 800 m", but in practice you need a limit. Thus, the jsi library supports the more useful "returning the nearest 50 points within a radius of 800 m."
If you really want every point in the radius, you can increase the number of points to a large number and run the closest queryN, or execute the intersection query and filter by distance in your own code.
source share