| | |
| | | package com.se.simu.domain.po; |
| | | |
| | | import com.se.simu.domain.dto.PointDto; |
| | | import com.se.simu.helper.GdalHelper; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import org.gdal.ogr.Geometry; |
| | | import org.gdal.ogr.ogr; |
| | | import org.gdal.osr.osr; |
| | | |
| | | @SuppressWarnings("ALL") |
| | | public class PondingPo { |
| | |
| | | @ApiModelProperty("积水深度") |
| | | private Double depth; |
| | | |
| | | @ApiModelProperty("面积") |
| | | private Double area; |
| | | |
| | | public PondingPo() { |
| | | } |
| | | |
| | |
| | | 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) { |
| | |
| | | public void setDepth(Double depth) { |
| | | this.depth = depth; |
| | | } |
| | | |
| | | public Double getArea() { |
| | | return area; |
| | | } |
| | | |
| | | public void setArea(Double area) { |
| | | this.area = area; |
| | | } |
| | | } |