管道基础大数据平台系统开发-【CS】-ExportMap
1
13693261870
2023-05-18 119b68aa121591af4a43c6fc61012494624e686d
1
已修改4个文件
12 ■■■■ 文件已修改
ExportMap/Models/XYZArgs.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ExportMap/cs/ConvertUtils.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ExportMap/cs/TerraUtils.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ExportMap/cs/XYZUtils.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ExportMap/Models/XYZArgs.cs
@@ -13,6 +13,7 @@
        public XYZArgs()
        {
            ids = new List<int>();
            isNew = true;
        }
        /// <summary>
@@ -59,5 +60,10 @@
        /// 元数据ID集合
        /// </summary>
        public List<int> ids { set; get; }
        /// <summary>
        /// 是/否全新发布
        /// </summary>
        public bool isNew { set; get; }
    }
}
ExportMap/cs/ConvertUtils.cs
@@ -53,6 +53,7 @@
                string outPath = Path.Combine(tilesFolder, meta.type, meta.id.ToString());
                string jsonFile = Path.Combine(outPath, "tileset.json");
                if (args.isNew && Directory.Exists(outPath)) Tools.DelPath(outPath);
                if (!Directory.Exists(outPath)) Directory.CreateDirectory(outPath);
                if (File.Exists(jsonFile)) File.Delete(jsonFile);
ExportMap/cs/TerraUtils.cs
@@ -95,7 +95,7 @@
                if (null == metas || metas.Count == 0) return null;
                string dirPath = GetTerrainPath(args.dircode);
                if (Directory.Exists(dirPath)) Tools.DelPath(dirPath);
                if (args.isNew && Directory.Exists(dirPath)) Tools.DelPath(dirPath);
                tifFile = Merge(metas, args, ref err);
                if (!File.Exists(tifFile)) return null;
@@ -185,7 +185,7 @@
        }
        /// <summary>
        /// 生成高程切片
        /// 生成高程切片 *
        /// </summary>
        private static void Generate(XYZArgs args, string tifFile, ref string err)
        {
ExportMap/cs/XYZUtils.cs
@@ -88,6 +88,7 @@
            //string batFile = Path.Combine(BatPath, dateStr + ".bat");
            string tifFile = Path.Combine(Tools.TempDir, ExportUtil.DateStr + ".txt");
            string xyzPath = Path.Combine(SGUtils.LFData, "2d\\tiles", args.dircode);
            if (args.isNew && Directory.Exists(xyzPath)) Tools.DelPath(xyzPath);
            if (!Directory.Exists(xyzPath)) Directory.CreateDirectory(xyzPath);
            WriteText(tifFile, list);