Python读取Tifff方法汇总

记录使用python读取tiff文件所用的库
1、gdal

from osgeo import gdal
ds = gdal.Open(path)

2、rasterio

import rasterio
ds = rasterio.open(path)

3、tifffile

import tifffile
tif = tifffile.imread(path)

4、PIL

from PIL import image
tif = image.open(path)

5、OpenCV

import cv2
tif = cv2.imread(path)

6、scipy

from scipy import misc
tif = misc.imread(path)

7、libtiff

from libtiff import TIFFfile
tif = TIFFfile(path)

你可能感兴趣的:(Python,GIS,gis,python)