From e46790ae4ba029027d4d7784655b8a90234968ba Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期六, 02 十一月 2024 10:30:44 +0800 Subject: [PATCH] 1 --- src/main/java/com/se/simu/domain/dto/ResultDto.java | 26 +++++++++++++++++++++++++- 1 files changed, 25 insertions(+), 1 deletions(-) diff --git a/src/main/java/com/se/simu/domain/dto/ResultDto.java b/src/main/java/com/se/simu/domain/dto/ResultDto.java index efd4c2f..378dfd5 100644 --- a/src/main/java/com/se/simu/domain/dto/ResultDto.java +++ b/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; + } } -- Gitblit v1.9.3