And n = 9? I would have guessed that it would be 10 but that seems to be the most common count but some have fewer. Is it 10 including the feature you're measuring the distance from and that's why there are a maximum of 9? Is there a maximum distance that would lead some features to have fewer than 9 and if so what is that distance?
Sorry, now I'm even more confused. The max distance is 10km from the centroid? So the number of features is unbounded as long as it's withing 10km of the centroid? I can see how it's somewhat arbitrary if the feature is much larger than 10km. Is that what you mean by arbitrary. If it's arbitrary is there some particular reason it's included?
it is included because some users asked for it.
I think it is easier for a user to calculate their own nearby function in exactly the way they need it. The lat/lng is available and to calculate the distance is fairly easy.