| | |
| | | code+=1; |
| | | //地形生成 |
| | | terrainToSem(dtos, vo.getSemUrl()); |
| | | update(simu, code, null); |
| | | update(simu, 10, null); |
| | | code+=1; |
| | | //9=调用求解/10=求解分析 |
| | | } catch (Exception e) { |
| | |
| | | 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.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())); |
| | | //jsonObject.put("vertices", TiffCoordinateExtractorUtil.getCoordinate(tifPath)); |
| | | jsonObject.put("vertices", array); |
| | | FileWriter fileWriter = new FileWriter(path + "terrain.json"); |
| | | fileWriter.write(jsonObject.toJSONString()); |
| | | fileWriter.close(); |