osbng.bng_reference.BNGReference#
- class osbng.bng_reference.BNGReference(bng_ref_string: str)[source]#
Initialises a
BNGReferencefrom a BNG reference string.Methods
__init__(bng_ref_string)Initialises a
BNGReferencefrom a BNG reference string.bng_distance(bng_ref2, *[, edge_to_edge])Returns the euclidean distance between bng_ref2 and this
BNGReference.bng_dwithin(d)Returns all BNGReference objects within distance
dof this BNGReference.bng_is_neighbour(bng_ref2)Tests whether
bng_ref2is a neighbour of thisBNGReference.bng_kdisc(k, *[, return_relations])Returns a filled disc of BNGReference objects around this
BNGReference.bng_kring(k, *[, return_relations])Returns a hollow ring of BNGReference objects around this
BNGReference.Returns the four BNGReference object neighbours to this BNGReference.
Returns grid square bounding box coordinates of this
BNGReference.bng_to_children(*[, resolution])Returns a list of child
BNGReferenceobjects of thisBNGReference.Returns a grid square as a
Shapely Polygonof thisBNGReference.bng_to_parent(*[, resolution])Returns the
BNGReferencethat is the parent of thisBNGReference.bng_to_xy(*[, position])Returns easting and northing coordinates of this
BNGReference.Attributes
The BNG reference string of this
BNGReferencewith whitespace removed.The BNG reference string of this
BNGReferencein pretty format.The resolution of this
BNGReferenceexpressed as a string label.The resolution of this
BNGReferencein meters.