From 4d7c8b075ac8924ccf9a644e6e1bb3859c49aa32 Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期四, 22 六月 2023 10:15:30 +0800 Subject: [PATCH] 1 --- ExportMap/cs/LasUtils.cs | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/ExportMap/cs/LasUtils.cs b/ExportMap/cs/LasUtils.cs index 7a8d3c3..19f0890 100644 --- a/ExportMap/cs/LasUtils.cs +++ b/ExportMap/cs/LasUtils.cs @@ -53,11 +53,13 @@ if (Directory.Exists(outPath)) Tools.DelPath(outPath); if (!Directory.Exists(outPath)) Directory.CreateDirectory(outPath); + if ("laz" == meta.type) lasPath = toLas(lasPath, Path.Combine(outPath, meta.id + ".las")); string cmd = string.Format("{0}\\gocesiumtiler.exe -i \"{1}\" -o \"{2}\" -e {3} -z {4} -g -s", tilerPath, lasPath, outPath, args.srid, args.z); err = Tools.ExecCmd(cmd, false, false); string jsonFile = findTileset(outPath); + if ("laz" == meta.type && File.Exists(lasPath)) File.Delete(lasPath); if (File.Exists(jsonFile)) { string path = jsonFile.Replace(Tools.GetSetting("lfData") + "\\", ""); @@ -77,6 +79,20 @@ } /// <summary> + /// laz 杞崲涓� las + /// </summary> + private static string toLas(string lazPath, string outPath) + { + string lasPath = outPath.Replace("laz", "laz"); + string tilerPath = Tools.GetSetting("tilerPath"); + + string cmd = string.Format("{0}\\laszip64.exe -i \"{1}\" -o \"{2}\"", tilerPath, lazPath, lasPath); + Tools.ExecCmd(cmd, false, false); + + return lasPath; + } + + /// <summary> /// 鏌ユ壘tileset.json /// </summary> private static string findTileset(string path) -- Gitblit v1.9.3