feat: 市场出图改为按图层分步选择

未勾选生成的图层会跳过对应计算,也不会进入成果工程;导入页只列出仍需要的数据源。
This commit is contained in:
nixevol
2026-10-15 15:15:45 +08:00
parent 8ce1b78e58
commit e8c8218d11
11 changed files with 595 additions and 267 deletions
+9 -3
View File
@@ -69,12 +69,18 @@ def _write_sheet(workbook, title, gpkg_path, table_name, columns, widths):
return sheet.max_row - 1
def create_result_xlsx(output_path, building_gpkg, aoi_gpkg):
def create_result_xlsx(output_path, building_gpkg=None, aoi_gpkg=None):
if not building_gpkg and not aoi_gpkg:
return None
from openpyxl import Workbook
workbook = Workbook()
workbook.remove(workbook.active)
building_count = _write_sheet(workbook, "移动C端采样点比例_楼宇", building_gpkg, "NRBuildingsData", BUILDING_COLUMNS, [16, 12, 12, 16, 16, 16, 16, 16])
aoi_count = _write_sheet(workbook, "移动C端采样点比例_AOI", aoi_gpkg, config.AOI_LAYER, AOI_COLUMNS, [16, 18, 40, 20, 20, 20, 20, 20])
building_count = 0
aoi_count = 0
if building_gpkg:
building_count = _write_sheet(workbook, "移动C端采样点比例_楼宇", building_gpkg, "NRBuildingsData", BUILDING_COLUMNS, [16, 12, 12, 16, 16, 16, 16, 16])
if aoi_gpkg:
aoi_count = _write_sheet(workbook, "移动C端采样点比例_AOI", aoi_gpkg, config.AOI_LAYER, AOI_COLUMNS, [16, 18, 40, 20, 20, 20, 20, 20])
output_path = Path(output_path)
output_path.parent.mkdir(parents=True, exist_ok=True)
workbook.save(output_path)