我有很多栅格试图合并以生成轮廓。它们采用.bil格式,因此我知道我需要先使用gdal翻译它们,但我的尝试均无济于事。
我尝试使用gdal_translate和gdal_merge没有成功。以下是我尝试合并的两个.bils的示例。
import subprocess
import sys
import gdal
#imagea ='C:\\Users\\jeswa\\Desktop\\New folder\\N34_E\\n34_e024_1arc_v3.bil'
#imageb ='C:\\Users\\jeswa\\Desktop\\New folder\\N34_E\\n34_e025_1arc_v3.bil'
#output = 'C:\\Users\\jeswa\\Desktop\\test'
#subprocess.call(['gdal_merge', '-o', output, imagea, imageb])
Traceback (most recent call last):
File "C:\OSGEO4~1\apps\Python37\lib\code.py", line 90, in runcode
exec(code, self.locals)
File "<input>", line 1, in <module>
File "C:\OSGEO4~1\apps\Python37\lib\subprocess.py", line 304, in call
with Popen(*popenargs, **kwargs) as p:
File "C:\OSGEO4~1\apps\Python37\lib\subprocess.py", line 756, in __init__
restore_signals, start_new_session)
File "C:\OSGEO4~1\apps\Python37\lib\subprocess.py", line 1155, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified