11
13693261870
2024-11-11 138b959cc11dc9a73b0c766030b99ba1180d8650
src/main/java/com/se/simu/domain/dto/ResultDto.java
@@ -1,18 +1,13 @@
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.Dictionary;
import java.util.HashMap;
import java.util.Map;
import java.util.*;
/**
 * 结果实体类
 *
 * @author WWW
 * @date 2024-09-30
 */
@SuppressWarnings("ALL")
public class ResultDto {
    private String serviceName;
@@ -28,13 +23,20 @@
    private String temp;
    private int epsg;
    private SpatialReference spatialReference;
    private Map<String, float[]> buildings;
    private List<BuildingDto> buildingList;
    public ResultDto() {
        this.buildings = new HashMap<>();
        this.buildingList = new ArrayList<>();
    }
    public ResultDto(String serviceName, String terrainFile, String buildingFile, String waterPath, String flowPath, String outPath, String temp) {
    public ResultDto(String serviceName, String terrainFile, String buildingFile, String waterPath, String flowPath, String outPath, int epsg) {
        this();
        this.serviceName = serviceName;
        this.terrainFile = terrainFile;
@@ -43,6 +45,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()) {
@@ -120,4 +124,28 @@
    public void setBuildings(Map<String, float[]> buildings) {
        this.buildings = buildings;
    }
    public List<BuildingDto> getBuildingList() {
        return buildingList;
    }
    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;
    }
}