osbng.bng_reference.BNGReference.bng_dwithin#
- BNGReference.bng_dwithin(d: int | float) list[BNGReference][source]#
Returns all BNGReference objects within distance
dof this BNGReference.All grid squares will be returned for which any part of its boundary is within distance
dof any part of theBNGReferenceobject’s boundary.- Parameters:
- Returns:
All grid squares which have any part of their geometry within distance
dof the current grid square- Return type:
Examples
>>> BNGReference("SU1234").bng_dwithin(1000) [ BNGReference(bng_ref_formatted=SU 11 33, resolution_label=1km), BNGReference(bng_ref_formatted=SU 12 33, resolution_label=1km), BNGReference(bng_ref_formatted=SU 13 33, resolution_label=1km), BNGReference(bng_ref_formatted=SU 11 34, resolution_label=1km), BNGReference(bng_ref_formatted=SU 12 34, resolution_label=1km), BNGReference(bng_ref_formatted=SU 13 34, resolution_label=1km), BNGReference(bng_ref_formatted=SU 11 35, resolution_label=1km), BNGReference(bng_ref_formatted=SU 12 35, resolution_label=1km), BNGReference(bng_ref_formatted=SU 13 35, resolution_label=1km) ] >>> BNGReference("SU1234").bng_dwithin(1001) [list of 21 BNGReference objects]
See also
The equivalent
osbng.traversal.bng_dwithin()function.