1
13693261870
2024-11-02 ac7431eef6a7c1e771a088f2354e685d7447a4d0
1
已修改3个文件
20 ■■■■ 文件已修改
src/main/java/com/se/simu/domain/po/DataPo.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/se/simu/helper/GdalHelper.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/se/simu/service/WaterService.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/se/simu/domain/po/DataPo.java
@@ -2,7 +2,9 @@
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.se.simu.helper.GdalHelper;
import io.swagger.annotations.ApiModelProperty;
import org.gdal.osr.SpatialReference;
import java.util.Date;
@@ -270,4 +272,8 @@
    public void setEpsg(Integer epsg) {
        this.epsg = epsg;
    }
    public SpatialReference getSpatialReference() {
        return GdalHelper.createSpatialReference(this.getEpsg());
    }
}
src/main/java/com/se/simu/helper/GdalHelper.java
@@ -85,6 +85,14 @@
        }
    }
    public static SpatialReference createSpatialReference(int epsg) {
        SpatialReference sr = new SpatialReference();
        sr.ImportFromEPSG(epsg);
        sr.SetAxisMappingStrategy(osr.OAMS_TRADITIONAL_GIS_ORDER);
        return sr;
    }
    /**
     * 创建金字塔
     */
src/main/java/com/se/simu/service/WaterService.java
@@ -148,11 +148,7 @@
    private SpatialReference getSpatialRef(SimuPo simu) {
        DataPo data = JSONUtil.toBean(simu.getData(), DataPo.class);
        SpatialReference sr = new SpatialReference();
        sr.ImportFromEPSG(data.getEpsg());
        sr.SetAxisMappingStrategy(osr.OAMS_TRADITIONAL_GIS_ORDER);
        return sr;
        return data.getSpatialReference();
    }
    /**