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 gauges; @ApiModelProperty("降雨列表") private List rainfalls; 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; } 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 getGauges() { return gauges; } public void setGauges(List gauges) { this.gauges = gauges; } public List getRainfalls() { return rainfalls; } public void setRainfalls(List rainfalls) { this.rainfalls = rainfalls; } }