管道基础大数据平台系统开发-【CS】-ExportMap
1
13693261870
2023-03-17 63bcaa5681202a34c3cc4b40e32ef91b2ba06aec
1
已修改3个文件
40 ■■■■ 文件已修改
ExportMap/cs/ConvertUtils.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ExportMap/cs/SGUtils.cs 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ExportMap/cs/XYZUtils.cs 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ExportMap/cs/ConvertUtils.cs
@@ -24,6 +24,14 @@
        public static string RoamerExe = "\"C:\\Program Files\\Autodesk\\Navisworks Manage 2020\\Roamer.exe\"";
        /// <summary>
        /// 获取发布地址
        /// </summary>
        public static string GetReleaseUrl(SysMeta meta)
        {
            return "http://{host}/LFData/3d/3dtiles/" + meta.type + "/" + meta.id + "/tileset.json";
        }
        /// <summary>
        /// 模型转换
        /// </summary>
        public static int Convert(List<int> ids)
ExportMap/cs/SGUtils.cs
@@ -59,6 +59,22 @@
        }
        /// <summary>
        /// 获取发布地址
        /// </summary>
        public static string GetReleaseUrl(SysMeta meta, Int64 sgsID)
        {
            return "http://{host}/LFData/3d/3dtiles/" + meta.type + "/" + meta.id + "/tileset.json";
            switch (meta.type)
            {
                case "mpt":
                    return "http://{host}/SG/Imagery;" + sgsID + ".mpt";
                case "3dml":
                    return "http://{host}/SG/b3dm/" + sgsID + "/tileset.json";
            }
        }
        /// <summary>
        /// 发布数据
        /// </summary>
        /// <param name="args">XYZ参数</param>
@@ -187,10 +203,7 @@
            string d3ml = Path.Combine(uploadFolder, meta.path);
            string targetD3ml = Path.Combine(d3mlFolder, meta.id.ToString(), meta.name);
            if (!File.Exists(targetD3ml))
            {
                list.Add(string.Format("mklink \"{0}\" \"{1}\"", targetD3ml, d3ml)); // /H
            }
            if (!File.Exists(targetD3ml)) list.Add(string.Format("mklink \"{0}\" \"{1}\"", targetD3ml, d3ml)); // /H
        }
        /// <summary>
ExportMap/cs/XYZUtils.cs
@@ -43,6 +43,14 @@
        }
        /// <summary>
        /// 获取发布地址
        /// </summary>
        public static string GetReleaseUrl(XYZArgs args)
        {
            return "http://{host}/LFData/2d/tiles/" + args.dircode + "/{z}/{x}/{y}.png";
        }
        /// <summary>
        /// 生成
        /// </summary>
        /// <param name="args">XYZ参数</param>
@@ -53,9 +61,8 @@
            List<SysMeta> list = selectMetas(args.ids, "and type in ('tif', 'tiff', 'img')");
            if (null == list || list.Count == 0) return 0;
            int id = list[0].id;
            string tifFile = Path.Combine(Tool.TempDir, ExportUtil.DateStr + ".txt");
            string xyzPath = Path.Combine(SGUtils.LFData, "2d\\tiles", id.ToString());
            string xyzPath = Path.Combine(SGUtils.LFData, "2d\\tiles", args.dircode);
            if (!Directory.Exists(xyzPath)) Directory.CreateDirectory(xyzPath);
            WriteText(tifFile, list);