1
13693261870
2024-11-14 3aea0bf8e9f3178fe2aabb1e546de584d2bd5fcf
src/main/java/com/se/simu/service/ResultService.java
@@ -493,6 +493,14 @@
        if (CollectionUtils.isEmpty(geometries)) return;
        List<PondingPo> list = copePonding(dto, ds, layer, geometries);
        if (CollectionUtils.isEmpty(list)) return;
        try {
            filePath = dto.getOutPath() + File.separator + "waters" + File.separator + ticks + File.separator + "water.json";
            writeJson(filePath, JSON.toJSONString(list));
        } catch (Exception ex) {
            log.error(ex.getMessage(), ex);
        }
    }
    private List<Geometry> getGeometries(String filePath) {
@@ -533,7 +541,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 +550,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);