1
13693261870
2024-11-14 d664d6b5d16fe2229f1b553aa098a94abefa1863
1
已修改2个文件
13 ■■■■ 文件已修改
src/main/java/com/se/simu/controller/TestController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/se/simu/service/ResultService.java 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/se/simu/controller/TestController.java
@@ -63,7 +63,7 @@
    @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")
src/main/java/com/se/simu/service/ResultService.java
@@ -493,6 +493,13 @@
        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) {
@@ -533,7 +540,7 @@
        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));
@@ -542,7 +549,7 @@
        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);