Furious said:
Since the OP did not define what s/he thinks is a neighbor, your
examples may or may not be right. Maybe 26 Garden Villa and 30 Garden
Villa are not right and the neighbors are the people who live on the
same floor of the same building as A Person.
Yes, if you take vertical relationships into account then that does add
another, um, dimension to the problem ;-)
Tricky. But since the OP did not define "neighbor" how do you know he
wants them included.
I saw it the other way around. This problem doesn't have a precise solution.
Not even given a good quality GIS database. E.g. two people who live close to
each other but are separated by a river, a motorway, or even just a busy
street, might not count as neighbours. OTOH, a farmer in a remote area might
consider the farm on the opposite side of the valley to be his "next-door"
neighbour even though a river ran down the valley. So, the approach is to
assume a workable approximation; one which is simple to implement (albeit
unreliable).
And if the customer finds that unacceptable, then it's up to /them/ to define
what they mean more precisely -- which, with near 100% certainty, they won't be
able to do. Not unless they are specialists in the domain, but then they'd be
able to answer all of the OP's question; and indeed the answer would be part of
the functional spec, not something the designer or programmer was allowed or
expected to invent.
-- chris