管道基础大数据平台系统开发-【CS】-ExportMap
1
13693261870
2023-07-17 11dd7f1b1c7288ed8aefae60e9c43647c61ce4af
1
已修改6个文件
21 ■■■■■ 文件已修改
ExportMap/Controllers/ConvertController.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ExportMap/Models/XYZArgs.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ExportMap/Web.config 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ExportMap/cs/LasUtils.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ExportMap/cs/OsgbUtils.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ExportMap/export.html 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ExportMap/Controllers/ConvertController.cs
@@ -144,6 +144,7 @@
                if (null != msg) return msg;
                if (args.srids.Count != args.ids.Count) return ResponseMsg<string>.fail("坐标系ID集合与元数据ID集合长度不一致");
                if (args.zs.Count != args.ids.Count) return ResponseMsg<string>.fail("高度偏移量集合与元数据ID集合长度不一致");
                string err = null;
                List<int> rs = LasUtils.Generate(args, ref err);
@@ -172,6 +173,8 @@
                ResponseMsg<string> msg = checkArgs(args);
                if (null != msg) return msg;
                if (args.zs.Count != args.ids.Count) return ResponseMsg<string>.fail("高度偏移量集合与元数据ID集合长度不一致");
                string err = null;
                List<int> rs = OsgbUtils.Generate(args, ref err);
                if (null == rs || rs.Count == 0)
ExportMap/Models/XYZArgs.cs
@@ -13,6 +13,7 @@
        public XYZArgs()
        {
            srids = new List<int>();
            zs = new List<double>();
            ids = new List<int>();
            isNew = true;
        }
@@ -80,6 +81,6 @@
        /// <summary>
        /// 高度偏移量
        /// </summary>
        public double z { set; get; }
        public List<double> zs { set; get; }
    }
}
ExportMap/Web.config
@@ -21,8 +21,8 @@
    <!-- Mpt路径 -->
    <add key="mpt" value="D:\LF\data\mpt\tb.mpt" />
    <!-- PG连接 -->
    <add key="pgConn" value="Server=127.0.0.1;Port=5433;Database=langfang;User Id=postgres;Password=postgres;"/>
    <!--<add key="pgConn" value="Server=192.168.20.205;Port=5433;Database=langfang;User Id=postgres;Password=Postgres!_14_Lf;"/>-->
    <!--<add key="pgConn" value="Server=127.0.0.1;Port=5433;Database=langfang;User Id=postgres;Password=postgres;"/>-->
    <add key="pgConn" value="Server=192.168.20.205;Port=5433;Database=langfang;User Id=postgres;Password=Postgres!_14_Lf;"/>
    <!--<add key="pgConn" value="Server=103.85.165.99;Port=5433;Database=langfang;User Id=postgres;Password=Postgres!_14_Lf;"/>-->
    <add key="webpages:Version" value="3.0.0.0"/>
    <add key="webpages:Enabled" value="false"/>
ExportMap/cs/LasUtils.cs
@@ -56,7 +56,7 @@
                    if ("laz" == meta.type) lasPath = toLas(lasPath, Path.Combine(outPath, meta.id + ".las"));
                    int idx = args.ids.IndexOf(meta.id);
                    string cmd = string.Format("{0}\\gocesiumtiler.exe -i \"{1}\" -o \"{2}\" -e {3} -z {4} -g -s", tilerPath, lasPath, outPath, args.srids[idx], args.z);
                    string cmd = string.Format("{0}\\gocesiumtiler.exe -i \"{1}\" -o \"{2}\" -e {3} -z {4} -g -s", tilerPath, lasPath, outPath, args.srids[idx], args.zs[idx]);
                    err = Tools.ExecCmd(cmd, false, false);
                    string jsonFile = findTileset(meta, outPath);
ExportMap/cs/OsgbUtils.cs
@@ -59,7 +59,8 @@
                    string srs = findSRS(osgbPath);
                    if (null != srs) writeSRS(osgbPath, getSRS(srs));
                    string cmd = string.Format("{0}\\3dtile.exe -f osgb -i \"{1}\" -o \"{2}\" -c \"{{\\\"offset\\\": {3}}}\"", d3tilesPath, osgbPath, outPath, args.z);
                    int idx = args.ids.IndexOf(meta.id);
                    string cmd = string.Format("{0}\\3dtile.exe -f osgb -i \"{1}\" -o \"{2}\" -c \"{{\\\"offset\\\": {3}}}\"", d3tilesPath, osgbPath, outPath, args.zs[idx]);
                    err = Tools.ExecCmd(cmd, false, false);
                    err = null;
ExportMap/export.html
@@ -136,7 +136,7 @@
    // 测试OSGB
    function toOsgb() {
      var data = { token: token, ids: [10290], depcode: "00", dircode: "0C", userId: 1, name: "3-1倾斜模型-中卫站" };
      var data = { token: token, ids: [10290], depcode: "00", dircode: "0C", userId: 1, name: "3-1倾斜模型-中卫站", zs: [0] };
      ajax("Convert/ToOsgb", "POST", JSON.stringify(data), null, null, function (rs) {
        alert("code = " + rs.code + ", msg = " + rs.msg + ", result = " + rs.result);
        console.log(rs);
@@ -145,7 +145,7 @@
    // 测试Las
    function toLas() {
      var data = { token: token, ids: [7188], depcode: "00", dircode: "0C", userId: 1, name: "HL_point_cloud_part_1.las", srid: 4548, z: 0 };
      var data = { token: token, ids: [7188], depcode: "00", dircode: "0C", userId: 1, name: "HL_point_cloud_part_1.las", srids: [4548], zs: [0] };
      ajax("Convert/ToLas", "POST", JSON.stringify(data), null, null, function (rs) {
        alert("code = " + rs.code + ", msg = " + rs.msg + ", result = " + rs.result);
        console.log(rs);
@@ -154,7 +154,7 @@
    // 测试Laz
    function toLaz(){
      var data = { token: token, ids: [10285], depcode: "00", dircode: "0C", userId: 1, name: "577.laz", srid: 4548, z: 0 };
      var data = { token: token, ids: [10285], depcode: "00", dircode: "0C", userId: 1, name: "577.laz", srids: [4548], zs: [0] };
      ajax("Convert/ToLas", "POST", JSON.stringify(data), null, null, function (rs) {
        alert("code = " + rs.code + ", msg = " + rs.msg + ", result = " + rs.result);
        console.log(rs);