1
13693261870
2024-11-02 e46790ae4ba029027d4d7784655b8a90234968ba
src/main/java/com/se/simu/domain/dto/ResultDto.java
@@ -1,6 +1,8 @@
package com.se.simu.domain.dto;
import cn.hutool.core.io.FileUtil;
import com.se.simu.helper.GdalHelper;
import org.gdal.osr.SpatialReference;
import java.io.File;
import java.util.*;
@@ -26,6 +28,10 @@
    private String temp;
    private int epsg;
    private SpatialReference spatialReference;
    private Map<String, float[]> buildings;
    private List<BuildingDto> buildingList;
@@ -35,7 +41,7 @@
        this.buildingList = new ArrayList<>();
    }
    public ResultDto(String serviceName, String terrainFile, String buildingFile, String waterPath, String flowPath, String outPath) {
    public ResultDto(String serviceName, String terrainFile, String buildingFile, String waterPath, String flowPath, String outPath, int epsg) {
        this();
        this.serviceName = serviceName;
        this.terrainFile = terrainFile;
@@ -44,6 +50,8 @@
        this.flowPath = flowPath;
        this.outPath = outPath + File.separator + serviceName;
        this.temp = outPath + File.separator + serviceName + File.separator + "temp";
        this.epsg = epsg;
        this.spatialReference = GdalHelper.createSpatialReference(epsg);
        File dir = new File(this.outPath);
        if (dir.exists() && dir.isDirectory()) {
@@ -129,4 +137,20 @@
    public void setBuildingList(List<BuildingDto> buildingList) {
        this.buildingList = buildingList;
    }
    public int getEpsg() {
        return epsg;
    }
    public void setEpsg(int epsg) {
        this.epsg = epsg;
    }
    public SpatialReference getSpatialReference() {
        return spatialReference;
    }
    public void setSpatialReference(SpatialReference spatialReference) {
        this.spatialReference = spatialReference;
    }
}