CmdConstant.java 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. package com.fdkankan.scene.constant;
  2. import jdk.nashorn.internal.ir.LexicalContext;
  3. /**
  4. * Created by owen on 2020/12/31 0031 14:22
  5. */
  6. public class CmdConstant {
  7. /**
  8. * ossUtil上传目录
  9. * ./ossutil cp -r localfolder/ oss://examplebucket/desfolder/
  10. * opt/ossutil/ossutil64 cp -r /root/owen/720yun/vtour/ oss://oss-xiaoan/720yun_fd_manage/
  11. *
  12. */
  13. // public final static String OSSUTIL_UPLOAD_DIR = "/opt/ossutil/ossutil64 cp -r /mnt/720yun_fd_manage_data/@sceneCode oss://oss-xiaoan/720yun_fd_manage/@sceneCode";
  14. /**
  15. * 用脚本的好处会自动结束线程, java直接跑命令容易出问题
  16. * 调用oss上传目录脚本
  17. * bash /opt/ossutil/ossupload.sh @dir @ossDir
  18. * bash /opt/ossutil/ossupload.sh /mnt/720yun_fd_manage_data/fd720_1A4Tba8mA 720yun_fd_manage/fd720_1A4Tba8mA
  19. *
  20. * @uploadDir :服务器资源目录
  21. * @target oss目录名字
  22. * @mergeCode 合并的场景码
  23. */
  24. // public final static String OSSUTIL_UPLOAD_DIR = "bash /opt/ossutil/ossupload.sh /mnt/720yun_fd_manage_data/@sceneCode 720yun_fd_manage/@sceneCode";
  25. // public final static String OSSUTIL_UPLOAD_DIR_CHUNK = "bash /root/user/java/jar_run/ossupload.sh @uploadDir data/@sceneCode/data/chunk1/@target";
  26. // 2021-08-26 - chunk1 -> 改场景码
  27. public final static String OSSUTIL_UPLOAD_DIR_CHUNK = "bash /opt/ossutil/ossupload.sh @uploadDir @defaultFolder/@sceneCode/data/@mergeCode/@target";
  28. public final static String OSSUTIL_UPLOAD_DIR = "bash /opt/ossutil/ossupload.sh @uploadDir @target";
  29. public final static String OSSUTIL_RM_DIR = "bash /root/user/java/jar_run/ossrm.sh @target";
  30. public final static String MINIO_OSSUTIL_UPLOAD_DIR_CHUNK = "bash /opt/ossutil/minioupload.sh @uploadDir @defaultFolder/@sceneCode/data/@mergeCode/";
  31. // MINIO 上传文件夹命令
  32. public final static String MINIO_UTIL_UPLOAD_DIR = "bash /opt/ossutil/minioupload.sh @uploadDir/ @target";
  33. public final static String MINIO_UTIL_RM_DIR = "bash /opt/ossutil/miniorm.sh @target";
  34. /**
  35. * 2021-08-17
  36. * 剪切模型命令, 这个需要在nas共享目录, 测试服务器,跟算法服务器是分开的
  37. * bash /home/ubuntu/bin/PotreeConverter.sh /mnt/data/00001002/872819408496492544/74ee2a39e656_202108051135248650/results/laserData/laser.las
  38. * /mnt/data/00001002/872819408496492544/74ee2a39e656_202108051135248650/results/laserData/indoor_cut.las
  39. * /mnt/data/00001002/872819408496492544/74ee2a39e656_202108051135248650/results/laserData/cut_param.json
  40. * bash /home/ubuntu/bin/PotreeConverter.sh inPath outPath inCutParam;
  41. */
  42. public final static String CUT_MODEL = "bash /home/ubuntu/bin/PotreeConverter.sh @inPath @outPath @cutParam";
  43. /**
  44. * ossUtil下载目录
  45. *
  46. * @downloadDir oss需要下载的目录
  47. * @target 服务器存放位置(会把当前目录也下载)
  48. */
  49. public final static String OSSUTIL_DOWNLOAD_DIR = "bash /root/user/java/jar_run/ossdownload.sh @downloadDir @target";
  50. public final static String RM_Folder = "rm -rf @Folder";
  51. public final static String RM_Folder_WIN = "rmdir @Folder /s";
  52. public final static String MV_Folder = "mv -f @Folder @Target";
  53. public final static String MV_Folder_WIN = "move /y @Folder @Target";
  54. public final static String CP_Folder = "cp -r -f @Folder @Target";
  55. public final static String CP_Folder_WIN = "xcopy /y /s /f /h @Folder @Target";
  56. public final static String MK_LINK_DIR = "sudo ln -s /J @Target @Link";
  57. public final static String MK_LINK_DIR_WIN = "mklink /J @Link @Target";
  58. public final static String MK_LINK_FILE = "sudo ln @Target @Link";
  59. public final static String MK_LINK_FILE_WIN = "mklink /H @Link @Target";
  60. public final static String OBJ_TO_GLB = "obj2gltf @inPath @outPath";
  61. public final static String OBJ_TO_GLB_WIN = "objtoglb.exe @inPath @outPath";
  62. /**
  63. * zip merge_cut.zip merge_cut.las
  64. **/
  65. public final static String ZIP = "cd @path && zip -r @target @inPath";
  66. /**
  67. * 2021-09-23
  68. * 英达:多数据集模型剪切
  69. * bash /home/ubuntu/bin/PotreeConverter.sh "" xxx/xxx.las xxx/merge_cut_param.json"
  70. * 三个参数,合并裁剪的,第一个参数为空字符串"", 第二个是输出.las路径,第三个是merge_cut_param.json文件路径
  71. * outPath: 是输出.las路径
  72. * inPath: merge_cut_param.json文件路径
  73. */
  74. public final static String MERGE_CUT_MODEL = "bash /home/ubuntu/bin/PotreeConverter.sh cut @outPath @inPath";
  75. public final static String MERGE_CUT_MODEL_WIN = "PotreeConverter.bat cut @outPath @inPath";
  76. /**
  77. * 2022年3月26日15:58:37
  78. * 英达:点云文件坐标转换
  79. *
  80. * @param json文件路径 @inPath 输入las模型路径 @outPath 输出las模型路径
  81. */
  82. public final static String CONVERTER_ADD_GEO = "bash /home/ubuntu/bin/PotreeConverter.sh @param @inPath @outPath ";
  83. public final static String CONVERTER_ADD_GEO_WIN = "PotreeConverter.bat @param @inPath @outPath ";
  84. //生成模型的命令
  85. public static final String BUILD_MODEL_COMMAND = "bash /home/ubuntu/bin/Launcher.sh @inPath";
  86. public static final String BUILD_MODEL_COMMAND_WIN = "Launcher.bat @inPath";
  87. public static final String BUILD_3DTILES_MODEL_COMMAND_WIN = "Obj2Tiles.bat @inPath";
  88. //生成模型的命令
  89. public static final String KILL_BUILD_MODEL_COMMAND = "ps -ef | grep MainLoader.exe | grep -v grep | awk '{print $2}' | xargs kill -9";
  90. public static final String KILL_BUILD_MODEL_COMMAND_WIN = "taskkill /f /im MainLoader.exe";
  91. public static final String AUTH_LICENSE_WIN = "Launcher.bat @inPath";
  92. /**
  93. * 2021-09-24
  94. * 世超: 平面图切图
  95. * 需要参数:
  96. * 工作目录
  97. * data.json -> {"split_type":"SPLIT_V15","skybox_type":"SKYBOX_V5"}
  98. * extras
  99. * info.json
  100. * xxx.png
  101. * bash /home/ubuntu/bin/Launcher.sh ${工作路径}
  102. */
  103. public final static String TILED_MAP = "bash /home/ubuntu/bin/Laser-Launcher.sh @inPath";
  104. public final static String TILED_MAP_WIN = "Launcher.bat @inPath";
  105. /**
  106. * las to bin
  107. * bash PotreeConverter_webcloud_bin.sh /mnt/data/00001050/933817767755251712/00001050_202201202011578010_laserData/cloud_extras/point.las
  108. * /mnt/data/00001050/933817767755251712/00001050_202201202011578010_laserData/cloud_extras
  109. */
  110. public final static String LAS_TO_BIN = "bash /home/ubuntu/bin/PotreeConverter.sh @inPath @outPath ''";
  111. public final static String LAS_TO_BIN_WIN = "PotreeConverter.bat @inPath @outPath ''";
  112. /***
  113. * # 模型检查 check 路径 输出json {"check_result":"0","model_path":"add_geo.las"} 0/1 模型正确是1,模型不正确是0
  114. */
  115. public final static String CHECK_LASER = "bash /home/ubuntu/bin/PotreeConverter.sh check @inPath @outPath";
  116. public final static String CHECK_LASER_WIN = "PotreeConverter.bat check @inPath @outPath";
  117. public final static String OBJ2_TILES ="bash /home/ubuntu/bin/Obj2Tiles.sh @inPath";
  118. public final static String OBJ2_TILES_WIN ="Obj2Tiles.bat @inPath";
  119. }