From 5f80de49c4a00416591054180bf809a12a76d686 Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期四, 07 十一月 2024 16:40:53 +0800 Subject: [PATCH] 1 --- ExportMap/Controllers/ConvertController.cs | 47 ++++++++++------------------------------------- 1 files changed, 10 insertions(+), 37 deletions(-) diff --git a/ExportMap/Controllers/ConvertController.cs b/ExportMap/Controllers/ConvertController.cs index b4bb01d..27320d8 100644 --- a/ExportMap/Controllers/ConvertController.cs +++ b/ExportMap/Controllers/ConvertController.cs @@ -1,4 +1,5 @@ 锘縰sing ExportMap.cs; +using ExportMap.db; using ExportMap.Models; using System; using System.Collections.Generic; @@ -15,19 +16,19 @@ [HttpGet] public string Test() { - //string name = "8-鐟炰附绔�0.05m.cpt"; - //string cnName = name.Substring(0, name.LastIndexOf(".")); - + //string cnName = "8-鐟炰附绔�0.05m.cpt".Substring(0, "8-鐟炰附绔�0.05m.cpt".LastIndexOf(".")); //return Tools.GetLocalIP(); - //return Tools.GetEPSG("D:\\Moon\\data\\dem_tif\\ldem.tif"); - //TerrainUtils.Reproject("D:/xyz/dem/dem/32a.tif", "D:/xyz/dem/dem/32a_4326_.tif", "EPSG:4528", "EPSG:4326"); - //TerrainUtils.Project("D:/xyz/dem/dem/32a_4326_.tif", "EPSG:4490"); - //string wkt = TerrainUtils.GetPointZ(new XYZArgs() { dircode = "0B" }); - string str = PyLasUtils.CsTransform("EPSG:4528", 400925.079, 2541768.173); + //PyLasUtils.CsTransform("EPSG:4528", 400925.079, 2541768.173); + //string json = PyLasUtils.GetLasGeomJSON(@"D:\LF\data\las\1_lfz_0.05m.las", 1314); + //TerrainUtils.Complement(new XYZArgs() { dircode = "00" }); + + ExportArgs args = new ExportArgs() { title = "Test" }; + SysTask task = TaskDBHelper.CreateTask(ExportUtil.ToXYZArgs(args), "PNG", "鍦ㄧ嚎鍒跺浘(PNG)"); + Tools.ExecCmd(task, "dir", true, true); return DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); } @@ -129,35 +130,7 @@ checkMinMax(args); string err = null; - List<int> rs = TerraUtils.Generate(args, ref err); - if (null == rs || rs.Count == 0) - { - return ResponseMsg<string>.fail(null == err ? "澶辫触" : err); - } - - return ResponseMsg<string>.success("鎴愬姛", string.Join(",", rs), rs.Count); - } - catch (Exception ex) - { - LogOut.Error(ex.Message + "\r\n" + ex.StackTrace); - return ResponseMsg<string>.fail(ex.Message); - } - } - - /// <summary> - /// 杞崲鍦板舰 - /// </summary> - [HttpPost] - public ResponseMsg<string> ToTerrain([FromBody]XYZArgs args) - { - try - { - ResponseMsg<string> msg = checkArgs(args, true); - if (null != msg) return msg; - - checkMinMax(args); - - string err = null; + //List<int> rs = TerraUtils.Generate(args, ref err); List<int> rs = TerrainUtils.Generate(args, ref err); if (null == rs || rs.Count == 0) { -- Gitblit v1.9.3