osbng.bng_reference.BNGReference.bng_neighbours#
- BNGReference.bng_neighbours() list[BNGReference][source]#
Returns the four BNGReference object neighbours to this BNGReference.
The neighbours are defined as the grid squares immediately North, East, South and West of the input grid square sharing an edge with the input
BNGReferenceobject.- Returns:
The grid squares immediately North, South, East and West of this
BNGReferenceobject.- Return type:
Examples
>>> BNGReference("SU1234").bng_neighbours() [BNGReference('SU1235'), BNGReference('SU1334'), BNGReference('SU1233'), BNGReference('SU1134')]
See also
The equivalent
osbng.traversal.bng_neighbours()function.