osbng.bng_reference.BNGReference.__lt__#

BNGReference.__lt__(other: object)[source]#

Determines whether this BNGReference is ordered before other.

For two BNGReference objects, ordering is done in the following order:

  1. Rank by resolution_metres, where higher resolutions are ordered first.

  2. Rank by bng_ref_compact alphabetically.

Example

>>> BNGReference("SU") < BNGReference("SU1234")
True
>>> BNGReference("SU") < BNGReference("TU")
True