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

你可能感兴趣的:(gdal生成tiff)