I have saved a raster in the PostGIS database and want to select it as PNG. However, ST_AsPNG only accepts rasters with pixel type 8 BUI or 16 BUI. But in this case it is a raster with pixel type 32 BF. The only possibility I have seen so far is ST_Reclass. But you need to define a 'reclassarg' which makes it unnecessarily complicating for my usage, because I only want to change the pixel type. Does anyone know a more suitable method for this purpose?

  • Changing a 4-byte float to an integer is not a trivial change. Why not re-load the data correctly instead? – Vince Sep 9 at 14:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.