[Bug&Refactor] - Fix the HB tag error when formatting the HEB underground stories tag; retire the old rules and tests

Fix bugs

In the first version of the OSMStories rule, the formatting of OSM underground stories tags is handled by:

underground_stories_tag = (
                    f"HB:{basements_counts[0]}"
                    if len(basements_counts) == 1
                    else f"HBBET:{basements_counts[0]}-{basements_counts[-1]}"
                )

This causes the error: ValueError: Unknown tag in HEB attribute of taxonomy string. In the subsequent FloorArea rule, the error source is in taxonomylib.py, line 1056, in get_number_of_underground_stories(). The correct tagging is HBEX rather than HB.

To avoid similar issues for other possible tags, change the way of formatting in related rules, make sure the formatting and tagging are done in taxonomy-lib and to be consistent.

Retire rules and tests

The old version of HeightAndFloorAreaRule handles the processing of height attributes HIM, stories/underground stories and the floor area calculation. With the growing of code, the functions of the old rule are seperated into rules and groups to make them more atomic and maangeable. New rules for the height and floor area related infomation are:

  • Height attributes: OSMHeight rule, HeightRule;
  • Stories attributes: OSMStories, GHSLStories and StoriesRule;
  • FloorArea rule.

Thus, the HeightAndFloorArea rule is retired completely. HeightFromEUBuccoAnd3DSources rule is not needed as well since the non-OSM height sources are merging as height_information dict and all the possible height values are processed in the new HeightRule.

Edited by Chengzhi Rao