Skip to content
Snippets Groups Projects
Commit e3ddef4f authored by jay's avatar jay
Browse files

Match to raster now support n-bands

parent 812cf59b
No related branches found
No related tags found
No related merge requests found
...@@ -567,7 +567,8 @@ def match_rasters(match_to, match_from, destination, ...@@ -567,7 +567,8 @@ def match_rasters(match_to, match_from, destination,
match_from__srs = match_from.dataset.GetProjection() match_from__srs = match_from.dataset.GetProjection()
match_from__gt = match_from.geotransform 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.SetGeoTransform(match_to_gt)
dst.SetProjection(match_to_srs) dst.SetProjection(match_to_srs)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment