| | |
| | | /// </summary> |
| | | private static void MoveFilesToTemp(string sourcePath, string targetPath) |
| | | { |
| | | string imgPath = Path.Combine(targetPath, "img"); |
| | | //if (!Directory.Exists(imgPath)) Directory.CreateDirectory(imgPath); |
| | | CopyFolder(Path.Combine(sourcePath, "数字正射影像图"), Path.Combine(targetPath, "img")); |
| | | CopyFolder(Path.Combine(sourcePath, "数字高程模型"), Path.Combine(targetPath, "dem")); |
| | | CopyFolder(Path.Combine(sourcePath, "中线裁剪范围"), Path.Combine(targetPath, "shp")); |
| | | } |
| | | |
| | | string demPath = Path.Combine(targetPath, "dem"); |
| | | //if (!Directory.Exists(demPath)) Directory.CreateDirectory(demPath); |
| | | /// <summary> |
| | | /// 复制目录 |
| | | /// </summary> |
| | | private static void CopyFolder(string sourcePath, string targetPath) |
| | | { |
| | | if (!Directory.Exists(targetPath)) Directory.CreateDirectory(targetPath); |
| | | |
| | | string shpPath = Path.Combine(targetPath, "shp"); |
| | | //if (!Directory.Exists(shpPath)) Directory.CreateDirectory(shpPath); |
| | | DirectoryInfo di = new DirectoryInfo(sourcePath); |
| | | |
| | | File.Move(Path.Combine(sourcePath, "数字正射影像图"), imgPath); |
| | | File.Move(Path.Combine(sourcePath, "数字高程模型"), demPath); |
| | | File.Move(Path.Combine(sourcePath, "中线裁剪范围"), shpPath); |
| | | FileInfo[] files = di.GetFiles(); |
| | | if (null == files || 0 == files.Length) return; |
| | | |
| | | foreach (FileInfo fi in files) |
| | | { |
| | | File.Move(fi.FullName, Path.Combine(targetPath, fi.Name)); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| | | <script src="js/jquery.1.12.4.js"></script> |
| | | <script> |
| | | var token = "2b03248b-b00c-4bf3-b497-7d8708445495"; |
| | | var token = "673e4e0f-5a6e-49e6-bb04-d5991cbc3b7f"; |
| | | |
| | | // Ajax |
| | | function ajax(url, type, data, dataType, contentType, fn) { |
| | |
| | | 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); |
| | | }); |
| | | } |
| | | </script> |
| | | </head> |
| | | <body> |
| | |
| | | <input type="button" value="测试OSGB" onclick="toOsgb();" /> |
| | | <input type="button" value="测试Las" onclick="toLas();" /> |
| | | <input type="button" value="测试Laz" onclick="toLaz();" /> |
| | | <input type="button" value="生成Mpt" onclick="createMpt();" /> |
| | | </body> |
| | | </html> |