| | |
| | | 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>(); |
| | |
| | | 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 }; |
| | |
| | | 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); |