feat: 输出市场网格结果压缩包
This commit is contained in:
@@ -49,3 +49,4 @@
|
|||||||
- `source/BuildingInfo.gpkg` 的图层 `srs_id` 为 `100000`(CRS84,经纬度坐标值可与市场网格相交判断),因此 `BUILDING_INFO_ALLOWED_SRS_IDS` 默认允许 `(4326, 100000)`。
|
- `source/BuildingInfo.gpkg` 的图层 `srs_id` 为 `100000`(CRS84,经纬度坐标值可与市场网格相交判断),因此 `BUILDING_INFO_ALLOWED_SRS_IDS` 默认允许 `(4326, 100000)`。
|
||||||
- 当前测试市场 `JM010404` 已生成 `BuildingInfo.gpkg`,包含 9495 个建筑要素,RTree 和 `gpkg_ogr_contents.feature_count` 均为 9495;`layer_styles.styleQML` 与 `gpkg_metadata.metadata` 已验证与源文件完全一致。
|
- 当前测试市场 `JM010404` 已生成 `BuildingInfo.gpkg`,包含 9495 个建筑要素,RTree 和 `gpkg_ogr_contents.feature_count` 均为 9495;`layer_styles.styleQML` 与 `gpkg_metadata.metadata` 已验证与源文件完全一致。
|
||||||
- 每个市场网格输出目录会额外复制 `source/MapPark/GIS.qgz` 为 `GIS.qgz`,复制过程不修改 QGIS 项目文件;当前测试市场 `JM010404` 已通过 SHA256 对比确认输出文件与源文件一致。
|
- 每个市场网格输出目录会额外复制 `source/MapPark/GIS.qgz` 为 `GIS.qgz`,复制过程不修改 QGIS 项目文件;当前测试市场 `JM010404` 已通过 SHA256 对比确认输出文件与源文件一致。
|
||||||
|
- 市场网格结果改为 zip 包输出:`python main.py` 会先在系统临时目录生成结果,再写入 `output/JMXXXX.zip`,zip 根目录直接包含 `GIS.qgz`、`信号.tif`、`用户量.tif`、`信号差用户量.tif`、`BuildingInfo.gpkg`,不再保留 `output/JMXXXX/` 文件夹。
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ import math
|
|||||||
import re
|
import re
|
||||||
import shutil
|
import shutil
|
||||||
import sqlite3
|
import sqlite3
|
||||||
|
import tempfile
|
||||||
|
import zipfile
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
@@ -15,23 +17,23 @@ from shapely.prepared import prep
|
|||||||
|
|
||||||
|
|
||||||
DEFAULT_SOURCE_DIR = Path("source") # 源数据目录,存放 MarketMap.gpkg、grid.gpkg 等输入文件。
|
DEFAULT_SOURCE_DIR = Path("source") # 源数据目录,存放 MarketMap.gpkg、grid.gpkg 等输入文件。
|
||||||
OUTPUT_DIR = Path("output") # 输出根目录,每个市场网格会在这里生成一个 JMXXXX 文件夹。
|
OUTPUT_DIR = Path("output") # 输出根目录,每个市场网格会在这里生成一个 JMXXXX.zip 结果包。
|
||||||
MARKET_GPKG = DEFAULT_SOURCE_DIR / "MarketMap.gpkg" # 市场网格 GeoPackage 文件路径。
|
MARKET_GPKG = DEFAULT_SOURCE_DIR / "MarketMap.gpkg" # 市场网格 GeoPackage 文件路径。
|
||||||
GRID_GPKG = DEFAULT_SOURCE_DIR / "grid.gpkg" # Grid 栅格指标 GeoPackage 文件路径。
|
GRID_GPKG = DEFAULT_SOURCE_DIR / "grid.gpkg" # Grid 栅格指标 GeoPackage 文件路径。
|
||||||
BUILDING_INFO_GPKG = DEFAULT_SOURCE_DIR / "BuildingInfo.gpkg" # 建筑信息 GeoPackage 文件路径,拆分时保留原始图层和 QGIS 样式。
|
BUILDING_INFO_GPKG = DEFAULT_SOURCE_DIR / "BuildingInfo.gpkg" # 建筑信息 GeoPackage 文件路径,拆分时保留原始图层和 QGIS 样式。
|
||||||
MAP_PARK_DIR = DEFAULT_SOURCE_DIR / "MapPark" # QGIS 项目模板目录,里面的 GIS.qgz 会复制到每个市场网格输出目录。
|
MAP_PARK_DIR = DEFAULT_SOURCE_DIR / "MapPark" # QGIS 项目模板目录,里面的 GIS.qgz 会复制到每个市场网格结果包。
|
||||||
GIS_PROJECT_SOURCE = MAP_PARK_DIR / "GIS.qgz" # 每个市场网格目录要复制的 QGIS 项目文件来源。
|
GIS_PROJECT_SOURCE = MAP_PARK_DIR / "GIS.qgz" # 每个市场网格结果包要复制的 QGIS 项目文件来源。
|
||||||
RSRP_FIELD = "ssb_rsrp_dl" # 用于生成热力图的电信 RSRP 字段名。
|
RSRP_FIELD = "ssb_rsrp_dl" # 用于生成热力图的电信 RSRP 字段名。
|
||||||
EXCELLENT_CELL_FIELD = "mro_total_dl" # 用于生成用户量热力图的字段名,值越大越红。
|
EXCELLENT_CELL_FIELD = "mro_total_dl" # 用于生成用户量热力图的字段名,值越大越红。
|
||||||
WEAK_COVER_FIELD = "rsrp_lt_neg105_dl" # 用于生成信号差用户量热力图的字段名,值越大越红。
|
WEAK_COVER_FIELD = "rsrp_lt_neg105_dl" # 用于生成信号差用户量热力图的字段名,值越大越红。
|
||||||
MARKET_LAYER = None # 市场网格图层名;None 表示自动使用 GPKG 中第一个 feature 图层。
|
MARKET_LAYER = None # 市场网格图层名;None 表示自动使用 GPKG 中第一个 feature 图层。
|
||||||
GRID_LAYER = None # Grid 指标图层名;None 表示自动使用 GPKG 中第一个 feature 图层。
|
GRID_LAYER = None # Grid 指标图层名;None 表示自动使用 GPKG 中第一个 feature 图层。
|
||||||
BUILDING_INFO_LAYER = None # BuildingInfo 图层名;None 表示自动使用 GPKG 中第一个 feature 图层。
|
BUILDING_INFO_LAYER = None # BuildingInfo 图层名;None 表示自动使用 GPKG 中第一个 feature 图层。
|
||||||
MARKET_CODE_FIELD = "micro_grid" # 市场网格编码字段,用于输出文件夹名,例如 JM010404。
|
MARKET_CODE_FIELD = "micro_grid" # 市场网格编码字段,用于输出 zip 文件名,例如 JM010404.zip。
|
||||||
MARKET_NAME_FIELD = "micro_gr_1" # 市场网格名称字段,用于日志和汇总信息。
|
MARKET_NAME_FIELD = "micro_gr_1" # 市场网格名称字段,用于日志和汇总信息。
|
||||||
SIGNAL_OUTPUT_FILENAME = "信号.tif" # RSRP 连续热力图输出文件名。
|
SIGNAL_OUTPUT_FILENAME = "信号.tif" # RSRP 连续热力图输出文件名。
|
||||||
BUILDING_INFO_OUTPUT_FILENAME = "BuildingInfo.gpkg" # 每个市场网格目录内输出的建筑信息拆分文件名。
|
BUILDING_INFO_OUTPUT_FILENAME = "BuildingInfo.gpkg" # 每个市场网格结果包内输出的建筑信息拆分文件名。
|
||||||
GIS_PROJECT_OUTPUT_FILENAME = "GIS.qgz" # 每个市场网格目录内输出的 QGIS 项目文件名,内容不修改直接复制。
|
GIS_PROJECT_OUTPUT_FILENAME = "GIS.qgz" # 每个市场网格结果包内输出的 QGIS 项目文件名,内容不修改直接复制。
|
||||||
HEATMAP_GOOD_RSRP = -80.0 # 热力图绿色端阈值;RSRP 大于等于该值视为信号好。
|
HEATMAP_GOOD_RSRP = -80.0 # 热力图绿色端阈值;RSRP 大于等于该值视为信号好。
|
||||||
HEATMAP_MID_RSRP = -95.0 # 热力图黄色中间阈值。
|
HEATMAP_MID_RSRP = -95.0 # 热力图黄色中间阈值。
|
||||||
HEATMAP_BAD_RSRP = -110.0 # 热力图红色端阈值;RSRP 小于等于该值视为信号差。
|
HEATMAP_BAD_RSRP = -110.0 # 热力图红色端阈值;RSRP 小于等于该值视为信号差。
|
||||||
@@ -88,6 +90,10 @@ def market_output_dir(output_dir, market):
|
|||||||
return output_dir / safe_filename(market.code)
|
return output_dir / safe_filename(market.code)
|
||||||
|
|
||||||
|
|
||||||
|
def market_zip_output_path(output_dir, market):
|
||||||
|
return output_dir / f"{safe_filename(market.code)}.zip"
|
||||||
|
|
||||||
|
|
||||||
def heatmap_raster_filename(_field):
|
def heatmap_raster_filename(_field):
|
||||||
return SIGNAL_OUTPUT_FILENAME
|
return SIGNAL_OUTPUT_FILENAME
|
||||||
|
|
||||||
@@ -100,14 +106,6 @@ def weak_cover_heatmap_raster_filename(_field):
|
|||||||
return WEAK_COVER_OUTPUT_FILENAME
|
return WEAK_COVER_OUTPUT_FILENAME
|
||||||
|
|
||||||
|
|
||||||
def building_info_output_path(output_dir, market):
|
|
||||||
return market_output_dir(output_dir, market) / BUILDING_INFO_OUTPUT_FILENAME
|
|
||||||
|
|
||||||
|
|
||||||
def gis_project_output_path(output_dir, market):
|
|
||||||
return market_output_dir(output_dir, market) / GIS_PROJECT_OUTPUT_FILENAME
|
|
||||||
|
|
||||||
|
|
||||||
def copy_gis_project_to_market(source_path, output_path, market):
|
def copy_gis_project_to_market(source_path, output_path, market):
|
||||||
if output_path.exists() and not OVERWRITE:
|
if output_path.exists() and not OVERWRITE:
|
||||||
return {
|
return {
|
||||||
@@ -129,6 +127,66 @@ def copy_gis_project_to_market(source_path, output_path, market):
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def zip_member_reference(zip_path, member_path):
|
||||||
|
return f"{zip_path.as_posix()}/{member_path.as_posix()}"
|
||||||
|
|
||||||
|
|
||||||
|
def rewrite_result_for_zip(result, zip_path, workspace_dir):
|
||||||
|
rewritten = dict(result)
|
||||||
|
rewritten.pop("market_dir", None)
|
||||||
|
rewritten["zip_output"] = zip_path.as_posix()
|
||||||
|
|
||||||
|
output = rewritten.get("output")
|
||||||
|
if output:
|
||||||
|
output_path = Path(output)
|
||||||
|
try:
|
||||||
|
member_path = output_path.resolve().relative_to(workspace_dir.resolve())
|
||||||
|
except ValueError:
|
||||||
|
member_path = Path(output_path.name)
|
||||||
|
rewritten["output"] = zip_member_reference(zip_path, member_path)
|
||||||
|
return rewritten
|
||||||
|
|
||||||
|
|
||||||
|
def write_market_zip(workspace_dir, zip_path, market):
|
||||||
|
if zip_path.exists():
|
||||||
|
if not OVERWRITE:
|
||||||
|
return {
|
||||||
|
"market_code": market.code,
|
||||||
|
"market_name": market.name,
|
||||||
|
"output": zip_path.as_posix(),
|
||||||
|
"skipped": True,
|
||||||
|
}
|
||||||
|
zip_path.unlink()
|
||||||
|
|
||||||
|
entries = sorted(path for path in workspace_dir.rglob("*") if path.is_file())
|
||||||
|
with zipfile.ZipFile(zip_path, "w", compression=zipfile.ZIP_DEFLATED) as zip_file:
|
||||||
|
for path in entries:
|
||||||
|
zip_file.write(path, path.relative_to(workspace_dir).as_posix())
|
||||||
|
|
||||||
|
return {
|
||||||
|
"market_code": market.code,
|
||||||
|
"market_name": market.name,
|
||||||
|
"output": zip_path.as_posix(),
|
||||||
|
"entries": [path.relative_to(workspace_dir).as_posix() for path in entries],
|
||||||
|
"bytes": zip_path.stat().st_size,
|
||||||
|
"skipped": False,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def remove_legacy_market_dir(output_dir, market):
|
||||||
|
legacy_dir = market_output_dir(output_dir, market)
|
||||||
|
if not legacy_dir.exists() or not legacy_dir.is_dir():
|
||||||
|
return None
|
||||||
|
|
||||||
|
output_root = output_dir.resolve()
|
||||||
|
target = legacy_dir.resolve()
|
||||||
|
if output_root not in target.parents:
|
||||||
|
raise ValueError(f"拒绝删除输出目录之外的路径:{target}")
|
||||||
|
|
||||||
|
shutil.rmtree(target)
|
||||||
|
return legacy_dir
|
||||||
|
|
||||||
|
|
||||||
def gpkg_blob_to_wkb(blob):
|
def gpkg_blob_to_wkb(blob):
|
||||||
data = bytes(blob)
|
data = bytes(blob)
|
||||||
if data[:2] != b"GP":
|
if data[:2] != b"GP":
|
||||||
@@ -921,6 +979,7 @@ def main():
|
|||||||
weak_cover_heatmap_results = []
|
weak_cover_heatmap_results = []
|
||||||
building_info_results = []
|
building_info_results = []
|
||||||
gis_project_results = []
|
gis_project_results = []
|
||||||
|
zip_results = []
|
||||||
print(f"市场网格数量:{len(markets)}")
|
print(f"市场网格数量:{len(markets)}")
|
||||||
print(f"Grid 图层:{grid_layer.table_name}")
|
print(f"Grid 图层:{grid_layer.table_name}")
|
||||||
print(f"BuildingInfo 图层:{building_info_layer.table_name}")
|
print(f"BuildingInfo 图层:{building_info_layer.table_name}")
|
||||||
@@ -935,30 +994,28 @@ def main():
|
|||||||
print(f"信号差用户量热力图图例:{weak_cover_legend_path}")
|
print(f"信号差用户量热力图图例:{weak_cover_legend_path}")
|
||||||
|
|
||||||
for index, market in enumerate(markets, start=1):
|
for index, market in enumerate(markets, start=1):
|
||||||
market_dir = market_output_dir(OUTPUT_DIR, market)
|
zip_path = market_zip_output_path(OUTPUT_DIR, market)
|
||||||
market_dir.mkdir(parents=True, exist_ok=True)
|
if zip_path.exists() and not OVERWRITE:
|
||||||
gis_project_path = gis_project_output_path(OUTPUT_DIR, market)
|
print(f"[{index}/{len(markets)}] 跳过已存在结果包:{zip_path}")
|
||||||
gis_project_result = copy_gis_project_to_market(GIS_PROJECT_SOURCE, gis_project_path, market)
|
zip_results.append(
|
||||||
gis_project_result["market_dir"] = str(market_dir)
|
|
||||||
gis_project_results.append(gis_project_result)
|
|
||||||
if gis_project_result["skipped"]:
|
|
||||||
print(f"[{index}/{len(markets)}] 跳过已存在 QGIS 项目:{market.code}/{gis_project_path.name}")
|
|
||||||
else:
|
|
||||||
print(f"[{index}/{len(markets)}] 复制 QGIS 项目:{market.code}/{gis_project_path.name}")
|
|
||||||
|
|
||||||
heatmap_path = market_dir / heatmap_raster_filename(RSRP_FIELD)
|
|
||||||
if heatmap_path.exists() and not OVERWRITE:
|
|
||||||
print(f"[{index}/{len(markets)}] 跳过已存在热力图:{market.code}/{heatmap_path.name}")
|
|
||||||
heatmap_results.append(
|
|
||||||
{
|
{
|
||||||
"market_code": market.code,
|
"market_code": market.code,
|
||||||
"market_name": market.name,
|
"market_name": market.name,
|
||||||
"market_dir": str(market_dir),
|
"output": zip_path.as_posix(),
|
||||||
"output": str(heatmap_path),
|
|
||||||
"skipped": True,
|
"skipped": True,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
else:
|
continue
|
||||||
|
|
||||||
|
with tempfile.TemporaryDirectory(prefix=f"{safe_filename(market.code)}_") as temp_dir:
|
||||||
|
market_dir = Path(temp_dir)
|
||||||
|
|
||||||
|
gis_project_path = market_dir / GIS_PROJECT_OUTPUT_FILENAME
|
||||||
|
gis_project_result = copy_gis_project_to_market(GIS_PROJECT_SOURCE, gis_project_path, market)
|
||||||
|
gis_project_results.append(rewrite_result_for_zip(gis_project_result, zip_path, market_dir))
|
||||||
|
print(f"[{index}/{len(markets)}] 复制 QGIS 项目:{market.code}/{gis_project_path.name}")
|
||||||
|
|
||||||
|
heatmap_path = market_dir / heatmap_raster_filename(RSRP_FIELD)
|
||||||
print(f"[{index}/{len(markets)}] 导出热力图:{market.code} {market.name}")
|
print(f"[{index}/{len(markets)}] 导出热力图:{market.code} {market.name}")
|
||||||
heatmap_result = export_market_heatmap_tif(
|
heatmap_result = export_market_heatmap_tif(
|
||||||
grid_conn,
|
grid_conn,
|
||||||
@@ -970,27 +1027,14 @@ def main():
|
|||||||
pixel_height,
|
pixel_height,
|
||||||
heatmap_path,
|
heatmap_path,
|
||||||
)
|
)
|
||||||
heatmap_result["market_dir"] = str(market_dir)
|
|
||||||
heatmap_result["skipped"] = False
|
heatmap_result["skipped"] = False
|
||||||
heatmap_results.append(heatmap_result)
|
heatmap_results.append(rewrite_result_for_zip(heatmap_result, zip_path, market_dir))
|
||||||
print(
|
print(
|
||||||
f" 热力图像素:{heatmap_result['width']}x{heatmap_result['height']},"
|
f" 热力图像素:{heatmap_result['width']}x{heatmap_result['height']},"
|
||||||
f"有效像素:{heatmap_result['data_pixels']}"
|
f"有效像素:{heatmap_result['data_pixels']}"
|
||||||
)
|
)
|
||||||
|
|
||||||
excellent_path = market_dir / excellent_heatmap_raster_filename(EXCELLENT_CELL_FIELD)
|
excellent_path = market_dir / excellent_heatmap_raster_filename(EXCELLENT_CELL_FIELD)
|
||||||
if excellent_path.exists() and not OVERWRITE:
|
|
||||||
print(f" 跳过已存在采样点热力图:{excellent_path.name}")
|
|
||||||
excellent_heatmap_results.append(
|
|
||||||
{
|
|
||||||
"market_code": market.code,
|
|
||||||
"market_name": market.name,
|
|
||||||
"market_dir": str(market_dir),
|
|
||||||
"output": str(excellent_path),
|
|
||||||
"skipped": True,
|
|
||||||
}
|
|
||||||
)
|
|
||||||
else:
|
|
||||||
print(f" 导出采样点热力图:{excellent_path.name}")
|
print(f" 导出采样点热力图:{excellent_path.name}")
|
||||||
excellent_result = export_market_excellent_heatmap_tif(
|
excellent_result = export_market_excellent_heatmap_tif(
|
||||||
grid_conn,
|
grid_conn,
|
||||||
@@ -1002,27 +1046,14 @@ def main():
|
|||||||
pixel_height,
|
pixel_height,
|
||||||
excellent_path,
|
excellent_path,
|
||||||
)
|
)
|
||||||
excellent_result["market_dir"] = str(market_dir)
|
|
||||||
excellent_result["skipped"] = False
|
excellent_result["skipped"] = False
|
||||||
excellent_heatmap_results.append(excellent_result)
|
excellent_heatmap_results.append(rewrite_result_for_zip(excellent_result, zip_path, market_dir))
|
||||||
print(
|
print(
|
||||||
f" 采样点热力图像素:{excellent_result['width']}x{excellent_result['height']},"
|
f" 采样点热力图像素:{excellent_result['width']}x{excellent_result['height']},"
|
||||||
f"阈值:{excellent_result['thresholds']}"
|
f"阈值:{excellent_result['thresholds']}"
|
||||||
)
|
)
|
||||||
|
|
||||||
weak_cover_path = market_dir / weak_cover_heatmap_raster_filename(WEAK_COVER_FIELD)
|
weak_cover_path = market_dir / weak_cover_heatmap_raster_filename(WEAK_COVER_FIELD)
|
||||||
if weak_cover_path.exists() and not OVERWRITE:
|
|
||||||
print(f" 跳过已存在信号差用户量热力图:{weak_cover_path.name}")
|
|
||||||
weak_cover_heatmap_results.append(
|
|
||||||
{
|
|
||||||
"market_code": market.code,
|
|
||||||
"market_name": market.name,
|
|
||||||
"market_dir": str(market_dir),
|
|
||||||
"output": str(weak_cover_path),
|
|
||||||
"skipped": True,
|
|
||||||
}
|
|
||||||
)
|
|
||||||
else:
|
|
||||||
print(f" 导出信号差用户量热力图:{weak_cover_path.name}")
|
print(f" 导出信号差用户量热力图:{weak_cover_path.name}")
|
||||||
weak_cover_result = export_market_excellent_heatmap_tif(
|
weak_cover_result = export_market_excellent_heatmap_tif(
|
||||||
grid_conn,
|
grid_conn,
|
||||||
@@ -1034,15 +1065,14 @@ def main():
|
|||||||
pixel_height,
|
pixel_height,
|
||||||
weak_cover_path,
|
weak_cover_path,
|
||||||
)
|
)
|
||||||
weak_cover_result["market_dir"] = str(market_dir)
|
|
||||||
weak_cover_result["skipped"] = False
|
weak_cover_result["skipped"] = False
|
||||||
weak_cover_heatmap_results.append(weak_cover_result)
|
weak_cover_heatmap_results.append(rewrite_result_for_zip(weak_cover_result, zip_path, market_dir))
|
||||||
print(
|
print(
|
||||||
f" 信号差用户量热力图像素:{weak_cover_result['width']}x{weak_cover_result['height']},"
|
f" 信号差用户量热力图像素:{weak_cover_result['width']}x{weak_cover_result['height']},"
|
||||||
f"阈值:{weak_cover_result['thresholds']}"
|
f"阈值:{weak_cover_result['thresholds']}"
|
||||||
)
|
)
|
||||||
|
|
||||||
building_info_path = building_info_output_path(OUTPUT_DIR, market)
|
building_info_path = market_dir / BUILDING_INFO_OUTPUT_FILENAME
|
||||||
print(f" 拆分 BuildingInfo:{building_info_path.name}")
|
print(f" 拆分 BuildingInfo:{building_info_path.name}")
|
||||||
building_info_result = export_market_building_info_gpkg(
|
building_info_result = export_market_building_info_gpkg(
|
||||||
building_info_conn,
|
building_info_conn,
|
||||||
@@ -1051,13 +1081,20 @@ def main():
|
|||||||
market,
|
market,
|
||||||
building_info_path,
|
building_info_path,
|
||||||
)
|
)
|
||||||
building_info_result["market_dir"] = str(market_dir)
|
building_info_result["skipped"] = False
|
||||||
building_info_results.append(building_info_result)
|
building_info_results.append(rewrite_result_for_zip(building_info_result, zip_path, market_dir))
|
||||||
print(
|
print(
|
||||||
f" BuildingInfo 要素:{building_info_result['feature_count']},"
|
f" BuildingInfo 要素:{building_info_result['feature_count']},"
|
||||||
f"候选:{building_info_result['candidates']}"
|
f"候选:{building_info_result['candidates']}"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
zip_result = write_market_zip(market_dir, zip_path, market)
|
||||||
|
removed_legacy_dir = remove_legacy_market_dir(OUTPUT_DIR, market)
|
||||||
|
if removed_legacy_dir:
|
||||||
|
zip_result["removed_legacy_dir"] = str(removed_legacy_dir)
|
||||||
|
zip_results.append(zip_result)
|
||||||
|
print(f" 结果包:{zip_path},文件数:{len(zip_result['entries'])}")
|
||||||
|
|
||||||
summary_path = OUTPUT_DIR / "summary.json"
|
summary_path = OUTPUT_DIR / "summary.json"
|
||||||
summary = {
|
summary = {
|
||||||
"market_gpkg": str(MARKET_GPKG),
|
"market_gpkg": str(MARKET_GPKG),
|
||||||
@@ -1076,6 +1113,7 @@ def main():
|
|||||||
"weak_cover_heatmap_results": weak_cover_heatmap_results,
|
"weak_cover_heatmap_results": weak_cover_heatmap_results,
|
||||||
"building_info_results": building_info_results,
|
"building_info_results": building_info_results,
|
||||||
"gis_project_results": gis_project_results,
|
"gis_project_results": gis_project_results,
|
||||||
|
"zip_results": zip_results,
|
||||||
}
|
}
|
||||||
summary_path.write_text(json.dumps(summary, ensure_ascii=False, indent=2), encoding="utf-8")
|
summary_path.write_text(json.dumps(summary, ensure_ascii=False, indent=2), encoding="utf-8")
|
||||||
print(f"汇总:{summary_path}")
|
print(f"汇总:{summary_path}")
|
||||||
|
|||||||
Reference in New Issue
Block a user