Skip to content

Commit 66cb49c

Browse files
committed
Bugfixes
1 parent ec986bd commit 66cb49c

File tree

4 files changed

+3550
-1
lines changed

4 files changed

+3550
-1
lines changed

tools/code/F3/merge_utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,10 @@ def merge_tifs(subdir_path):
3434
bands = src_ds.RasterCount
3535
projection = src_ds.GetProjection()
3636
geotransform = src_ds.GetGeoTransform()
37+
data_type = src_ds.GetRasterBand(1).DataType # Get data type from source
3738

3839
# Create output file with nodata=0
39-
dst_ds = driver.Create(output_file, cols, rows, bands, gdal.GDT_Float32,
40+
dst_ds = driver.Create(output_file, cols, rows, bands, data_type,
4041
options=['COMPRESS=DEFLATE', 'PREDICTOR=2', 'ZLEVEL=9'])
4142
dst_ds.SetProjection(projection)
4243
dst_ds.SetGeoTransform(geotransform)

0 commit comments

Comments
 (0)