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 | 18 ++++++++++++------ 1 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/se/simu/controller/SimuController.java b/src/main/java/com/se/simu/controller/SimuController.java index a1b278c..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); @@ -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