管道基础大数据平台系统开发-【CS】-ExportMap
1
13693261870
2023-07-24 15748d6b16b43f0d3570ee8956189d5e6ff64db7
1
已修改1个文件
13 ■■■■ 文件已修改
ExportMap/cs/TerraUtils.cs 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ExportMap/cs/TerraUtils.cs
@@ -95,17 +95,17 @@
                if (null == metas || metas.Count == 0) return null;
                string dirPath = GetTerrainPath(args.dircode);
                if (Directory.Exists(dirPath)) Tools.DelPath(dirPath);
                //if (Directory.Exists(dirPath)) Tools.DelPath(dirPath); // 已存在的,删除
                tifFile = Merge(metas, args, ref err);
                if (!File.Exists(tifFile)) return null;
                string json = Path.Combine(dirPath, "layer.json");
                if (File.Exists(json)) File.Delete(json);
                //Generate(args, tifFile, ref err);
                CreateTerrain(args, tifFile, ref err);
                string json = Path.Combine(dirPath, "layer.json");
                if (!File.Exists(json)) return null;
                Complement(args);
                List<int> ids = new List<int>();
@@ -205,7 +205,7 @@
            string dirPath = GetTerrainPath(args.dircode);
            string gdal_data = string.Format("set GDAL_DATA={0}\\data", ctbPath);
            string createMesh = string.Format("{0}\\ctb-tile.exe -o \"{1}\" -f Mesh \"{2}\\{3}.tif\"", ctbPath, dirPath, dirPath, args.dircode);
            string createMesh = string.Format("{0}\\ctb-tile.exe -R -C -o \"{1}\" -f Mesh \"{2}\\{3}.tif\"", ctbPath, dirPath, dirPath, args.dircode);
            string createLayer = string.Format("{0}\\ctb-tile.exe -l -o \"{1}\" -f Mesh \"{2}\\{3}.tif\"", ctbPath, dirPath, dirPath, args.dircode);
            List<string> list = new List<string>() { gdal_data, createMesh, createLayer };
@@ -224,14 +224,13 @@
            string p_0_1 = Path.Combine(dirPath, "0", "1");
            if (!Directory.Exists(p_0_1)) Directory.CreateDirectory(p_0_1);
            string s_0_0_0 = Path.Combine(SGUtils.LFData, "dem", "0", "0", "0.terrain");
            string d_0_0_0 = Path.Combine(dirPath, "0", "0", "0.terrain");
            File.Copy(s_0_0_0, d_0_0_0, true);
            if (!File.Exists(d_0_0_0)) File.Copy(s_0_0_0, d_0_0_0, true);
            string s_0_1_0 = Path.Combine(SGUtils.LFData, "dem", "0", "1", "0.terrain");
            string d_0_1_0 = Path.Combine(dirPath, "0", "1", "0.terrain");
            File.Copy(s_0_1_0, d_0_1_0, true);
            if (!File.Exists(d_0_1_0)) File.Copy(s_0_1_0, d_0_1_0, true);
            string layerJson = Path.Combine(dirPath, "layer.json");
            string[] lines = File.ReadAllLines(layerJson, Encoding.UTF8);