[postgis-users] How can i interchange(swap) the values of a band in postgis raster

Pierre Racine Pierre.Racine at sbf.ulaval.ca
Thu Feb 16 06:29:26 PST 2012


Try like this:

SELECT ST_Band(rast, ARRAY[2,1]) FROM image2tiff;

> -----Original Message-----
> From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-
> bounces at postgis.refractions.net] On Behalf Of Zelio Fernandes
> Sent: Thursday, February 16, 2012 12:45 AM
> To: postgis-users at postgis.refractions.net
> Subject: Re: [postgis-users] How can i interchange(swap) the values of a band in
> postgis raster
> 
> SELECT ST_Band(rast,2,1) FROM image2tiff;
> 
> ERROR:  function st_band(raster, integer, integer) does not exist LINE 1: SELECT
> ST_Band(rast,2,1) FROM image2tiff;
>                ^
> HINT:  No function matches the given name and argument types. You might
> need to add explicit type casts.
> 
> 
> ********** Error **********
> 
> ERROR: function st_band(raster, integer, integer) does not exist SQL state:
> 42883
> Hint: No function matches the given name and argument types. You might need
> to add explicit type casts.
> Character: 8
> 
> 
> --
> View this message in context: http://postgis.17.n6.nabble.com/How-can-i-
> interchange-swap-the-values-of-a-raster-bands-in-postgis-raster-
> tp4471437p4474862.html
> Sent from the PostGIS - User mailing list archive at Nabble.com.
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users



More information about the postgis-users mailing list