From 50423e90b61aededf6e1ff6c4c423c84c4f39fa3 Mon Sep 17 00:00:00 2001
From: 张洋洋 <10611411+yang-yang-z@user.noreply.gitee.com>
Date: 星期四, 27 二月 2025 15:23:27 +0800
Subject: [PATCH] [add]服务发布

---
 src/main/java/com/se/simu/controller/SimuController.java |   20 +++++++++++++-------
 1 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/src/main/java/com/se/simu/controller/SimuController.java b/src/main/java/com/se/simu/controller/SimuController.java
index 8f611fe..8c0d834 100644
--- a/src/main/java/com/se/simu/controller/SimuController.java
+++ b/src/main/java/com/se/simu/controller/SimuController.java
@@ -386,18 +386,18 @@
                 return fail("sem鏂囦欢鐢熸垚璺緞涓嶈兘涓虹┖锛�", false);
             }
             List<GridDto> dtos = new ArrayList<>();
-            dtos.add(new GridDto(vo.getMiny(), vo.getMinx()));
-            dtos.add(new GridDto(vo.getMaxy(), vo.getMinx()));
-            dtos.add(new GridDto(vo.getMaxy(), vo.getMaxx()));
             dtos.add(new GridDto(vo.getMiny(), vo.getMaxx()));
+            dtos.add(new GridDto(vo.getMaxy(), vo.getMaxx()));
+            dtos.add(new GridDto(vo.getMaxy(), vo.getMinx()));
+            dtos.add(new GridDto(vo.getMiny(), vo.getMinx()));
             String bbox = "";
             //鐢熸垚鐐瑰拰绾跨殑瀹炰綋搴撴ā鍨嬪苟淇濆瓨璺緞
             String name = vo.getSemUrl();
             String token = EntityLibraryUtils.login();
             vo.setPointName(name + "-point");
             vo.setLinkName(name + "-line");
-            JSONArray min = ProjectionToGeographicUtil.get4548Point(dtos.get(0).getLon(), dtos.get(0).getLat());
-            JSONArray max = ProjectionToGeographicUtil.get4548Point(dtos.get(2).getLon(), dtos.get(2).getLat());
+            JSONArray min = ProjectionToGeographicUtil.get4548Point(dtos.get(3).getLon(), dtos.get(3).getLat());
+            JSONArray max = ProjectionToGeographicUtil.get4548Point(dtos.get(1).getLon(), dtos.get(1).getLat());
             bbox = bbox + min.getDouble(0) + "," + min.getDouble(1) + "," + max.getDouble(0) + "," + max.getDouble(1);
             JSONObject point = getModule("layerQueryPointParams.json");
             String pointUrl = assemble(vo.getPointName(), point.getString("layerid"), bbox, token);
@@ -511,7 +511,7 @@
             code+=1;
             //鍦板舰鐢熸垚
             terrainToSem(dtos, vo.getSemUrl());
-            update(simu, code, null);
+            update(simu, 10, null);
             code+=1;
             //9=璋冪敤姹傝В/10=姹傝В鍒嗘瀽
         } catch (Exception e) {
@@ -920,7 +920,13 @@
         String pngPath = path + "appearance\\terrain.png";
         TiffToRGBUtil.tifToPng(tifPath, pngPath);
         JSONObject jsonObject = getModule("terrainmodule.json");
-        jsonObject.put("vertices", TiffCoordinateExtractorUtil.getCoordinate(tifPath));
+        JSONArray array=new JSONArray();
+        array.add(ProjectionToGeographicUtil.getPointAndHight(dtos.get(0).getLon(),dtos.get(0).getLat()));
+        array.add(ProjectionToGeographicUtil.getPointAndHight(dtos.get(1).getLon(),dtos.get(1).getLat()));
+        array.add(ProjectionToGeographicUtil.getPointAndHight(dtos.get(2).getLon(),dtos.get(2).getLat()));
+        array.add(ProjectionToGeographicUtil.getPointAndHight(dtos.get(3).getLon(),dtos.get(3).getLat()));
+        //jsonObject.put("vertices", TiffCoordinateExtractorUtil.getCoordinate(tifPath));
+        jsonObject.put("vertices", array);
         FileWriter fileWriter = new FileWriter(path + "terrain.json");
         fileWriter.write(jsonObject.toJSONString());
         fileWriter.close();

--
Gitblit v1.9.3