fix(step14): 批量渲染文件名唯一性 + Colorbar 样式 + 2σ拉伸
This commit is contained in:
@ -122,9 +122,10 @@ class Step14GeoTIFFBatchThread(QThread):
|
||||
n = len(self.tif_paths)
|
||||
for i, tif_path in enumerate(self.tif_paths):
|
||||
self.progress.emit(i + 1, n)
|
||||
tif_name = Path(tif_path).stem
|
||||
output_png = str(Path(self.output_dir) / f"{tif_name}_map.png")
|
||||
self.log_message.emit(f"GeoTIFF 渲染 [{i + 1}/{n}] {tif_name}", "info")
|
||||
tif_stem = Path(tif_path).stem
|
||||
chinese_name = mapper._get_chinese_title(tif_stem)
|
||||
output_png = str(Path(self.output_dir) / f"{chinese_name}_专题图.png")
|
||||
self.log_message.emit(f"GeoTIFF 渲染 [{i + 1}/{n}] {tif_stem}", "info")
|
||||
try:
|
||||
mapper.visualize_raster(
|
||||
raster_tif_path=tif_path,
|
||||
@ -132,7 +133,6 @@ class Step14GeoTIFFBatchThread(QThread):
|
||||
boundary_shp_path=self.boundary_shp_path,
|
||||
nodata_value=-9999.0,
|
||||
figsize=(14, 10),
|
||||
title=f"水色指数专题图 - {tif_name}",
|
||||
alpha=0.9,
|
||||
)
|
||||
except Exception as vis_err:
|
||||
@ -762,8 +762,9 @@ class Step14Panel(QWidget):
|
||||
if not out_dir:
|
||||
out_dir = os.path.join(self._get_default_work_dir(), "14_visualization")
|
||||
os.makedirs(out_dir, exist_ok=True)
|
||||
tif_name = Path(geotiff_path).stem
|
||||
output_png = os.path.join(out_dir, f"{tif_name}_rendered.png")
|
||||
tif_stem = Path(geotiff_path).stem
|
||||
chinese_name = mapper._get_chinese_title(tif_stem)
|
||||
output_png = os.path.join(out_dir, f"{chinese_name}_专题图.png")
|
||||
|
||||
self.run_button.setEnabled(False)
|
||||
try:
|
||||
@ -775,7 +776,6 @@ class Step14Panel(QWidget):
|
||||
boundary_shp_path=boundary_shp_path if boundary_shp_path else None,
|
||||
nodata_value=-9999.0,
|
||||
figsize=(14, 10),
|
||||
title=f"水色指数专题图 - {tif_name}",
|
||||
alpha=0.9,
|
||||
)
|
||||
self.run_button.setEnabled(True)
|
||||
|
||||
Reference in New Issue
Block a user