From e160e70d25739dbacef8483d740352b40aa64781 Mon Sep 17 00:00:00 2001 From: chenzenghui <3045316072@qq.com> Date: Thu, 14 Aug 2025 22:04:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=AD=A3=E5=B0=84=E7=9A=84?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=EF=BC=8C=E8=B0=83=E6=95=B4=E4=BA=86=E5=8E=9F?= =?UTF-8?q?=E5=A7=8B=E6=96=87=E4=BB=B6=E8=A7=A3=E5=8E=8B=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ortho-NoS1GBM/OrthoMain.py | 10 ++++++++++ Ortho-NoS1GBM/OrthoMain.spec | 2 +- Ortho-NoS1GBM/config.ini | 2 +- Ortho-NoS1GBM/打包命令.txt | 6 +++++- 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/Ortho-NoS1GBM/OrthoMain.py b/Ortho-NoS1GBM/OrthoMain.py index cbeacbe..76c2a01 100644 --- a/Ortho-NoS1GBM/OrthoMain.py +++ b/Ortho-NoS1GBM/OrthoMain.py @@ -636,6 +636,11 @@ class OrthoMain: Orthorectification.preCaldem_sar_rc(dem_path,in_slc_path,self.__workspace_Temporary_path,self.__workspace_package_path.replace("\\","\\\\")) # 初步筛选坐标范围 out_dir_path = self.__workspace_package_path.replace("\\", "\\\\") # sim_ori_rpc = self.correct_sim_ori(Orthorectification, slc_paths, bsMap_merged_path, out_dir_path) + + if os.path.exists(os.path.join(out_dir_path,"RD_sim_ori.tif")): + out_sim_ori_temp=os.path.join(out_dir_path,"sim_ori-ortho.tif") + shutil.move(os.path.join(out_dir_path,"RD_sim_ori.tif"), out_sim_ori_temp) + logger.info('progress bar: 40%') # clip_dem_reample_path=os.path.join(self.__workspace_Temporary_path, "SAR_dem.tiff") # infooption=gdal.InfoOptions("-json") @@ -815,6 +820,11 @@ class OrthoMain: if __name__ == '__main__': DEBUG = config['config']['debug']# True + DEBUG = DEBUG.lower() if isinstance(DEBUG, str) else str(DEBUG) + + if DEBUG == 'true': + DEBUG=True + if '-DEBUG' in sys.argv: DEBUG=True start = datetime.datetime.now() diff --git a/Ortho-NoS1GBM/OrthoMain.spec b/Ortho-NoS1GBM/OrthoMain.spec index b9503b2..636f47e 100644 --- a/Ortho-NoS1GBM/OrthoMain.spec +++ b/Ortho-NoS1GBM/OrthoMain.spec @@ -29,7 +29,7 @@ block_cipher = None a = Analysis(['OrthoMain.py'], pathex=[], binaries=[], - datas=[('D:/Anaconda/envs/micro/Lib/site-packages/dask/dask.yaml', './dask'), ('D:/Anaconda/envs/micro/Lib/site-packages/distributed/distributed.yaml', './distributed')], + datas=[('C:/Users/30453/.conda/envs/micro/Lib/site-packages/dask/dask.yaml', './dask'), ('C:/Users/30453/.conda/envs/micro/Lib/site-packages/distributed/distributed.yaml', './distributed')], hiddenimports=['pyproj._compat'], hookspath=[], hooksconfig={}, diff --git a/Ortho-NoS1GBM/config.ini b/Ortho-NoS1GBM/config.ini index b5c0e47..b68d3c5 100644 --- a/Ortho-NoS1GBM/config.ini +++ b/Ortho-NoS1GBM/config.ini @@ -7,5 +7,5 @@ target = Ortho # 算法名称。修改临时工作区生成临时文件的名称,日志名称; exe_name = Ortho # 开启调试模式则不删除临时工作区,True:开启调试,False:不开启调试 -debug = True +debug = False diff --git a/Ortho-NoS1GBM/打包命令.txt b/Ortho-NoS1GBM/打包命令.txt index c7110f1..ed0ba30 100644 --- a/Ortho-NoS1GBM/打包命令.txt +++ b/Ortho-NoS1GBM/打包命令.txt @@ -1,4 +1,8 @@ cd E:\0test\oneOrtho һļ pyinstaller -D packing.spec -pyinstaller -F --add-data "D:/Anaconda/envs/micro/Lib/site-packages/dask/dask.yaml;./dask" --add-data "D:/Anaconda/envs/micro/Lib/site-packages/distributed/distributed.yaml;./distributed" --hidden-import pyproj._compat \ No newline at end of file +pyinstaller -F --add-data "D:/Anaconda/envs/micro/Lib/site-packages/dask/dask.yaml;./dask" --add-data "D:/Anaconda/envs/micro/Lib/site-packages/distributed/distributed.yaml;./distributed" --hidden-import pyproj._compat + + +pyinstaller -F --add-data "C:/Users/30453/.conda/envs/micro/Lib/site-packages/dask/dask.yaml;./dask" --add-data "C:/Users/30453/.conda/envs/micro/Lib/site-packages/distributed/distributed.yaml;./distributed" --hidden-import pyproj._compat +