| | |
| | | try |
| | | { |
| | | List<SysMeta> metas = XYZUtils.SelectMetas(args.ids, "and type in ('tif', 'tiff')"); |
| | | if (null == metas || metas.Count == 0) return null; |
| | | if (null == metas || metas.Count == 0) |
| | | { |
| | | LogOut.Info("TerraUtils:找不到元数据。"); |
| | | return null; |
| | | } |
| | | |
| | | string dirPath = GetTerrainPath(args.dircode); |
| | | //if (Directory.Exists(dirPath)) Tools.DelPath(dirPath); // 已存在的,删除 |
| | | |
| | | tifFile = Merge(metas, args, ref err); |
| | | if (!File.Exists(tifFile)) return null; |
| | | if (!File.Exists(tifFile)) |
| | | { |
| | | LogOut.Info("TerraUtils:找不到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); |
| | | |
| | | if (!File.Exists(json)) return null; |
| | | if (!File.Exists(json)) |
| | | { |
| | | LogOut.Info("TerraUtils:找不到layer.json文件。"); |
| | | return null; |
| | | } |
| | | Complement(args); |
| | | |
| | | List<int> ids = new List<int>(); |
| | |
| | | err = Tools.ExecCmd(task, cmd, true); |
| | | |
| | | task = TaskDBHelper.SelectById(task.id); |
| | | if (null == task || task.status != 2) return string.Empty; |
| | | if (null == task || task.status != 2) LogOut.Info("TerraUtils:任务为空或状态不为2。"); |
| | | |
| | | return tifFile; |
| | | } |