合并转换坐标4326

This commit is contained in:
cs 2025-06-13 12:17:01 +08:00
parent 68d510ead6
commit 57acd8b207
9 changed files with 97 additions and 1 deletions

8
.idea/.gitignore generated vendored Normal file
View File

@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

12
.idea/UAV_docker.iml generated Normal file
View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="jdk" jdkName="uav (2)" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="PyDocumentationSettings">
<option name="format" value="PLAIN" />
<option name="myDocStringFormat" value="Plain" />
</component>
</module>

View File

@ -0,0 +1,45 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="PyPackageRequirementsInspection" enabled="true" level="WARNING" enabled_by_default="true">
<option name="ignoredPackages">
<value>
<list size="25">
<item index="0" class="java.lang.String" itemvalue="geopy" />
<item index="1" class="java.lang.String" itemvalue="scipy" />
<item index="2" class="java.lang.String" itemvalue="tornado" />
<item index="3" class="java.lang.String" itemvalue="h5py" />
<item index="4" class="java.lang.String" itemvalue="scikit_learn" />
<item index="5" class="java.lang.String" itemvalue="basemap" />
<item index="6" class="java.lang.String" itemvalue="minio" />
<item index="7" class="java.lang.String" itemvalue="torch" />
<item index="8" class="java.lang.String" itemvalue="numpy" />
<item index="9" class="java.lang.String" itemvalue="mpld3" />
<item index="10" class="java.lang.String" itemvalue="pyyaml" />
<item index="11" class="java.lang.String" itemvalue="basemap_data" />
<item index="12" class="java.lang.String" itemvalue="matplotlib" />
<item index="13" class="java.lang.String" itemvalue="basemap_data_hires" />
<item index="14" class="java.lang.String" itemvalue="openpyxl" />
<item index="15" class="java.lang.String" itemvalue="pandas" />
<item index="16" class="java.lang.String" itemvalue="clickhouse_driver" />
<item index="17" class="java.lang.String" itemvalue="pytz" />
<item index="18" class="java.lang.String" itemvalue="tqdm" />
<item index="19" class="java.lang.String" itemvalue="pyinstaller" />
<item index="20" class="java.lang.String" itemvalue="fiona" />
<item index="21" class="java.lang.String" itemvalue="edt" />
<item index="22" class="java.lang.String" itemvalue="opencv-python" />
<item index="23" class="java.lang.String" itemvalue="pyproj" />
<item index="24" class="java.lang.String" itemvalue="psutil" />
</list>
</value>
</option>
</inspection_tool>
<inspection_tool class="PyUnresolvedReferencesInspection" enabled="true" level="WARNING" enabled_by_default="true">
<option name="ignoredIdentifiers">
<list>
<option value="matrix_factorization.svd.*" />
</list>
</option>
</inspection_tool>
</profile>
</component>

View File

@ -0,0 +1,6 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>

7
.idea/misc.xml generated Normal file
View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Black">
<option name="sdkName" value="uav (2)" />
</component>
<component name="ProjectRootManager" version="2" project-jdk-name="uav (2)" project-jdk-type="Python SDK" />
</project>

8
.idea/modules.xml generated Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/UAV_docker.iml" filepath="$PROJECT_DIR$/.idea/UAV_docker.iml" />
</modules>
</component>
</project>

6
.idea/vcs.xml generated Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

View File

@ -8,12 +8,13 @@ import fiona
from edt import edt from edt import edt
import numpy as np import numpy as np
import math import math
from post_pro.trans_orthophoto import TransOrthophoto
class MergeTif: class MergeTif:
def __init__(self, output_dir: str): def __init__(self, output_dir: str):
self.output_dir = output_dir self.output_dir = output_dir
self.logger = logging.getLogger('UAV_Preprocess.MergeTif') self.logger = logging.getLogger('UAV_Preprocess.MergeTif')
self.trans_orthophoto = TransOrthophoto()
def merge_orthophoto(self, grid_lt): def merge_orthophoto(self, grid_lt):
"""合并网格的正射影像""" """合并网格的正射影像"""
@ -53,6 +54,9 @@ class MergeTif:
self.output_dir, "orthophoto.tif"), orthophoto_vars) self.output_dir, "orthophoto.tif"), orthophoto_vars)
self.logger.info("所有产品合并完成") self.logger.info("所有产品合并完成")
self.trans_orthophoto.trans_to_epsg4326(os.path.join(self.output_dir, "orthophoto.tif"), os.path.join(
self.output_dir, "orthophoto_epsg4326.tif"))
except Exception as e: except Exception as e:
self.logger.error(f"产品合并过程中发生错误: {str(e)}", exc_info=True) self.logger.error(f"产品合并过程中发生错误: {str(e)}", exc_info=True)
raise raise