管道基础大数据平台系统开发-【CS】-ExportMap
1
13693261870
2023-08-02 9269e5fbb8145742c38d0ce8f67a9dc5853142cb
1
已修改9个文件
28 ■■■■ 文件已修改
ExportMap/Web.config 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ExportMap/cs/ConvertUtils.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ExportMap/cs/LasUtils.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ExportMap/cs/OsgbUtils.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ExportMap/cs/SGUtils.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ExportMap/cs/TerraUtils.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ExportMap/cs/XYZUtils.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ExportMap/db/PubDBHelper.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ExportMap/export.html 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ExportMap/Web.config
@@ -35,7 +35,7 @@
  <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>
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;
            }
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;
            }
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;
            }
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;
            }
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);
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);
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);
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);