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