asc文件转出为tiff文件

抱着试试的态度在网上试了这个代码,居然成功了,主要是要注意文件夹的名称

有一批asc文件,我想转成tif作为输出。

我尝试使用gdal.BuildVRT首先构建vrt文件,然后使用gdal.Translate将vrt文件转换为geotiff。

只能说gdal实在太强大了

import os
from osgeo import gdal,osr,ogr
#import gdal
import glob
from osgeo import osr
path = './'#这里填写你自己的文件夹
os.chdir(path)
gdal.BuildVRT

你可能感兴趣的:(asc,python,gdal,python)