| | |
| | | <system.web> |
| | | <compilation debug="true" targetFramework="4.5.2"/> |
| | | <!-- maxRequestLength是上传文件时最大size(单位是KB,默认值是4096kb),executionTimeout是请求session(单位是秒,默认值是110s) --> |
| | | <httpRuntime maxRequestLength="2147483647" executionTimeout="14400"/> |
| | | <httpRuntime maxRequestLength="2147483647" executionTimeout="8640000"/> |
| | | <pages controlRenderingCompatibilityVersion="4.0"/> |
| | | </system.web> |
| | | <system.webServer> |
| | |
| | | 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; |
| | | } |
| | | |
| | |
| | | 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; |
| | | } |
| | | |
| | |
| | | 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; |
| | | } |
| | | |
| | |
| | | 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; |
| | | } |
| | | |
| | |
| | | |
| | | 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); |
| | |
| | | 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); |
| | |
| | | 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); |
| | |
| | | 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); |
| | |
| | | <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) { |
| | |
| | | |
| | | // 测试切图 |
| | | 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) { |
| | |
| | | }); |
| | | } |
| | | |
| | | // 测试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) { |
| | |
| | | |
| | | // 测试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); |