|
@@ -280,6 +280,8 @@ public class BuildSceneServiceImpl implements IBuildSceneService {
|
|
//上传全景图俯视图
|
|
//上传全景图俯视图
|
|
this.uploadFloorCad(path, sceneCode, uploadFiles);
|
|
this.uploadFloorCad(path, sceneCode, uploadFiles);
|
|
|
|
|
|
|
|
+ this.uploadFreespace(sceneCode, path, uploadFiles);
|
|
|
|
+
|
|
log.info("开始上传场景计算结果数据,num:{}", sceneCode);
|
|
log.info("开始上传场景计算结果数据,num:{}", sceneCode);
|
|
//由于3dtiles算法mesh文件发生变化,所以这里需要先清除一下oss的mesh目录,避免存在旧算法obj文件
|
|
//由于3dtiles算法mesh文件发生变化,所以这里需要先清除一下oss的mesh目录,避免存在旧算法obj文件
|
|
fYunFileService.deleteFolder(String.format(UploadFilePath.DATA_VIEW_PATH, sceneCode) + "mesh");
|
|
fYunFileService.deleteFolder(String.format(UploadFilePath.DATA_VIEW_PATH, sceneCode) + "mesh");
|
|
@@ -406,24 +408,16 @@ public class BuildSceneServiceImpl implements IBuildSceneService {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-// private void cachePanorama(String dataSource, String num){
|
|
|
|
-// String cachedImagesPath = String.format(ConstantFilePath.SCENE_CACHE_IMAGES, num);
|
|
|
|
-// //将全景图缓存到缓存目录
|
|
|
|
-// List<String> imagesList = FileUtil.listFileNames(dataSource + "/caches/images");
|
|
|
|
-// //先清除旧的全景图
|
|
|
|
-// cn.hutool.core.io.FileUtil.del(cachedImagesPath);
|
|
|
|
-// String visionPath = dataSource + "/results/vision.txt";
|
|
|
|
-// List<String> panoramaImageList = SceneUtil.getPanoramaImageList(visionPath);
|
|
|
|
-// imagesList.stream().forEach(fileName -> {
|
|
|
|
-// if (panoramaImageList.contains(fileName)) {
|
|
|
|
-// String srcPath = dataSource + "/caches/images/" + fileName;
|
|
|
|
-// String targetPath = cachedImagesPath + fileName;
|
|
|
|
-// log.info("源文件:{}, 目标文件:{}", srcPath, targetPath);
|
|
|
|
-// cn.hutool.core.io.FileUtil.copy(srcPath, targetPath, true);
|
|
|
|
-// }
|
|
|
|
-// });
|
|
|
|
-// }
|
|
|
|
-
|
|
|
|
|
|
+ void uploadFreespace(String num, String path, Map<String, String> map){
|
|
|
|
+ String plyPath = path + "/result/laserData/cover/final_freespace.ply";
|
|
|
|
+ String pngPath = path + "/result/laserData/cover/final_freespace.png";
|
|
|
|
+ if(FileUtil.exist(plyPath)){
|
|
|
|
+ map.put(plyPath, String.format(UploadFilePath.IMG_VIEW_PATH, num) + FileUtil.getName(plyPath));
|
|
|
|
+ }
|
|
|
|
+ if(FileUtil.exist(pngPath)){
|
|
|
|
+ map.put(pngPath, String.format(UploadFilePath.IMG_VIEW_PATH, num) + FileUtil.getName(pngPath));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
private void uploadFloorCad(String path, String num, Map<String, String> uploadFiles){
|
|
private void uploadFloorCad(String path, String num, Map<String, String> uploadFiles){
|