From 9269e5fbb8145742c38d0ce8f67a9dc5853142cb Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期三, 02 八月 2023 13:48:54 +0800 Subject: [PATCH] 1 --- ExportMap/cs/SGUtils.cs | 2 +- ExportMap/cs/XYZUtils.cs | 1 + ExportMap/cs/OsgbUtils.cs | 2 +- ExportMap/cs/ConvertUtils.cs | 2 +- ExportMap/cs/TerraUtils.cs | 5 +++-- ExportMap/export.html | 10 +++++----- ExportMap/Web.config | 2 +- ExportMap/db/PubDBHelper.cs | 2 +- ExportMap/cs/LasUtils.cs | 2 +- 9 files changed, 15 insertions(+), 13 deletions(-) diff --git a/ExportMap/Web.config b/ExportMap/Web.config index 3e79cc0..8f98cd6 100644 --- a/ExportMap/Web.config +++ b/ExportMap/Web.config @@ -35,7 +35,7 @@ <system.web> <compilation debug="true" targetFramework="4.5.2"/> <!-- maxRequestLength鏄笂浼犳枃浠舵椂鏈�澶ize(鍗曚綅鏄疜B,榛樿鍊兼槸4096kb)锛宔xecutionTimeout鏄姹俿ession(鍗曚綅鏄,榛樿鍊兼槸110s) --> - <httpRuntime maxRequestLength="2147483647" executionTimeout="14400"/> + <httpRuntime maxRequestLength="2147483647" executionTimeout="8640000"/> <pages controlRenderingCompatibilityVersion="4.0"/> </system.web> <system.webServer> diff --git a/ExportMap/cs/ConvertUtils.cs b/ExportMap/cs/ConvertUtils.cs index 821242f..659e93a 100644 --- a/ExportMap/cs/ConvertUtils.cs +++ b/ExportMap/cs/ConvertUtils.cs @@ -130,7 +130,7 @@ int pubid = PubDBHelper.GetPushlishId(meta.id); if (pubid > 0) { - PubDBHelper.UpdatePublish(pubid, args.name, args.userId, null); + PubDBHelper.UpdatePublish(pubid, meta.name, args.userId, null); return pubid; } diff --git a/ExportMap/cs/LasUtils.cs b/ExportMap/cs/LasUtils.cs index 2d9d823..d4e24cf 100644 --- a/ExportMap/cs/LasUtils.cs +++ b/ExportMap/cs/LasUtils.cs @@ -134,7 +134,7 @@ int pubid = PubDBHelper.GetPushlishId(meta.id); if (pubid > 0) { - PubDBHelper.UpdatePublish(pubid, args.name, args.userId, null); + PubDBHelper.UpdatePublish(pubid, meta.name, args.userId, null); return pubid; } diff --git a/ExportMap/cs/OsgbUtils.cs b/ExportMap/cs/OsgbUtils.cs index 7010994..403b9b4 100644 --- a/ExportMap/cs/OsgbUtils.cs +++ b/ExportMap/cs/OsgbUtils.cs @@ -146,7 +146,7 @@ int pubid = PubDBHelper.GetPushlishId(meta.id); if (pubid > 0) { - PubDBHelper.UpdatePublish(pubid, args.name, args.userId, null); + PubDBHelper.UpdatePublish(pubid, meta.name, args.userId, null); return pubid; } diff --git a/ExportMap/cs/SGUtils.cs b/ExportMap/cs/SGUtils.cs index 8a11d93..6eacd3f 100644 --- a/ExportMap/cs/SGUtils.cs +++ b/ExportMap/cs/SGUtils.cs @@ -209,7 +209,7 @@ int pubid = PubDBHelper.GetPushlishId(meta.id); if (pubid > 0) { - PubDBHelper.UpdatePublish(pubid, args.name, args.userId, null); + PubDBHelper.UpdatePublish(pubid, meta.name, args.userId, null); return pubid; } diff --git a/ExportMap/cs/TerraUtils.cs b/ExportMap/cs/TerraUtils.cs index 8e4f59d..bdc0014 100644 --- a/ExportMap/cs/TerraUtils.cs +++ b/ExportMap/cs/TerraUtils.cs @@ -214,8 +214,8 @@ string gdal_data = string.Format("set GDAL_DATA={0}\\data", ctbPath); // -N 椤剁偣娉曠嚎, -C 寮哄埗鍒涘缓缂哄け鏍圭摝鐗�, -R 涓嶈鐩栫幇鏈夋枃浠� - 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); + string createMesh = string.Format("{0}\\ctb-tile.exe -R -C -s 16 -o \"{1}\" -f Mesh \"{2}\\{3}.tif\"", ctbPath, dirPath, dirPath, args.dircode); + string createLayer = string.Format("{0}\\ctb-tile.exe -l -s 16 -o \"{1}\" -f Mesh \"{2}\\{3}.tif\"", ctbPath, dirPath, dirPath, args.dircode); List<string> list = new List<string>() { gdal_data, createMesh, createLayer }; err = Tools.ExecCmd(list); @@ -279,6 +279,7 @@ SysMeta meta = metas[0]; meta.type = "DEM"; meta.name = args.name; + meta.dircode = args.dircode; SysPublish sys = Tools.NewPublish(meta, args, GetReleaseUrl(args.dircode), "3d\\terrain\\" + args.dircode); sys.geom = GetPointZ(args); diff --git a/ExportMap/cs/XYZUtils.cs b/ExportMap/cs/XYZUtils.cs index 76c4d64..0ccf314 100644 --- a/ExportMap/cs/XYZUtils.cs +++ b/ExportMap/cs/XYZUtils.cs @@ -180,6 +180,7 @@ SysMeta meta = metas[0]; meta.type = "DOM"; meta.name = args.name; + meta.dircode = args.dircode; SysPublish sys = Tools.NewPublish(meta, args, GetReleaseUrl(args.dircode), path); sys.geom = GetPointZ(args); diff --git a/ExportMap/db/PubDBHelper.cs b/ExportMap/db/PubDBHelper.cs index 3cf8dea..b6a4ce3 100644 --- a/ExportMap/db/PubDBHelper.cs +++ b/ExportMap/db/PubDBHelper.cs @@ -112,7 +112,7 @@ public static int UpdatePublish(int pubid, string name, int userId, string geom) { string str = null == geom ? "" : string.Format(", geom={0}", geom); - string sql = string.Format("update lf.sys_publish set name=@name, create_time=now(), update_user=@userId, update_time=now(){0} where id=@id", str); + string sql = string.Format("update lf.sys_publish set name=@name, update_user=@userId, update_time=now(){0} where id=@id", str); DbParameter dp1 = new NpgsqlParameter("@name", name); DbParameter dp2 = new NpgsqlParameter("@userId", userId); diff --git a/ExportMap/export.html b/ExportMap/export.html index 533a9f3..7f814cd 100644 --- a/ExportMap/export.html +++ b/ExportMap/export.html @@ -10,7 +10,7 @@ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <script src="js/jquery.1.12.4.js"></script> <script> - var token = "dba75438-71f2-4a67-91ef-8919cd9b16cc"; + var token = "bc381c1e-83cb-4956-a1e4-a624b08225f1"; // Ajax function ajax(url, type, data, dataType, contentType, fn) { @@ -82,14 +82,14 @@ // 娴嬭瘯鍒囧浘 function convertXYZ() { - var data = { token: token, ids: [2919, 2920], id: 1, min: 8, max: 18, depcode: "000305", dircode: "0102", userId: 1, name: "DOM_0.2m" }; + var data = { token: token, ids: [1217], id: 1, min: 8, max: 18, depcode: "000305", dircode: "0102", userId: 1, name: "DOM_0.2m" }; ajax("Convert/ToTiles", "POST", JSON.stringify(data), null, null, function (rs) { alert("code = " + rs.code + ", msg = " + rs.msg + ", result = " + rs.result); console.log(rs); }); } - // 娴嬭瘯Rvt + // 娴嬭瘯Rvt * function convert1() { var data = { token: token, ids: [1521], depcode: "000305", dircode: "0102", userId: 1 }; ajax("Convert/ToTileset", "POST", JSON.stringify(data), null, null, function (rs) { @@ -98,7 +98,7 @@ }); } - // 娴嬭瘯Fbx + // 娴嬭瘯Fbx * function convert2() { var data = { token: token, ids: [1522], depcode: "000305", dircode: "0102", userId: 1 }; ajax("Convert/ToTileset", "POST", JSON.stringify(data), null, null, function (rs) { @@ -109,7 +109,7 @@ // 娴嬭瘯Ifc function convert3() { - var data = { token: token, ids: [6894], depcode: "000305", dircode: "0A040001010004", userId: 1 }; + var data = { token: token, ids: [7615], depcode: "000305", dircode: "0A040001010004", userId: 1 }; ajax("Convert/ToTileset", "POST", JSON.stringify(data), null, null, function (rs) { alert("code = " + rs.code + ", msg = " + rs.msg + ", result = " + rs.result); console.log(rs); -- Gitblit v1.9.3