|
@@ -127,12 +127,17 @@ public class OBJToGLBUtil {
|
|
return file;
|
|
return file;
|
|
}
|
|
}
|
|
|
|
|
|
- public static String OsgbToB3dm(File objPathFile) {
|
|
|
|
- String dockerPath = FilePath.MNT_BASE_PATH +"b3dm";
|
|
|
|
- String cmd = ShellCmd.osgbTob3dmCmd.replaceAll("@path",dockerPath);
|
|
|
|
- cmd =cmd.replaceAll("@inputFile",objPathFile.getPath());
|
|
|
|
- cmd =cmd.replaceAll("@outputFile",dockerPath +"/"+ objPathFile.getName());
|
|
|
|
|
|
+ public static String OsgbToB3dm(File objPathFile,Integer modelId) {
|
|
|
|
+ String targetPath = FilePath.MNT_BASE_PATH +"osgb" +"/" + modelId +"/" + objPathFile.getName();
|
|
|
|
+ String sourcePath = FilePath.MNT_BASE_PATH +"b3dm" +"/" + modelId +"/" + objPathFile.getName();
|
|
|
|
+
|
|
|
|
+ //ShellUtil.execCmd("cp -r " + objPath + " " + dockerPath+ objPathFile.getName() );
|
|
|
|
+ FileUtil.copyContent(objPathFile,new File(targetPath),true);
|
|
|
|
+
|
|
|
|
+ String cmd = ShellCmd.osgbTob3dmCmd.replaceAll("@path",FilePath.MNT_BASE_PATH);
|
|
|
|
+ cmd =cmd.replaceAll("@inputFile",targetPath);
|
|
|
|
+ cmd =cmd.replaceAll("@outputFile",sourcePath);
|
|
ShellUtil.execCmd(cmd);
|
|
ShellUtil.execCmd(cmd);
|
|
- return dockerPath + objPathFile.getName();
|
|
|
|
|
|
+ return sourcePath;
|
|
}
|
|
}
|
|
}
|
|
}
|