From e6555dde4f10cf34fe393d80f438b5ac2bb0a2d9 Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期四, 03 八月 2023 21:15:47 +0800 Subject: [PATCH] 1 --- ExportMap/cs/XYZUtils.cs | 4 ++-- ExportMap/cs/OsgbUtils.cs | 1 + ExportMap/cs/TerraUtils.cs | 7 +++++-- ExportMap/cs/LasUtils.cs | 3 ++- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ExportMap/cs/LasUtils.cs b/ExportMap/cs/LasUtils.cs index 7f3a4f5..62d0733 100644 --- a/ExportMap/cs/LasUtils.cs +++ b/ExportMap/cs/LasUtils.cs @@ -57,7 +57,8 @@ int idx = args.ids.IndexOf(meta.id); string cmd = string.Format("{0}\\gocesiumtiler.exe -i \"{1}\" -o \"{2}\" -e {3} -z {4} -g -s", tilerPath, lasPath, outPath, args.srids[idx], args.zs[idx]); - err = Tools.ExecCmd(null, cmd, false); + SysTask task = TaskDBHelper.CreateTask(args, meta, "LAS", "鐐逛簯鏁版嵁(LAS)"); + err = Tools.ExecCmd(task, cmd, false); string jsonFile = findTileset(meta, outPath); if ("laz" == meta.type && File.Exists(lasPath)) File.Delete(lasPath); diff --git a/ExportMap/cs/OsgbUtils.cs b/ExportMap/cs/OsgbUtils.cs index 07d3e91..8b8c6d3 100644 --- a/ExportMap/cs/OsgbUtils.cs +++ b/ExportMap/cs/OsgbUtils.cs @@ -61,6 +61,7 @@ int idx = args.ids.IndexOf(meta.id); string cmd = string.Format("{0}\\3dtile.exe -f osgb -i \"{1}\" -o \"{2}\" -c \"{{\\\"offset\\\": {3}}}\"", d3tilesPath, osgbPath, outPath, args.zs[idx]); + SysTask task = TaskDBHelper.CreateTask(args, meta, "OSGB", "鍊炬枩鏁版嵁(OSGB)"); err = Tools.ExecCmd(null, cmd, false); err = null; diff --git a/ExportMap/cs/TerraUtils.cs b/ExportMap/cs/TerraUtils.cs index 46fef82..2cc72af 100644 --- a/ExportMap/cs/TerraUtils.cs +++ b/ExportMap/cs/TerraUtils.cs @@ -174,7 +174,9 @@ } string cmd = string.Format("python \"{0}\" -qgz {1} -file \"{2}\" -out \"{3}\"", PyFile, Qgz, txtFile, tifFile); - err = Tools.ExecCmd(null, cmd, true); + SysTask task = TaskDBHelper.CreateTask(args, "DEM", "楂樼▼闀跺祵(DEM)"); + err = Tools.ExecCmd(task, cmd, true); + if (null == task || task.status != 2) return string.Empty; return tifFile; } @@ -260,7 +262,8 @@ string createLayer = string.Format("{0}\\ctb-tile.exe -l -s {4} -o \"{1}\" -f Mesh \"{2}\\{3}.tif\"", ctbPath, dirPath, dirPath, args.dircode, maxLevel); List<string> list = new List<string>() { gdal_data, createMesh, createLayer }; - err = Tools.ExecCmd(null, list); + SysTask task = TaskDBHelper.CreateTask(args, "DEM", "楂樼▼鏁版嵁(DEM)"); + err = Tools.ExecCmd(task, list); } /// <summary> diff --git a/ExportMap/cs/XYZUtils.cs b/ExportMap/cs/XYZUtils.cs index e6af0c3..0014918 100644 --- a/ExportMap/cs/XYZUtils.cs +++ b/ExportMap/cs/XYZUtils.cs @@ -94,8 +94,8 @@ WriteText(tifFile, list); string cmd = string.Format("python \"{0}\" -qgz {1} -file \"{2}\" -out \"{3}\" -min {4} -max {5} -noData {6}", PyFile, Qgz, tifFile, xyzPath, args.min, args.max, args.noData); - - err = Tools.ExecCmd(null, cmd, true); + SysTask task = TaskDBHelper.CreateTask(args, "DOM", "褰卞儚鏁版嵁(DOM)"); + err = Tools.ExecCmd(task, cmd, true); //if (File.Exists(batFile)) File.Delete(batFile); if (File.Exists(tifFile)) File.Delete(tifFile); -- Gitblit v1.9.3