Wechat: yu389741| Email: gisdqy@163.com

Shop:https://www.giserdqy.com/shop

gdal生成tiff


dst_ds = gdal.GetDriverByName('GTiff').Create("hello.tif", 512, 512, 1, gdal.GDT_CFloat32)
dst_ds.SetGeoTransform([444720, 30, 0, 3751320, 0, -30])
raster = numpy.zeros((512, 512), dtype=numpy.float32)
dst_ds.GetRasterBand(1).WriteArray(raster)
# Once we're done, close properly the dataset
dst_ds = None

转载自:https://blog.csdn.net/herogui/article/details/79766980