Check the robust spatial relations for building and building parts

If the Valencia data is still not fully correct after filtering the building_part tags, which indicates that some buildings have spatial overlapping relations but no information could be used for distinguishing. Thus, the robust way of doing this could be a PostCheckGroup:

  1. after inserting all the building entities from source, check the spatial relations, if the overlapping area between building A and B is equal to area of building A, then A should be reset as building part. Change the category value as 2 and update it into the database.
  2. After all the building entities category values are updated from 1st check step, further build the links as the real relations between parent building and its parts. All the building parts should have a parent_id which points to the full building entity.
  3. Compare and then merge/inherit all the selected building parts attributes to the full building entity, update the full building attributes and taxonomy.

\ryc @all

Edited by Chengzhi Rao