4
用Python在栅格上对点数据进行双线性插值?
我有一个栅格,想要对它进行点插值。这是我的位置: from osgeo import gdal from numpy import array # Read raster source = gdal.Open('my_raster.tif') nx, ny = source.RasterXSize, source.RasterYSize gt = source.GetGeoTransform() band_array = source.GetRasterBand(1).ReadAsArray() # Close raster source = None # Compute mid-point grid spacings ax = array([gt[0] + ix*gt[1] + gt[1]/2.0 for ix in range(nx)]) ay = …