1
13693261870
2024-12-02 d073fb92291373092ab61ae43bce3cb0e610ef11
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
package com.se.simu.domain.dto;
 
import cn.hutool.core.io.FileUtil;
import com.se.simu.helper.GdalHelper;
import org.gdal.osr.SpatialReference;
 
import java.io.File;
import java.util.*;
 
@SuppressWarnings("ALL")
public class ResultDto {
    private String serviceName;
 
    private String terrainFile;
 
    private String buildingFile;
 
    private String waterPath;
 
    private String flowPath;
 
    private String h5Path;
 
    private String inPath;
 
    private String outPath;
 
    private String temp;
 
    private int epsg;
 
    private SpatialReference spatialReference;
 
    private Map<String, float[]> buildings;
 
    private List<BuildingDto> buildingList;
 
    public ResultDto() {
        this.buildings = new HashMap<>();
        this.buildingList = new ArrayList<>();
    }
 
    public ResultDto(String serviceName, String terrainFile, String buildingFile, String waterPath, String flowPath, String inPath, String outPath, int epsg) {
        this();
        this.serviceName = serviceName;
        this.terrainFile = terrainFile;
        this.buildingFile = buildingFile;
        this.waterPath = waterPath;
        this.flowPath = flowPath;
        this.inPath = inPath + File.separator + serviceName;
        this.h5Path = this.inPath + File.separator + ".save" + File.separator + serviceName + ".h5";
        this.outPath = outPath + File.separator + serviceName;
        this.temp = outPath + File.separator + serviceName + File.separator + "temp";
        this.epsg = epsg;
        this.spatialReference = GdalHelper.createSpatialReference(epsg);
 
        File dir = new File(this.outPath);
        if (dir.exists() && dir.isDirectory()) {
            FileUtil.del(dir);
        }
        dir.mkdirs();
 
        dir = new File(this.temp);
        if (dir.exists() && dir.isDirectory()) {
            FileUtil.del(dir);
        }
        dir.mkdirs();
    }
 
    public String getServiceName() {
        return serviceName;
    }
 
    public void setServiceName(String serviceName) {
        this.serviceName = serviceName;
    }
 
    public String getTerrainFile() {
        return terrainFile;
    }
 
    public void setTerrainFile(String terrainFile) {
        this.terrainFile = terrainFile;
    }
 
    public String getBuildingFile() {
        return buildingFile;
    }
 
    public void setBuildingFile(String buildingFile) {
        this.buildingFile = buildingFile;
    }
 
    public String getWaterPath() {
        return waterPath;
    }
 
    public void setWaterPath(String waterPath) {
        this.waterPath = waterPath;
    }
 
    public String getFlowPath() {
        return flowPath;
    }
 
    public void setFlowPath(String flowPath) {
        this.flowPath = flowPath;
    }
 
    public String getInPath() {
        return inPath;
    }
 
    public void setInPath(String inPath) {
        this.inPath = inPath;
    }
 
    public String getOutPath() {
        return outPath;
    }
 
    public void setOutPath(String outPath) {
        this.outPath = outPath;
    }
 
    public String getTemp() {
        return temp;
    }
 
    public void setTemp(String temp) {
        this.temp = temp;
    }
 
    public Map<String, float[]> getBuildings() {
        return buildings;
    }
 
    public void setBuildings(Map<String, float[]> buildings) {
        this.buildings = buildings;
    }
 
    public List<BuildingDto> getBuildingList() {
        return buildingList;
    }
 
    public void setBuildingList(List<BuildingDto> buildingList) {
        this.buildingList = buildingList;
    }
 
    public int getEpsg() {
        return epsg;
    }
 
    public void setEpsg(int epsg) {
        this.epsg = epsg;
    }
 
    public SpatialReference getSpatialReference() {
        return spatialReference;
    }
 
    public void setSpatialReference(SpatialReference spatialReference) {
        this.spatialReference = spatialReference;
    }
 
    public String getH5Path() {
        return h5Path;
    }
 
    public void setH5Path(String h5Path) {
        this.h5Path = h5Path;
    }
}