1
13693261870
2024-11-14 5296b04442d1c09bf55a8f5a556355788ee9f8ca
src/main/java/com/se/simu/domain/po/PondingPo.java
@@ -1,6 +1,9 @@
package com.se.simu.domain.po;
import com.se.simu.domain.dto.PointDto;
import io.swagger.annotations.ApiModelProperty;
import org.gdal.ogr.Geometry;
import org.gdal.ogr.ogr;
@SuppressWarnings("ALL")
public class PondingPo {
@@ -16,6 +19,16 @@
    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());
        this.polygon = polygon.ExportToWkt();
        this.point = point.ExportToWkt();
        this.depth = dto.getVal();
    }
    public PondingPo(String polygon, String point, Double depth) {
        this.polygon = polygon;
        this.point = point;