There is a mismatch of building bus_ids in the result tables demand.egon_cts_heat_demand_building_share and demand.egon_cts_electricity_demand_building_share and the mapping table boundaries.egon_map_zensus_mvgd_buildings.
The mismatch probably results in the process of determining the cts demand share per building. Its is derived from the number of amenities within a census cell. If multiple amenities are tagged to a building which exceeds a census cell, there are edge cases in which not all amenities are assigned to the same mvgd.
A building covers multiple census cells
these census cells contain amenities tagged to the building
theses census cells are assigned to multiple mvgd
but the building is only assigned to the substation of the census cell containing its centroid
the building gets assigned all demand of the cencus cells covered according to the number of amenities within
A building however can not get demand from different mvgd by logic as well as by our methodology.
This is a problem taken care of here.
All amenities tagged to a building need to be of the mvgd, if not the ones lower in number per mvgd are dropped.
These cells are compensated for with synthetic buildings.
Apparently there are edge cases in which the mvgd chosen is not the one containing the centroid of the building. This leads to an duplicated key error during the heat pump desaggregation.
To fix this, I propose to simply update the zensus_population_id in openstreetmap.egon_cts_buildingshere
There is a mismatch of building
bus_ids
in the result tablesdemand.egon_cts_heat_demand_building_share
anddemand.egon_cts_electricity_demand_building_share
and the mapping tableboundaries.egon_map_zensus_mvgd_buildings
.The mismatch probably results in the process of determining the cts demand share per building. Its is derived from the number of amenities within a census cell. If multiple amenities are tagged to a building which exceeds a census cell, there are edge cases in which not all amenities are assigned to the same mvgd.
A building however can not get demand from different mvgd by logic as well as by our methodology. This is a problem taken care of here. All amenities tagged to a building need to be of the mvgd, if not the ones lower in number per mvgd are dropped. These cells are compensated for with synthetic buildings.
Apparently there are edge cases in which the mvgd chosen is not the one containing the centroid of the building. This leads to an duplicated key error during the heat pump desaggregation.
To fix this, I propose to simply update the
zensus_population_id
inopenstreetmap.egon_cts_buildings
here