| | |
| | | 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); |
| | |
| | | TiffToRGBUtil.tifToPng(tifPath, pngPath); |
| | | JSONObject jsonObject = getModule("terrainmodule.json"); |
| | | JSONArray array=new JSONArray(); |
| | | array.add(ProjectionToGeographicUtil.getPoint(dtos.get(1).getLon(),dtos.get(1).getLat())); |
| | | array.add(ProjectionToGeographicUtil.getPoint(dtos.get(2).getLon(),dtos.get(2).getLat())); |
| | | array.add(ProjectionToGeographicUtil.getPoint(dtos.get(3).getLon(),dtos.get(3).getLat())); |
| | | array.add(ProjectionToGeographicUtil.getPoint(dtos.get(0).getLon(),dtos.get(0).getLat())); |
| | | 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"); |