|
|
|
@ -213,7 +213,9 @@ def handleOutput(lon: float, lat: float, index: int):
|
|
|
|
|
data = data.replace(
|
|
|
|
|
"</head>",
|
|
|
|
|
"<style>html, body{width: 100%;height: 100%;margin:0px;}</style>\n</head>",
|
|
|
|
|
)
|
|
|
|
|
).replace(
|
|
|
|
|
"https://assets.pyecharts.org/assets/v5/echarts.min.js", "echarts.min.js").replace(
|
|
|
|
|
"https://assets.pyecharts.org/assets/v5/maps/world.js","world.js")
|
|
|
|
|
with open(f"output/{index}_scatter_chart.html", "w", encoding="utf-8") as file:
|
|
|
|
|
file.write(data)
|
|
|
|
|
|
|
|
|
@ -286,7 +288,9 @@ def renderReflectance(pointList: list, valueList: list):
|
|
|
|
|
data = data.replace(
|
|
|
|
|
"</head>",
|
|
|
|
|
"<style>html, body{width: 100%;height: 100%;margin:0px;}</style>\n</head>",
|
|
|
|
|
)
|
|
|
|
|
).replace(
|
|
|
|
|
"https://assets.pyecharts.org/assets/v5/echarts.min.js", "echarts.min.js").replace(
|
|
|
|
|
"https://assets.pyecharts.org/assets/v5/maps/world.js","world.js")
|
|
|
|
|
with open(htmlFilePath, "w", encoding="utf-8") as file:
|
|
|
|
|
file.write(data)
|
|
|
|
|
pass
|
|
|
|
@ -513,6 +517,12 @@ def main():
|
|
|
|
|
globalUtils.rmPath(projectOutputDir)
|
|
|
|
|
# 将结果拷贝到目的目录
|
|
|
|
|
shutil.copytree("output", projectOutputDir)
|
|
|
|
|
|
|
|
|
|
# 将2个js文件拷贝到output目录下
|
|
|
|
|
echartjsFilePath = "../../resources/echarts.min.js"
|
|
|
|
|
worldjsFilePath = "../../resources/world.js"
|
|
|
|
|
shutil.copy(echartjsFilePath, os.path.join(projectOutputDir, os.path.basename(echartjsFilePath)))
|
|
|
|
|
shutil.copy(worldjsFilePath, os.path.join(projectOutputDir, os.path.basename(worldjsFilePath)))
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|