|
@@ -142,22 +142,18 @@ public class OBJToGLBUtil {
|
|
|
}
|
|
|
|
|
|
public static File lasOrPlyToBin(File srcFile) throws IOException {
|
|
|
- String mntPath = srcFile.getPath().replace(FilePath.LOCAL_BASE_PATH,FilePath.MNT_BASE_PATH);
|
|
|
- String mntPathEmt = srcFile.getParent().replace(FilePath.LOCAL_BASE_PATH,FilePath.MNT_BASE_PATH)+"/res";
|
|
|
- File file = new File(mntPathEmt);
|
|
|
- if(!file.exists()){
|
|
|
- file.mkdirs();
|
|
|
+ if(!srcFile.exists()){
|
|
|
+ srcFile.mkdirs();
|
|
|
}
|
|
|
- FileUtil.copy(srcFile.getPath(),mntPath,true);
|
|
|
String cmd = ShellUtil.LAS_TO_BIN;
|
|
|
- cmd = cmd.replace("@inPath",mntPath);
|
|
|
- cmd = cmd.replace("@outPath",mntPathEmt);
|
|
|
+ cmd = cmd.replace("@inPath",srcFile.getPath());
|
|
|
+ cmd = cmd.replace("@outPath",srcFile.getParentFile().getPath());
|
|
|
ShellUtil.execCmd(cmd);
|
|
|
log.info("lasOrPlyToBin---------cmd-over");
|
|
|
- String cloudJs = mntPathEmt +"/webcloud/"+ "cloud.js";
|
|
|
+ String cloudJs = srcFile.getParentFile().getPath() +"/webcloud/"+ "cloud.js";
|
|
|
JSONObject jsonObject = ShellUtil.fixCloud(cloudJs);
|
|
|
- FileWriterUtil.writerJson(mntPathEmt +"/webcloud/","cloud.js",jsonObject.toJSONString());
|
|
|
- return file;
|
|
|
+ FileWriterUtil.writerJson(srcFile.getParentFile().getPath() +"/webcloud/","cloud.js",jsonObject.toJSONString());
|
|
|
+ return srcFile.getParentFile();
|
|
|
}
|
|
|
|
|
|
public static String OsgbToB3dm(File objPathFile) {
|