| | |
| | | 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); |
| | | string jsonFile = findTileset(meta, outPath); |
| | | if ("laz" == meta.type && File.Exists(lasPath)) File.Delete(lasPath); |
| | | if (File.Exists(jsonFile)) |
| | | { |
| | |
| | | { |
| | | 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); |
| | | |
| | |
| | | /// <summary> |
| | | /// 查找tileset.json |
| | | /// </summary> |
| | | private static string findTileset(string path) |
| | | private static string findTileset(SysMeta meta, string path) |
| | | { |
| | | PathRename(meta, path); |
| | | |
| | | DirectoryInfo di = new DirectoryInfo(path); |
| | | FileInfo[] fis = di.GetFiles("tileset.json", SearchOption.AllDirectories); |
| | | |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 路径重命名 |
| | | /// </summary> |
| | | private static void PathRename(SysMeta meta, string path) |
| | | { |
| | | try |
| | | { |
| | | string subPath = Path.Combine(path, meta.guid); |
| | | if (Directory.Exists(subPath)) |
| | | { |
| | | string newPath = Path.Combine(path, meta.id.ToString()); |
| | | Directory.Move(subPath, newPath); |
| | | } |
| | | } |
| | | catch |
| | | { |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 插入数据库 |
| | | /// </summary> |
| | | private static int InsertToDB(SysMeta meta, XYZArgs args, string path) |