Added feature to unify building parts of relations
The current version of rabotnik-obm populates the obm_buildings
table of the OBM Buildings database with all the contents of osm_building_polygons
of the OSM Replication database. However, some of the entries of osm_building_polygons
may be parts of relations, which are often used to represent buildings with more complex geometries as an ensemble of polygons. rabotnik-obm does retrieve the relation_id
of building parts that belong to a relation, and stores it in the obm_buildings
table of the OBM Buildings database, but the entries keep on being separate ones for each building part.
This feature of gde-core
post-processes extracts of the obm_buildings
table so as to group individual entries of the same relation under the same ID. In this cases, the osm_id
of the ensemble becomes their relation_id
. The number of storeys of the ensemble is the largest value of all the individual parts (this is the most conservative assumption). The occupancy of the ensemble is the unique occupancy value of all the pieces (this assumes that rabotnik-obm will assign the same occupancy value to all parts of the same relation, it might need to be revisited in the future if this is not the case).
In the future, this grouping of parts of a relation should occur during the processing of the OSM Replication database to populate the OBM Buildings database by rabotnik-obm.