dcb
2025-05-26 6d817179edaf2a6c793595056f5d250eb4396ab0
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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
package com.se.nsl.domain.po;
 
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.se.nsl.helper.GdalHelper;
import io.swagger.annotations.ApiModelProperty;
import org.gdal.osr.SpatialReference;
 
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
 
@SuppressWarnings("ALL")
public class SimuData {
    @ApiModelProperty("输入路径")
    private String inPath;
 
    @ApiModelProperty("输出路径")
    private String outPath;
 
    @ApiModelProperty("开始时间")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date startTime;
 
    @ApiModelProperty("最小X")
    private Double minx;
 
    @ApiModelProperty("最小Y")
    private Double miny;
 
    @ApiModelProperty("最大X")
    private Double maxx;
 
    @ApiModelProperty("最大Y")
    private Double maxy;
 
    @ApiModelProperty("坐标系ID")
    private Integer epsg;
 
    @ApiModelProperty("类别:1-预测模拟,2-实时模拟,3-历史模拟")
    private Integer type;
 
    @ApiModelProperty("降雨模式:正态分布|平均分布|波动平均分布|持续上升")
    private String mode;
 
    @ApiModelProperty("降雨总量(mm)")
    private Double total;
 
    @ApiModelProperty("降雨时长(h)")
    private Integer duration;
 
    @ApiModelProperty("降雨强度(mm/h)")
    private Double intensity;
 
    @ApiModelProperty("历史雨情:XX年50mm降雨|XX年75mm降雨|XX年100mm降雨|新增降雨历史数据")
    private String history;
 
    @ApiModelProperty("预测数据:降雨场次|气象数据|逐小时预报数据|自定义参数")
    private String prediction;
 
    @ApiModelProperty("雨量类别:雨量计实时数据|气象实时数据")
    private String category;
 
    @ApiModelProperty("雨量计列表")
    private List<RainGauge> gauges;
 
    @ApiModelProperty("降雨列表")
    private List<Rainfall> rainfalls;
 
    @ApiModelProperty("雨强单位:mm/h、mm/5min、mm/min")
    private String intensityUnit;
 
    public SimuData() {
        gauges = new ArrayList<>();
        rainfalls = new ArrayList<>();
    }
 
    public SimuData(String inPath, String outPath, Date startTime, Double minx, Double miny, Double maxx, Double maxy, Integer epsg, Integer type, Double total, Integer duration, Double intensity) {
        this();
        this.inPath = inPath;
        this.outPath = outPath;
        this.startTime = startTime;
        this.minx = minx;
        this.miny = miny;
        this.maxx = maxx;
        this.maxy = maxy;
        this.epsg = epsg;
        this.type = type;
        this.total = total;
        this.duration = duration;
        this.intensity = intensity;
    }
 
    public void setPath(String inPath, String outPath) {
        this.inPath = inPath;
        this.outPath = outPath;
    }
 
    public String getBbox() {
        // "116.64388473935195,39.884315914604464,116.64754729082588,39.887069143903496";
        return minx + "," + miny + "," + maxx + "," + maxy;
    }
 
    @JSONField(serialize = false)
    public SpatialReference getSpatialReference() {
        return GdalHelper.createSpatialReference(this.getEpsg());
    }
 
    public void setEnvelope(double[] envelope) {
        this.minx = envelope[0];
        this.maxx = envelope[1];
        this.miny = envelope[2];
        this.maxy = envelope[3];
    }
 
    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 Date getStartTime() {
        return startTime;
    }
 
    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }
 
    public Double getMinx() {
        return minx;
    }
 
    public void setMinx(Double minx) {
        this.minx = minx;
    }
 
    public Double getMiny() {
        return miny;
    }
 
    public void setMiny(Double miny) {
        this.miny = miny;
    }
 
    public Double getMaxx() {
        return maxx;
    }
 
    public void setMaxx(Double maxx) {
        this.maxx = maxx;
    }
 
    public Double getMaxy() {
        return maxy;
    }
 
    public void setMaxy(Double maxy) {
        this.maxy = maxy;
    }
 
    public Integer getEpsg() {
        return epsg;
    }
 
    public void setEpsg(Integer epsg) {
        this.epsg = epsg;
    }
 
    public Integer getType() {
        return type;
    }
 
    public void setType(Integer type) {
        this.type = type;
    }
 
    public String getMode() {
        return mode;
    }
 
    public void setMode(String mode) {
        this.mode = mode;
    }
 
    public Double getTotal() {
        return total;
    }
 
    public void setTotal(Double total) {
        this.total = total;
    }
 
    public Integer getDuration() {
        return duration;
    }
 
    public void setDuration(Integer duration) {
        this.duration = duration;
    }
 
    public Double getIntensity() {
        return intensity;
    }
 
    public void setIntensity(Double intensity) {
        this.intensity = intensity;
    }
 
    public String getHistory() {
        return history;
    }
 
    public void setHistory(String history) {
        this.history = history;
    }
 
    public String getPrediction() {
        return prediction;
    }
 
    public void setPrediction(String prediction) {
        this.prediction = prediction;
    }
 
    public String getCategory() {
        return category;
    }
 
    public void setCategory(String category) {
        this.category = category;
    }
 
    public List<RainGauge> getGauges() {
        return gauges;
    }
 
    public void setGauges(List<RainGauge> gauges) {
        this.gauges = gauges;
    }
 
    public List<Rainfall> getRainfalls() {
        return rainfalls;
    }
 
    public void setRainfalls(List<Rainfall> rainfalls) {
        this.rainfalls = rainfalls;
    }
 
    public String getIntensityUnit() {
        return intensityUnit;
    }
 
    public void setIntensityUnit(String intensityUnit) {
        this.intensityUnit = intensityUnit;
    }
}