[postgis-users] ST_Slope

Pierre Racine Pierre.Racine at sbf.ulaval.ca
Tue Mar 6 08:03:13 PST 2012


SELECT ST_Slope(
ST_MapAlgebraExpr(ST_AddBand(ST_MakeEmptyRaster(10, 10, 0, 0, 0.1, 0.1, 0, 0, 4269), '8BUI'::text, 1, 0), '32BUI', '([rast.x] - 1) * 10 + [rast.y]')
, 1, '8BUI')

works for me.

Make sure st_slope(rast raster, band integer, pixeltype text) exsit as a function.

Pierre 

> -----Original Message-----
> From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-
> bounces at postgis.refractions.net] On Behalf Of JamesH
> Sent: Tuesday, March 06, 2012 9:08 AM
> To: postgis-users at postgis.refractions.net
> Subject: [postgis-users] ST_Slope
> 
> Hello all,
> 
> I am trying to produce a slope surface raster from a tiff.
> 
> The raster has 1 band, pixeltype is 8 bit unsigned integer but I cannot get the
> function to work.
> 
> Have tried variances of:
> 
> SELECT
>          ST_Slope(rast, 1, '8BUI') or (rast, 1, 8) FROM
>          nclraster
> 
> But PostGIS returns ERROR:  function st_slope(raster, integer, integer) does not
> exist LINE 2:  ST_Slope(rast,1,8).
> 
> Any pointers as to where I'm going wrong much appreciated
> 
> James
> 
> --
> View this message in context: http://postgis.17.n6.nabble.com/ST-Slope-
> tp4551303p4551303.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