| | |
| | | |
| | | 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") + "\\", ""); |
| | |
| | | } |
| | | |
| | | /// <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) |