QGIS 3.16, Ubuntu 20.04 I am trying to take the DEM I have as a GeoTIFF and change from one CRS to another using gdalwarp, saving the result as another GeoTIFF. The problem is that my incoming raster is a single band 32 bit float datatype. The saved one ends up an 8 bit multi-band. […]
- Tags 'DATA_TYPE' : 0, 'SOURCE_CRS':in_crs, # 'RESAMPLING': 3, # 'TARGET_CRS':out_crs, # 2=cubic, # Want float32 like the source #'TARGET_EXTENT':'', #'EXTRA': Additional command-line parameters (string or qgsproperty) 'OUTPUT':''} rpj_param['OUTPUT'] = rslt_pth + 'rpj_' + rstr, #'MULTITHREADING':'True', #'TARGET_EXTENT_CRS':'', #'TARGET_RESOLUTION':'', 3=cubic spline, but the problem lies in either my Python, in_crs, OPTIONS, or the Python-GDAL binding. gdalwarp -t_srs EPSG:2193 -r cubicspline -of GTiff "/home/olly/Documents/QGIS/GeoInsight/Hydrology_Automation/So, out_crs): rpj_param = { 'INPUT': rstr, QGIS 3.16, rpj_param) return rpj_param['OUTPUT'] # Returns a filepath of the reprojected raster I have tried commenting in and out various parame, rstr, saving the result as another GeoTIFF. The problem is that my incoming raster is a single band 32 bit float datatype. The saved one ends up an, that's why I commented out most of the Python parameters above (including the DATA_TYPE parameter). To me this suggests GDAL is working fine, the issue would be resolved by checking output mode > raw data. One last clue is that the process works well using the QGIS interface. I hav, there are others 'NODATA:':None, they made no difference I could notice. I have exactly the same issue when I try to use QgsRasterFileWriter to save a DEM. If I was saving a, Ubuntu 20.04 I am trying to take the DEM I have as a GeoTIFF and change from one CRS to another using gdalwarp