<div dir="ltr"><div>Hello,</div><div><br></div><div>It looks like Float16 support is broken in Postgis 3.7.0.</div><div><br></div><div><b>OS/Version Information:</b></div><div><br></div><div>OS Ubuntu 24.04.5 </div><div>Postgis version: 3.7.0</div><div>GDAL: 3.13</div><div><br></div><div>$: raster2pgsql<br>RELEASE: 3.7.0 GDAL_VERSION=31303 (1fdbb1c)<br><br></div><div><b>Issue:</b></div><div><br></div><div><div>It looks like raster2pgsql still cannot ingest rasters with the "float16" data type. This was supposedly fixed in <a href="https://trac.osgeo.org/postgis/ticket/5941">https://trac.osgeo.org/postgis/ticket/5941</a>.</div><br></div><div><br></div><div><b>Reproduction Steps:</b></div><div><b><br></b></div><div><i># Convert any Float32 or Float62 raster into float 16 using gdal_translate</i></div><div>gdal_translate -ot float16 out.tif out2.tif<br>Input file size is 2345, 1597<br>0...10...20...30...40...50...60...70...80...90...100 - done.</div><div><br>$ raster2pgsql out2.tif<br>Processing 1/1: out2.tif<br>ERROR: rt_pixtype_size: Unknown pixeltype 13<br>ERROR: rt_raster_from_gdal_dataset: Unknown pixel type for GDAL band<br>ERROR: convert_raster: Could not convert VRT dataset to PostGIS raster<br>ERROR: process_rasters: Could not process raster: out2.tif<br>ERROR: Unable to process rasters</div><div><br></div><div><b>More info:</b></div><div><br></div><div>I believe the issue might be here: <a href="https://github.com/postgis/postgis/blob/1fdbb1c/raster/rt_core/rt_util.c#L274">https://github.com/postgis/postgis/blob/1fdbb1c/raster/rt_core/rt_util.c#L274</a> - It looks like "GDT_Float16" is an enum constant, not a preprocessor macro so this check to include Float16 support will always resolve to False. I could be wrong, not super familiar with C. </div><div><br></div><div>Let me know if you need more information.</div><div><br></div><div>Best,</div><div>- Colin</div><div><br></div><div><br></div><div><br></div></div>