| | |
| | | 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); |
| | |
| | | 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) |
| | |
| | | public XYZArgs() |
| | | { |
| | | srids = new List<int>(); |
| | | zs = new List<double>(); |
| | | ids = new List<int>(); |
| | | isNew = true; |
| | | } |
| | |
| | | /// <summary> |
| | | /// 高度偏移量 |
| | | /// </summary> |
| | | public double z { set; get; } |
| | | public List<double> zs { set; get; } |
| | | } |
| | | } |
| | |
| | | <!-- 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"/> |
| | |
| | | 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); |
| | |
| | | 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; |
| | | |
| | |
| | | |
| | | // 测试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); |
| | |
| | | |
| | | // 测试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); |
| | |
| | | |
| | | // 测试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); |