wuww
2025-04-11 4dfc75b7061bee39968df9e94ee0f56bc003f5fd
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
package com.se.nsl.domain.po;
 
import com.se.nsl.domain.dto.PointDto;
import com.se.nsl.helper.GdalHelper;
import io.swagger.annotations.ApiModelProperty;
import org.gdal.ogr.Geometry;
import org.gdal.ogr.ogr;
 
@SuppressWarnings("ALL")
public class PondingPo {
    @ApiModelProperty("积水区域")
    private String polygon;
 
    @ApiModelProperty("积水点")
    private String point;
 
    @ApiModelProperty("积水深度")
    private Double depth;
 
    @ApiModelProperty("面积")
    private Double area;
 
    public PondingPo() {
    }
 
    public PondingPo(Geometry polygon, PointDto dto) {
        Geometry point = new Geometry(ogr.wkbPoint);
        point.AddPoint_2D(dto.getX(), dto.getY());
        point.AssignSpatialReference(polygon.GetSpatialReference());
 
        //GdalHelper.toWgs84(polygon.GetSpatialReference(), polygon);
        //GdalHelper.toWgs84(polygon.GetSpatialReference(), point);
        polygon.TransformTo(GdalHelper.SR4326);
        point.TransformTo(GdalHelper.SR4326);
 
        this.polygon = polygon.ExportToWkt();
        this.point = point.ExportToWkt();
        this.depth = dto.getVal();
        this.area = polygon.Area();
    }
 
    public PondingPo(String polygon, String point, Double depth) {
        this.polygon = polygon;
        this.point = point;
        this.depth = depth;
    }
 
    public String getPolygon() {
        return polygon;
    }
 
    public void setPolygon(String polygon) {
        this.polygon = polygon;
    }
 
    public String getPoint() {
        return point;
    }
 
    public void setPoint(String point) {
        this.point = point;
    }
 
    public Double getDepth() {
        return depth;
    }
 
    public void setDepth(Double depth) {
        this.depth = depth;
    }
 
    public Double getArea() {
        return area;
    }
 
    public void setArea(Double area) {
        this.area = area;
    }
}