| | |
| | | <!DOCTYPE html> |
| | | <html xmlns="http://www.w3.org/1999/xhtml"> |
| | | <head> |
| | | <title>Export</title> |
| | | <meta http-equiv="Expires" content="0" /> |
| | | <meta http-equiv="Cache" content="no-cache" /> |
| | | <meta http-equiv="Pragma" content="no-cache" /> |
| | | <meta http-equiv="Cache-control" content="no-cache" /> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> |
| | | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| | | <title></title> |
| | | <script src="js/jquery.1.12.4.js"></script> |
| | | <script> |
| | | var token = "a5cc6769-f965-4b90-b7c9-5188186d6cce"; |
| | | var token = "0909c1b4-e573-4b8a-95d1-bcc392433c44"; |
| | | |
| | | $(function () { |
| | | $("#token").html(token); |
| | | }); |
| | | |
| | | // Ajax |
| | | function ajax(url, type, data, dataType, contentType, fn) { |
| | | $.ajax({ |
| | | url: url, |
| | |
| | | }); |
| | | } |
| | | |
| | | // 出图-1 |
| | | function exportMap1() { |
| | | var page = $("#selectPage").find("option:selected").text(); |
| | | var data = { |
| | |
| | | scale: "1:5万", |
| | | resolution: "5米", |
| | | date: "2022.11.09", |
| | | layers: "项目,站场,管道中心线,矢量图", |
| | | layers: "m_hydraulic_protection,m_marker,m_pipeline,m_sitepoint,m_valvehousepoint,m_crossing,高德矢量", |
| | | rotation: 0, |
| | | xmin: 103.394023, |
| | | ymin: 30.690466, |
| | |
| | | }); |
| | | } |
| | | |
| | | // 出图-2 |
| | | function exportMap2() { |
| | | var page = $("#selectPage").find("option:selected").text(); |
| | | var data = { |
| | |
| | | title: "管道基础大数据平台(DW1-02)", |
| | | pageSize: page, |
| | | province: "山东省", |
| | | scale: "1:20万", |
| | | resolution: "20米", |
| | | scale: "1:1万", |
| | | resolution: "2米", |
| | | date: "2022.11.10", |
| | | layers: "项目,站场,管道中心线,影像注记,影像图", |
| | | layers: "bs_project,th_strategic_channel,m_hydraulic_protection,m_marker,m_pipeline,m_sitepoint,m_valvehousepoint,m_crossing,高德影像", |
| | | rotation: 0, |
| | | xmin: 103.394023, |
| | | ymin: 30.690466, |
| | |
| | | console.log(rs); |
| | | }); |
| | | } |
| | | |
| | | // 测试切图 |
| | | function convertXYZ() { |
| | | 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 * |
| | | 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) { |
| | | alert("code = " + rs.code + ", msg = " + rs.msg + ", result = " + rs.result); |
| | | console.log(rs); |
| | | }); |
| | | } |
| | | |
| | | // 测试Fbx |
| | | function convert2() { |
| | | var data = { token: token, ids: [8362], depcode: "000305", dircode: "0102", 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); |
| | | }); |
| | | } |
| | | |
| | | // 测试Ifc |
| | | function convert3() { |
| | | 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); |
| | | }); |
| | | } |
| | | |
| | | // 测试SG |
| | | function toSG() { |
| | | var data = { token: token, ids: [10516], depcode: "000305", dircode: "0102", userId: 1 }; |
| | | ajax("Convert/ToSG", "POST", JSON.stringify(data), null, null, function (rs) { |
| | | alert("code = " + rs.code + ", msg = " + rs.msg + ", result = " + rs.result); |
| | | console.log(rs); |
| | | }); |
| | | } |
| | | |
| | | // 测试Terra:10526,10527 | 10531 |
| | | function toTerra() { |
| | | var data = { token: token, ids: [1413, 1412], min: 0, max: 18, depcode: "00", dircode: "0B", userId: 1, name: "川二" }; |
| | | ajax("Convert/ToTerra", "POST", JSON.stringify(data), null, null, function (rs) { |
| | | alert("code = " + rs.code + ", msg = " + rs.msg + ", result = " + rs.result); |
| | | console.log(rs); |
| | | }); |
| | | } |
| | | |
| | | // 测试OSGB |
| | | function toOsgb() { |
| | | var data = { token: token, ids: [10287], 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); |
| | | }); |
| | | } |
| | | |
| | | // LasByPy |
| | | function toLasByPy() { |
| | | var data = { token: token, ids: [10481], depcode: "00", dircode: "0C", userId: 1, name: "HL_point_cloud_part_1.las", srids: [4548], zs: [0] }; |
| | | ajax("Convert/ToLasByPy", "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: [10481], 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", 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); |
| | | }); |
| | | } |
| | | |
| | | // 生成Mpt |
| | | function createMpt() { |
| | | ajax("TB/CreateMpt" + "?token=" + token + "&path=" + encodeURIComponent("D:\\LF\\data\\ANTU\\测绘(ESV)"), "GET", null, null, null, function (rs) { |
| | | alert("code = " + rs.code + ", msg = " + rs.msg + ", result = " + rs.result); |
| | | console.log(rs); |
| | | }); |
| | | } |
| | | |
| | | // 读取Las坐标系 |
| | | function ReadLasCs() { |
| | | var data = { token: token, ids: [10483, 10481, 10456, 10285], dircode: "00" }; |
| | | ajax("Convert/ReadLasCs", "POST", JSON.stringify(data), null, null, function (rs) { |
| | | alert("code = " + rs.code + ", msg = " + rs.msg + ", result = " + rs.result); |
| | | console.log(rs); |
| | | }); |
| | | } |
| | | |
| | | // 结束任务 |
| | | function deleteTask() { |
| | | var data = { token: token, ids: [$("#taskId").val()], dircode: "00" }; |
| | | ajax("Convert/DeleteTask", "POST", JSON.stringify(data), null, null, function (rs) { |
| | | alert("code = " + rs.code + ", msg = " + rs.msg + ", result = " + rs.result); |
| | | console.log(rs); |
| | | }); |
| | | } |
| | | </script> |
| | | </head> |
| | | <body> |
| | | <h2>出图测试</h2> |
| | | <h2>Toekn:<span id="token" style="font-size: 14px;"></span></h2> |
| | | <select id="selectPage"> |
| | | <option>A0</option> |
| | | <option>A1</option> |
| | | <option>A2</option> |
| | | <option>A3</option> |
| | | <option selected="selected">A4</option> |
| | | <option>A5</option> |
| | | <option>A6</option> |
| | | </select> |
| | | <input type="button" value="出图-1" onclick="exportMap1()" /> |
| | | <input type="button" value="出图-2" onclick="exportMap2()" /> |
| | | <a href="Convert/Test">Test</a> |
| | | <br /><br /> |
| | | |
| | | <input type="button" value="测试切图" onclick="convertXYZ();" /> |
| | | <input type="button" value="测试Rvt" onclick="convert1();" /> |
| | | <input type="button" value="测试Fbx" onclick="convert2();" /> |
| | | <input type="button" value="测试Ifc" onclick="convert3();" /> |
| | | <input type="button" value="测试SG" onclick="toSG();" /> |
| | | <input type="button" value="测试Terra" onclick="toTerra();" /> |
| | | <input type="button" value="测试OSGB" onclick="toOsgb();" /> |
| | | <input type="button" value="LasByPy" onclick="toLasByPy();" /> |
| | | <input type="button" value="测试Las" onclick="toLas();" /> |
| | | <input type="button" value="测试Laz" onclick="toLaz();" /> |
| | | <input type="button" value="生成Mpt" onclick="createMpt();" /> |
| | | <br /><br /> |
| | | |
| | | <input type="button" value="读取Las坐标系" onclick="ReadLasCs();" /> |
| | | <input id="taskId" value="0" /> |
| | | <input type="button" value="结束任务" onclick="deleteTask();" /> |
| | | </body> |
| | | </html> |