Commit e3ddef4f authored by jay's avatar jay
Browse files

Match to raster now support n-bands

parent 812cf59b
Loading
Loading
Loading
Loading
+17 −16
Original line number Diff line number Diff line
@@ -567,7 +567,8 @@ def match_rasters(match_to, match_from, destination,
    match_from__srs = match_from.dataset.GetProjection()
    match_from__gt = match_from.geotransform

    dst = gdal.GetDriverByName('GTiff').Create(destination, width, height, 1, gdalconst.GDT_Float32)
    dst = gdal.GetDriverByName('GTiff').Create(destination, width, height, match_from.RasterCount,
                                               gdalconst.GDT_Float32)
    dst.SetGeoTransform(match_to_gt)
    dst.SetProjection(match_to_srs)