月球大数据地理空间分析展示平台-【后端】-月球后台服务
13693261870
2023-06-02 c31e03f0e51214a524d3fc34d30f3459698ff625
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
package com.moon.server.entity.ctrl;
 
import com.moon.server.entity.all.AbstractPwdEntity;
import com.moon.server.entity.all.StaticData;
 
import java.io.Serializable;
 
/**
 * 下载瓦片实体类
 * @author WWW
 */
public class DownloadTileEntity extends AbstractPwdEntity implements Serializable {
    private static final long serialVersionUID = -229710198271495902L;
 
    private Double xmin;
 
    private Double ymin;
 
    private Double xmax;
 
    private Double ymax;
 
    private Integer pubid;
 
    private String title;
 
    public DownloadTileEntity() {
    }
 
    /**
     * 验证坐标
     */
    public String verifyCoords() {
        if (null == xmin || null == ymin || null == xmax || null == ymax) {
            return "四至坐标值不能为空";
        }
        if (xmin < StaticData.I180_NEG || xmin > StaticData.I180 || xmax < StaticData.I180_NEG || xmax > StaticData.I180) {
            return "X坐标值不正确";
        }
        if (ymin < StaticData.I90_NEG || ymin > StaticData.I90 || ymax < StaticData.I90_NEG || ymax > StaticData.I90) {
            return "Y坐标值不正确";
        }
 
        if (xmin > xmax) {
            double x = xmax;
            xmin = xmax;
            xmax = x;
        }
        if (ymin > ymax) {
            double y = ymax;
            ymin = ymax;
            ymax = y;
        }
 
        return null;
    }
 
    public Double getXmin() {
        return xmin;
    }
 
    public void setXmin(Double xmin) {
        this.xmin = xmin;
    }
 
    public Double getYmin() {
        return ymin;
    }
 
    public void setYmin(Double ymin) {
        this.ymin = ymin;
    }
 
    public Double getXmax() {
        return xmax;
    }
 
    public void setXmax(Double xmax) {
        this.xmax = xmax;
    }
 
    public Double getYmax() {
        return ymax;
    }
 
    public void setYmax(Double ymax) {
        this.ymax = ymax;
    }
 
    public Integer getPubid() {
        return pubid;
    }
 
    public void setPubid(Integer pubid) {
        this.pubid = pubid;
    }
 
    public String getTitle() {
        return title;
    }
 
    public void setTitle(String title) {
        this.title = title;
    }
}