Commit 86e57850 authored by 周健威's avatar 周健威

修改代码

parent b1bf08ae
......@@ -128,6 +128,55 @@
<version>2.0-rscp-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.vividsolutions</groupId>
<artifactId>jts</artifactId>
<version>1.13</version>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-geojson</artifactId>
<version>24.3</version>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-main</artifactId>
<version>24.3</version>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-shapefile</artifactId>
<version>24.3</version>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-swing</artifactId>
<version>24.3</version>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-opengis</artifactId>
<version>24.3</version>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-referencing</artifactId>
<version>24.3</version>
</dependency>
<!-- 添加geotools-jdbc -->
<dependency>
<groupId>org.geotools.jdbc</groupId>
<artifactId>gt-jdbc-postgis</artifactId>
<version>24.3</version>
</dependency>
</dependencies>
<build>
......
......@@ -9,6 +9,7 @@ import com.upyuns.platform.rs.universal.constant.RedisKey;
import com.upyuns.platform.rs.universal.controller.UploadController;
import com.upyuns.platform.rs.universal.utils.ImageWatermarkUtil;
import com.upyuns.platform.rs.universal.utils.ImgBase64Util;
import com.upyuns.platform.rs.universal.utils.ShpToGeojson;
import org.apache.commons.io.FileUtils;
import org.joda.time.DateTime;
import org.joda.time.format.DateTimeFormat;
......@@ -64,7 +65,8 @@ public class UploadService {
//将文件写入指定位置
FileUtils.copyInputStreamToFile(file.getInputStream(), new File(filePath));
String key = "shp:"+ UUIDUtils.generateShortUuid();
redisTemplate.opsForValue().setIfAbsent(key, filePath);
String geomJson = ShpToGeojson.shp2geojson(filePath);
redisTemplate.opsForValue().setIfAbsent(key, geomJson);
// realFileRelPath=xx_url+SystemConfig.XXMP_URL+realFileRelPath;
return key;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment