| | |
| | | |
| | | @ApiOperation(value = "tarr文件组装") |
| | | @GetMapping(value = "/saveZarr", produces = "application/json; charset=UTF-8") |
| | | public R<Boolean> saveZarr(@RequestParam("name") String tableName) throws IOException { |
| | | public R<Boolean> saveZarr(@RequestParam("name") String tableName) throws Exception { |
| | | List<String> list = CsvToSQLiteUtils.getNameList(tableName); |
| | | String path = outPath + "\\"; |
| | | String rainfall = "rainfall\\"; |
| | |
| | | FileWriter fileWriter = new FileWriter(path + tableName + "\\降雨量.json"); |
| | | fileWriter.write(jsonObject.toJSONString()); |
| | | fileWriter.close(); |
| | | SemUtils.cityJsonToSem(path + tableName + "\\降雨量.json",path + tableName + "\\降雨量.sem"); |
| | | return success(true); |
| | | } |
| | | |
| | |
| | | FileWriter fileWriter = new FileWriter(pointPath); |
| | | fileWriter.write(jsonObject.toJSONString()); |
| | | fileWriter.close(); |
| | | SemUtils.cityJsonToSem(pointPath,path + times + "\\管点.sem"); |
| | | return success(pointPath); |
| | | } |
| | | |
| | |
| | | JSONArray jsonArray=new JSONArray(); |
| | | jsonArray.add(boundarie); |
| | | metry.put("boundaries", jsonArray); |
| | | cityObject.put("geometry",metry); |
| | | JSONArray metryArray=new JSONArray(); |
| | | metryArray.add(metry); |
| | | cityObject.put("geometry",metryArray); |
| | | cityObject.put("attributes",attribute); |
| | | cityObject.put("attributes", attribute); |
| | | geometry.add(metry); |
| | |
| | | FileWriter fileWriter = new FileWriter(pointPath); |
| | | fileWriter.write(jsonObject.toJSONString()); |
| | | fileWriter.close(); |
| | | SemUtils.cityJsonToSem(pointPath, path + times + "\\管线.sem"); |
| | | return success(pointPath); |
| | | } |
| | | @ApiOperation(value = "地形转cityjson") |
| | |
| | | FileWriter fileWriter = new FileWriter(path + "terrain.json"); |
| | | fileWriter.write(jsonObject.toJSONString()); |
| | | fileWriter.close(); |
| | | SemUtils.cityJsonToSem(path + "terrain.json", path + "terrain.sem"); |
| | | return success(path); |
| | | } |
| | | public JSONObject getModule(String moduleName) { |