|
@@ -37,7 +37,7 @@ import java.util.concurrent.TimeUnit;
|
|
|
|
|
|
/**
|
|
/**
|
|
* Created by Owen on 2019/11/12 0012 9:40
|
|
* Created by Owen on 2019/11/12 0012 9:40
|
|
- *
|
|
|
|
|
|
+ * <p>
|
|
* 矢量数据
|
|
* 矢量数据
|
|
*/
|
|
*/
|
|
@Log4j2
|
|
@Log4j2
|
|
@@ -57,7 +57,27 @@ public class VectorController {
|
|
@Autowired
|
|
@Autowired
|
|
private CmdServer cmdServer;
|
|
private CmdServer cmdServer;
|
|
|
|
|
|
- BlockingQueue<MyQueue> vectorCoordQueue = new LinkedBlockingQueue<MyQueue>(5);
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 需要坐标转换
|
|
|
|
+ * CGCS_2000
|
|
|
|
+ */
|
|
|
|
+ private static int COORD_CONVERT_CGCS_2000 = 1000;
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 需要坐标转换
|
|
|
|
+ * _XIAN_1980
|
|
|
|
+ */
|
|
|
|
+ private static int COORD_CONVERT_XIAN_1980 = 1001;
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 不需要坐标转换
|
|
|
|
+ * WGS84
|
|
|
|
+ */
|
|
|
|
+ private static int COORD_NOT_WGS84 = 0;
|
|
|
|
+
|
|
|
|
+ BlockingQueue<MyQueue> vectorCoordQueue = new LinkedBlockingQueue<MyQueue>(1);
|
|
|
|
+
|
|
|
|
+ BlockingQueue<MyQueue> vectorSliceQueue = new LinkedBlockingQueue<MyQueue>(1);
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -72,16 +92,16 @@ public class VectorController {
|
|
new Thread(new VectorJudgeCoordConsumerThread(vectorCoordQueue)).start();
|
|
new Thread(new VectorJudgeCoordConsumerThread(vectorCoordQueue)).start();
|
|
|
|
|
|
|
|
|
|
|
|
+ new Thread(new VectorSliceThread(vectorSliceQueue)).start();
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
@ApiOperation("上传矢量数据, coord:坐标(可以为空), 坐标格式:0,0,0,0,0,0,0")
|
|
@ApiOperation("上传矢量数据, coord:坐标(可以为空), 坐标格式:0,0,0,0,0,0,0")
|
|
- @PostMapping(value = "uploadMult/{directoryName}", consumes = { "multipart/form-data" })
|
|
|
|
|
|
+ @PostMapping(value = "uploadMult/{directoryName}", consumes = {"multipart/form-data"})
|
|
private R uploadMult(@RequestParam("file") MultipartFile[] file,
|
|
private R uploadMult(@RequestParam("file") MultipartFile[] file,
|
|
@PathVariable("directoryName") String directoryName,
|
|
@PathVariable("directoryName") String directoryName,
|
|
- @RequestParam(value = "coord",required = false) String[] coord){
|
|
|
|
|
|
+ @RequestParam(value = "coord", required = false) String[] coord) {
|
|
log.info("run uploadMult");
|
|
log.info("run uploadMult");
|
|
log.info("coord: {}", Arrays.toString(coord));
|
|
log.info("coord: {}", Arrays.toString(coord));
|
|
|
|
|
|
@@ -99,6 +119,11 @@ public class VectorController {
|
|
|
|
|
|
R r = vectorServer.uploadDirectoryFileMul(file, directoryName, strCoord);
|
|
R r = vectorServer.uploadDirectoryFileMul(file, directoryName, strCoord);
|
|
|
|
|
|
|
|
+ // 判断文件是否有错误
|
|
|
|
+ if (r.getStatus() != 200) {
|
|
|
|
+ return new R(r.getStatus(), r.getMessage());
|
|
|
|
+ }
|
|
|
|
+
|
|
OutputFileEntity entity = (OutputFileEntity) r.getData();
|
|
OutputFileEntity entity = (OutputFileEntity) r.getData();
|
|
|
|
|
|
// 判断坐标
|
|
// 判断坐标
|
|
@@ -111,34 +136,33 @@ public class VectorController {
|
|
|
|
|
|
/**
|
|
/**
|
|
* 上传后判断坐标,显示原始坐标
|
|
* 上传后判断坐标,显示原始坐标
|
|
|
|
+ *
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
- private OutputFileEntity JudgeCoord(OutputFileEntity entity){
|
|
|
|
|
|
+ private OutputFileEntity JudgeCoord(OutputFileEntity entity) {
|
|
|
|
|
|
// 判断是否需要坐标转换
|
|
// 判断是否需要坐标转换
|
|
String cmd = Command.VECTOR_JUDGE_COORD;
|
|
String cmd = Command.VECTOR_JUDGE_COORD;
|
|
cmd = cmd.replace("@inputFile", entity.getUploadPath());
|
|
cmd = cmd.replace("@inputFile", entity.getUploadPath());
|
|
log.info("cmd: {}", cmd);
|
|
log.info("cmd: {}", cmd);
|
|
|
|
|
|
-// Integer isJudge = cmdServer.exeCmdJudgeCoord(cmd);
|
|
|
|
-
|
|
|
|
Map map = vectorServer.cmdJudgeCoord(cmd);
|
|
Map map = vectorServer.cmdJudgeCoord(cmd);
|
|
- Integer code = (int)map.get("code");
|
|
|
|
|
|
+ Integer code = (int) map.get("code");
|
|
log.info("judgeCoord code: {}", code);
|
|
log.info("judgeCoord code: {}", code);
|
|
|
|
|
|
|
|
|
|
// 转换坐标 普通坐标转换
|
|
// 转换坐标 普通坐标转换
|
|
- if (code == 1000){
|
|
|
|
|
|
+ if (code == COORD_CONVERT_CGCS_2000) {
|
|
// 普通坐标转换
|
|
// 普通坐标转换
|
|
log.info("need to general transform");
|
|
log.info("need to general transform");
|
|
entity.setCoordType(TypeCode.COORD_SYSTEM_2000);
|
|
entity.setCoordType(TypeCode.COORD_SYSTEM_2000);
|
|
- } else if (code == 1001) {
|
|
|
|
|
|
+ } else if (code == COORD_CONVERT_XIAN_1980) {
|
|
|
|
|
|
// 严格坐标转换 (西安80转wgs84),需要参数
|
|
// 严格坐标转换 (西安80转wgs84),需要参数
|
|
log.info("need to strict transform, code: {}", code);
|
|
log.info("need to strict transform, code: {}", code);
|
|
entity.setCoordType(TypeCode.COORD_XIAN_1980);
|
|
entity.setCoordType(TypeCode.COORD_XIAN_1980);
|
|
|
|
|
|
- } else if (0 == code){
|
|
|
|
|
|
+ } else if (0 == COORD_NOT_WGS84) {
|
|
// 不转换坐标 把文件信息移动到CoordStrictPath 这路径下
|
|
// 不转换坐标 把文件信息移动到CoordStrictPath 这路径下
|
|
log.info("not to transform");
|
|
log.info("not to transform");
|
|
entity.setCoordType(TypeCode.COORD_WGS84);
|
|
entity.setCoordType(TypeCode.COORD_WGS84);
|
|
@@ -156,8 +180,8 @@ public class VectorController {
|
|
styleEntity.setOutputFileId(entity.getId());
|
|
styleEntity.setOutputFileId(entity.getId());
|
|
styleEntity.setCreateTime(new Date());
|
|
styleEntity.setCreateTime(new Date());
|
|
styleEntity.setUpdateTime(new Date());
|
|
styleEntity.setUpdateTime(new Date());
|
|
- styleEntity.setLongitude(map.get("longitude")+"");
|
|
|
|
- styleEntity.setLatitude(map.get("latitude")+"");
|
|
|
|
|
|
+ styleEntity.setLongitude(map.get("longitude") + "");
|
|
|
|
+ styleEntity.setLatitude(map.get("latitude") + "");
|
|
|
|
|
|
vectorServer.saveStyle(styleEntity);
|
|
vectorServer.saveStyle(styleEntity);
|
|
|
|
|
|
@@ -167,7 +191,7 @@ public class VectorController {
|
|
|
|
|
|
@ApiOperation("获取矢量数据列表")
|
|
@ApiOperation("获取矢量数据列表")
|
|
@PostMapping(value = "list")
|
|
@PostMapping(value = "list")
|
|
- private R list(@RequestBody PageDto param){
|
|
|
|
|
|
+ private R list(@RequestBody PageDto param) {
|
|
return vectorServer.findByType(TypeCode.FILE_TYPE_VECTOR, param);
|
|
return vectorServer.findByType(TypeCode.FILE_TYPE_VECTOR, param);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -182,7 +206,6 @@ public class VectorController {
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
@ApiOperation("矢量数据判断坐标")
|
|
@ApiOperation("矢量数据判断坐标")
|
|
@GetMapping("command/judge/coord/{fileId}/")
|
|
@GetMapping("command/judge/coord/{fileId}/")
|
|
private R cmdJudgeCoord(@PathVariable("fileId") Long fileId) {
|
|
private R cmdJudgeCoord(@PathVariable("fileId") Long fileId) {
|
|
@@ -193,9 +216,6 @@ public class VectorController {
|
|
entity.setStatus(9);
|
|
entity.setStatus(9);
|
|
entity = vectorServer.save(entity);
|
|
entity = vectorServer.save(entity);
|
|
|
|
|
|
- // 坐标参数
|
|
|
|
-// String coord = entity.getCoord();
|
|
|
|
-// log.info("coord: {}", coord);
|
|
|
|
|
|
|
|
// 判断是否需要坐标转换
|
|
// 判断是否需要坐标转换
|
|
String cmd = Command.VECTOR_JUDGE_COORD;
|
|
String cmd = Command.VECTOR_JUDGE_COORD;
|
|
@@ -220,18 +240,18 @@ public class VectorController {
|
|
|
|
|
|
/**
|
|
/**
|
|
* 坐标判断消费队列
|
|
* 坐标判断消费队列
|
|
- *
|
|
|
|
|
|
+ * <p>
|
|
* 矢量数据转坐标只转一次就成功了。
|
|
* 矢量数据转坐标只转一次就成功了。
|
|
* 所以转换的成功的路径都放到strictCoordTransform 路径
|
|
* 所以转换的成功的路径都放到strictCoordTransform 路径
|
|
* 文件都放transform 目录
|
|
* 文件都放transform 目录
|
|
- *
|
|
|
|
*/
|
|
*/
|
|
- public class VectorJudgeCoordConsumerThread implements Runnable{
|
|
|
|
|
|
+ public class VectorJudgeCoordConsumerThread implements Runnable {
|
|
|
|
|
|
private BlockingQueue<MyQueue> queue;
|
|
private BlockingQueue<MyQueue> queue;
|
|
|
|
|
|
private boolean isRun = true;
|
|
private boolean isRun = true;
|
|
- public VectorJudgeCoordConsumerThread(BlockingQueue<MyQueue> queue){
|
|
|
|
|
|
+
|
|
|
|
+ public VectorJudgeCoordConsumerThread(BlockingQueue<MyQueue> queue) {
|
|
this.queue = queue;
|
|
this.queue = queue;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -245,7 +265,6 @@ public class VectorController {
|
|
if (data != null) {
|
|
if (data != null) {
|
|
log.info("消费者,拿到队列中的数据data: " + data.toString());
|
|
log.info("消费者,拿到队列中的数据data: " + data.toString());
|
|
|
|
|
|
-// Integer isJudge = cmdServer.exeCmdJudgeCoord(data.getStr());
|
|
|
|
entity = data.getOutputFile();
|
|
entity = data.getOutputFile();
|
|
|
|
|
|
// 坐标处理
|
|
// 坐标处理
|
|
@@ -255,8 +274,7 @@ public class VectorController {
|
|
|
|
|
|
|
|
|
|
// 转换坐标 普通坐标转换
|
|
// 转换坐标 普通坐标转换
|
|
-// if (isJudge == 1000){
|
|
|
|
- if (TypeCode.COORD_SYSTEM_2000.equals(entity.getCoordType())){
|
|
|
|
|
|
+ if (TypeCode.COORD_SYSTEM_2000.equals(entity.getCoordType())) {
|
|
// 普通坐标转换
|
|
// 普通坐标转换
|
|
log.info("need to general transform");
|
|
log.info("need to general transform");
|
|
if (arrayCoord.size() == 0) {
|
|
if (arrayCoord.size() == 0) {
|
|
@@ -270,7 +288,6 @@ public class VectorController {
|
|
entity = strictCoordTransform(entity, Command.VECTOR_TRANSFORM_STRICT_WGS80);
|
|
entity = strictCoordTransform(entity, Command.VECTOR_TRANSFORM_STRICT_WGS80);
|
|
}
|
|
}
|
|
|
|
|
|
-// } else if (isJudge == 1001) {
|
|
|
|
} else if (TypeCode.COORD_XIAN_1980.equals(entity.getCoordType())) {
|
|
} else if (TypeCode.COORD_XIAN_1980.equals(entity.getCoordType())) {
|
|
|
|
|
|
// 严格坐标转换 (西安80转wgs84),需要参数
|
|
// 严格坐标转换 (西安80转wgs84),需要参数
|
|
@@ -285,8 +302,7 @@ public class VectorController {
|
|
entity = strictCoordTransform(entity, Command.VECTOR_TRANSFORM_STRICT_WGS84);
|
|
entity = strictCoordTransform(entity, Command.VECTOR_TRANSFORM_STRICT_WGS84);
|
|
}
|
|
}
|
|
|
|
|
|
-// } else if (0 == isJudge){
|
|
|
|
- } else if (TypeCode.COORD_WGS84.equals(entity.getCoordType())){
|
|
|
|
|
|
+ } else if (TypeCode.COORD_WGS84.equals(entity.getCoordType())) {
|
|
// 不转换坐标 把文件信息移动到CoordStrictPath 这路径下
|
|
// 不转换坐标 把文件信息移动到CoordStrictPath 这路径下
|
|
log.info("not to transform");
|
|
log.info("not to transform");
|
|
|
|
|
|
@@ -312,6 +328,52 @@ public class VectorController {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
|
|
+ public class VectorSliceThread implements Runnable {
|
|
|
|
+
|
|
|
|
+ private BlockingQueue<MyQueue> queue;
|
|
|
|
+
|
|
|
|
+ public VectorSliceThread(BlockingQueue<MyQueue> queue) {
|
|
|
|
+ this.queue = queue;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public void run() {
|
|
|
|
+ log.warn("run SliceVectorThread");
|
|
|
|
+
|
|
|
|
+ while (true) {
|
|
|
|
+ try {
|
|
|
|
+ MyQueue data = queue.poll(2, TimeUnit.SECONDS);
|
|
|
|
+ if (data != null) {
|
|
|
|
+ log.info("vector consume data:" + data.toString());
|
|
|
|
+
|
|
|
|
+ OutputFileEntity entity = data.getOutputFile();
|
|
|
|
+ log.info("slice cmd: {}", data.getStr());
|
|
|
|
+ Integer integer = vectorServer.cmdSlice(data.getStr(), entity);
|
|
|
|
+ log.info("slice test 1");
|
|
|
|
+ if (integer != 0) {
|
|
|
|
+ log.info("error command exeCmdVectorSlice");
|
|
|
|
+ // 如果命令运行失败,状态改为0
|
|
|
|
+ entity.setStatus(0);
|
|
|
|
+ entity.setUpdateTime(new Date());
|
|
|
|
+ vectorServer.save(entity);
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ // 切片完成,修改完成状态
|
|
|
|
+ entity.setStatus(5);
|
|
|
|
+ entity.setUpdateTime(new Date());
|
|
|
|
+ entity = vectorServer.save(entity);
|
|
|
|
+ log.info("entity: {}", entity.toString());
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ log.error("error consume queue vector SliceConsumerThread: {}", e);
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
@ApiOperation("矢量数据转geojson")
|
|
@ApiOperation("矢量数据转geojson")
|
|
@GetMapping("command/geojson/{fileId}/")
|
|
@GetMapping("command/geojson/{fileId}/")
|
|
private R cmdGeojson(@PathVariable("fileId") Long fileId) {
|
|
private R cmdGeojson(@PathVariable("fileId") Long fileId) {
|
|
@@ -323,7 +385,7 @@ public class VectorController {
|
|
|
|
|
|
String outPath = OUTPUT_FILE_PATH + "geojson" + File.separator + entity.getDirectory();
|
|
String outPath = OUTPUT_FILE_PATH + "geojson" + File.separator + entity.getDirectory();
|
|
FileUtils.createDir(outPath);
|
|
FileUtils.createDir(outPath);
|
|
- outPath = outPath +File.separator + fileName + ".json";
|
|
|
|
|
|
+ outPath = outPath + File.separator + fileName + ".json";
|
|
|
|
|
|
String cmd = Command.VECTOR_TO_GEOJSON;
|
|
String cmd = Command.VECTOR_TO_GEOJSON;
|
|
if (entity.getCoordStrictPath() != null) {
|
|
if (entity.getCoordStrictPath() != null) {
|
|
@@ -351,14 +413,14 @@ public class VectorController {
|
|
|
|
|
|
@ApiOperation("矢量数据切片")
|
|
@ApiOperation("矢量数据切片")
|
|
@GetMapping("command/slice/{fileId}/{layerMin}/{layerMax}/")
|
|
@GetMapping("command/slice/{fileId}/{layerMin}/{layerMax}/")
|
|
- private R cmdSlice (@PathVariable("fileId") Long fileId, @PathVariable("layerMin") String layerMin, @PathVariable("layerMax") String layerMax) {
|
|
|
|
|
|
+ private R cmdSlice(@PathVariable("fileId") Long fileId, @PathVariable("layerMin") String layerMin, @PathVariable("layerMax") String layerMax) {
|
|
log.info("run cmdSlice: {}", fileId);
|
|
log.info("run cmdSlice: {}", fileId);
|
|
|
|
|
|
- if (!RegexUtils.regexInt(layerMin)){
|
|
|
|
- return new R(50010, MsgCode.E50010) ;
|
|
|
|
|
|
+ if (!RegexUtils.regexInt(layerMin)) {
|
|
|
|
+ return new R(50010, MsgCode.E50010);
|
|
}
|
|
}
|
|
- if (!RegexUtils.regexInt(layerMax)){
|
|
|
|
- return new R(50010, MsgCode.E50010) ;
|
|
|
|
|
|
+ if (!RegexUtils.regexInt(layerMax)) {
|
|
|
|
+ return new R(50010, MsgCode.E50010);
|
|
}
|
|
}
|
|
|
|
|
|
OutputFileEntity entity = vectorServer.findById(fileId);
|
|
OutputFileEntity entity = vectorServer.findById(fileId);
|
|
@@ -373,19 +435,34 @@ public class VectorController {
|
|
cmd = cmd.replace("@layerMax", layerMax);
|
|
cmd = cmd.replace("@layerMax", layerMax);
|
|
log.info("cmd: {}", cmd);
|
|
log.info("cmd: {}", cmd);
|
|
|
|
|
|
-
|
|
|
|
- Integer integer = cmdServer.exeCmdInt(cmd);
|
|
|
|
- if (integer != 0) {
|
|
|
|
- return new R(50005, MsgCode.E50005);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
entity.setSlicePath(outPath);
|
|
entity.setSlicePath(outPath);
|
|
entity.setUpdateTime(new Date());
|
|
entity.setUpdateTime(new Date());
|
|
- entity.setStatus(5);
|
|
|
|
|
|
+ // 6:切片中
|
|
|
|
+ entity.setStatus(6);
|
|
entity.setLayerMin(Integer.valueOf(layerMin));
|
|
entity.setLayerMin(Integer.valueOf(layerMin));
|
|
entity.setLayerMax(Integer.valueOf(layerMax));
|
|
entity.setLayerMax(Integer.valueOf(layerMax));
|
|
entity = vectorServer.save(entity);
|
|
entity = vectorServer.save(entity);
|
|
|
|
|
|
|
|
+ // 把数据放入队列中
|
|
|
|
+ MyQueue data = new MyQueue();
|
|
|
|
+ data.setOutputFile(entity);
|
|
|
|
+ data.setStr(cmd);
|
|
|
|
+ try {
|
|
|
|
+ vectorSliceQueue.offer(data, 1, TimeUnit.SECONDS);
|
|
|
|
+ log.info("vector slice 入队成功");
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ log.error("error producer queue raster cmdSlice: {}", e);
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return new R(200, entity);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ @ApiOperation("矢量数据进度查询")
|
|
|
|
+ @GetMapping("progress/{fileId}/")
|
|
|
|
+ private R getProgress(@PathVariable("fileId") Long fileId) {
|
|
|
|
+ OutputFileEntity entity = vectorServer.findById(fileId);
|
|
return new R(200, entity);
|
|
return new R(200, entity);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -412,11 +489,10 @@ public class VectorController {
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
/**
|
|
/**
|
|
* 普通坐标转换
|
|
* 普通坐标转换
|
|
*/
|
|
*/
|
|
- private OutputFileEntity generalCoordTransform(OutputFileEntity entity, String cmd){
|
|
|
|
|
|
+ private OutputFileEntity generalCoordTransform(OutputFileEntity entity, String cmd) {
|
|
|
|
|
|
String directory = createDirectory(entity);
|
|
String directory = createDirectory(entity);
|
|
directory = directory + File.separator + entity.getFileName();
|
|
directory = directory + File.separator + entity.getFileName();
|
|
@@ -424,19 +500,18 @@ public class VectorController {
|
|
cmd = cmd.replace("@inputFile", entity.getUploadPath());
|
|
cmd = cmd.replace("@inputFile", entity.getUploadPath());
|
|
cmd = cmd.replace("@outputFile", directory);
|
|
cmd = cmd.replace("@outputFile", directory);
|
|
log.info("cmd: {}", cmd);
|
|
log.info("cmd: {}", cmd);
|
|
- return runCmd(cmd, entity, null, directory);
|
|
|
|
|
|
+ return runCmd(cmd, entity, null, directory);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
// 严格坐标转换
|
|
// 严格坐标转换
|
|
- private OutputFileEntity strictCoordTransform(OutputFileEntity entity, String cmd){
|
|
|
|
|
|
+ private OutputFileEntity strictCoordTransform(OutputFileEntity entity, String cmd) {
|
|
|
|
|
|
String directory = createDirectory(entity);
|
|
String directory = createDirectory(entity);
|
|
directory = directory + File.separator + entity.getFileName();
|
|
directory = directory + File.separator + entity.getFileName();
|
|
String coord = entity.getCoord();
|
|
String coord = entity.getCoord();
|
|
- coord = coord.replace("[","");
|
|
|
|
- coord = coord.replace("]","");
|
|
|
|
|
|
+ coord = coord.replace("[", "");
|
|
|
|
+ coord = coord.replace("]", "");
|
|
// 去空格
|
|
// 去空格
|
|
coord = StringUtils.deleteWhitespace(coord);
|
|
coord = StringUtils.deleteWhitespace(coord);
|
|
|
|
|
|
@@ -445,18 +520,18 @@ public class VectorController {
|
|
cmd = cmd.replace("@outputFile", directory);
|
|
cmd = cmd.replace("@outputFile", directory);
|
|
log.info("cmd: {}", cmd);
|
|
log.info("cmd: {}", cmd);
|
|
|
|
|
|
- return runCmd(cmd, entity, null, directory);
|
|
|
|
|
|
+ return runCmd(cmd, entity, null, directory);
|
|
}
|
|
}
|
|
|
|
|
|
// 创建目录
|
|
// 创建目录
|
|
- private String createDirectory(OutputFileEntity entity){
|
|
|
|
|
|
+ private String createDirectory(OutputFileEntity entity) {
|
|
String directory = OUTPUT_FILE_PATH + "transform" + File.separator + entity.getDirectory();
|
|
String directory = OUTPUT_FILE_PATH + "transform" + File.separator + entity.getDirectory();
|
|
FileUtils.createDir(directory);
|
|
FileUtils.createDir(directory);
|
|
return directory;
|
|
return directory;
|
|
}
|
|
}
|
|
|
|
|
|
// 执行命令,创建对象, 坐标转换使用
|
|
// 执行命令,创建对象, 坐标转换使用
|
|
- private OutputFileEntity runCmd(String cmd, OutputFileEntity entity, String generalPath, String strictPath){
|
|
|
|
|
|
+ private OutputFileEntity runCmd(String cmd, OutputFileEntity entity, String generalPath, String strictPath) {
|
|
Integer integer = cmdServer.exeCmdInt(cmd);
|
|
Integer integer = cmdServer.exeCmdInt(cmd);
|
|
// 转换坐标失败, 修改状态
|
|
// 转换坐标失败, 修改状态
|
|
if (integer != 0) {
|
|
if (integer != 0) {
|