feat: 按最大重叠面积匹配楼宇楼层和高度

This commit is contained in:
nixevol
2026-09-21 15:20:21 +08:00
parent 0e3fbd2a23
commit a0edcbae2e
5 changed files with 112 additions and 1 deletions
+3 -1
View File
@@ -169,11 +169,13 @@ class TaskIntegrationTest(unittest.TestCase):
values.update(mro_total_yd=100, rsrp_lt_neg105_yd=10, ssb_rsrp_dl=-115, mro_total_dl=0)
create_gpkg(self.root / "grid.gpkg", "grid", ','.join(f'"{f}" real' for f in fields),
[(1, a, [values[f] for f in fields]), (2, b, [values[f] for f in fields])])
create_gpkg(self.root / "buildings.gpkg", "BuildingInfo", '"name" text', [(1, a, ["建筑甲"]), (2, b, ["建筑乙"])])
create_gpkg(self.root / "buildings.gpkg", "BuildingInfo", '"name" text,"floor" integer,"height" real', [(1, a, ["建筑甲", 2, 7.8]), (2, b, ["建筑乙", 3, 11.7])])
create_gpkg(self.root / "nr.gpkg", "NRBuildingsData", '"building_id" text', [(1, a, ["A"]), (2, b, ["B"])])
create_gpkg(self.root / "aoi.gpkg", config.AOI_LAYER,
'"所属市场网格" text,"AOI唯一标签" text,"AOI名称" text',
[(1, a, ["甲", "a", "甲AOI"]), (2, b, ["乙", "b", "乙AOI"])])
params = {"MARKET_GPKG": str(self.root / "markets.gpkg"), "GRID_5G_GPKG": str(self.root / "grid.gpkg"),
"NR_BUILDINGS_DATA_GPKG": str(self.root / "nr.gpkg"),
"BUILDING_INFO_GPKG": str(self.root / "buildings.gpkg"), "AOI_GPKG": str(self.root / "aoi.gpkg"),
"GIS_PROJECT_SOURCE": str(tasks.ROOT / "source/GIS.qgz"), "MAX_WORKERS": 2,
"SCALE": 1, "MAX_RASTER_PIXELS": 64, "SUMMARY_MAX_RASTER_PIXELS": 64,