[postgis-users] Changing band pixel type

Pierre Racine Pierre.Racine at sbf.ulaval.ca
Mon Apr 30 06:33:56 PDT 2012

CREATE TABLE newrasttable AS
SELECT ST_MapAlgebraExpr(rast, '8BUI', '[rast]') rast
FROM oldrasttable


> -----Original Message-----
> From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-
> bounces at postgis.refractions.net] On Behalf Of George Washington
> Sent: Monday, April 30, 2012 7:33 AM
> To: postgis-users at postgis.refractions.net
> Subject: [postgis-users] Changing band pixel type
> Hi, I imported a raster image in postgis 2.0 (Win 7) and it shows a pixel type of
> 32BF, an overkill for my needs.
> Is there a way of changing the pixel type to, say, 8BUI or 16BUI? I found
> st_bandpixeltype to access the type, but not yet a way to set it.
> Many thanks

More information about the postgis-users mailing list