| | |
| | | |
| | | @ApiOperation(value = "testResuslt *") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "path", value = "路径", dataType = "String", paramType = "query", example = "20241010095328"), |
| | | @ApiImplicitParam(name = "path", value = "路径", dataType = "String", paramType = "query", example = "20241107092342"), |
| | | @ApiImplicitParam(name = "time", value = "时间", dataType = "String", paramType = "query", example = "2024-11-07 09:23:42") |
| | | }) |
| | | @GetMapping("/testResuslt") |
| | |
| | | if (CollectionUtils.isEmpty(geometries)) return; |
| | | |
| | | List<PondingPo> list = copePonding(dto, ds, layer, geometries); |
| | | if (CollectionUtils.isEmpty(list)) return; |
| | | |
| | | try { |
| | | writeJson(dto.getOutPath() + File.separator + "water.json", JSON.toJSONString(list)); |
| | | } catch (Exception ex) { |
| | | log.error(ex.getMessage(), ex); |
| | | } |
| | | } |
| | | |
| | | private List<Geometry> getGeometries(String filePath) { |
| | |
| | | List<PondingPo> list = new ArrayList<>(); |
| | | for (Geometry geometry : geometries) { |
| | | List<PointDto> points = getValues(ds, geometry, transform, xSize, ySize); |
| | | if (CollectionUtils.isEmpty(points))continue; |
| | | if (CollectionUtils.isEmpty(points)) continue; |
| | | |
| | | PointDto point = Collections.max(points); |
| | | list.add(new PondingPo(geometry, point)); |
| | |
| | | return list; |
| | | } |
| | | |
| | | private List<PointDto> getValues(Dataset ds, Geometry g,double[] transform, int xSize, int ySize) { |
| | | private List<PointDto> getValues(Dataset ds, Geometry g, double[] transform, int xSize, int ySize) { |
| | | double[] env = new double[4]; |
| | | g.GetEnvelope(env); |
| | | |