[postgis-users] Question: calculating the slope with PostGIS 2.0

Bborie Park bkpark at ucdavis.edu
Thu Oct 18 12:18:57 PDT 2012


Pierre,

The pixel type isn't 'Integer'.  The list of valid pixel types are:

    1BB - 1-bit boolean

    2BUI - 2-bit unsigned integer

    4BUI - 4-bit unsigned integer

    8BSI - 8-bit signed integer

    8BUI - 8-bit unsigned integer

    16BSI - 16-bit signed integer

    16BUI - 16-bit unsigned integer

    32BSI - 32-bit signed integer

    32BUI - 32-bit unsigned integer

    32BF - 32-bit float

    64BF - 64-bit float

So, you'd call ST_Slope() with something like.

SELECT ST_Slope(rast, 1, '32BUI') from Raster1;


-bborie

On 10/18/2012 12:14 PM, Pierre LACROIX wrote:
> Hi,
> 
> I would like to generate the slope from a DEM.
> The DEM is called Raster1. It has one band and holds integer values.
>>From the the SQL Editor (in the PG Admin) the following command displays
> values but does not generate an output slope raster:
> 
> SELECT ST_Slope(rast, 1,'Integer') from Raster1;
> 
> What is the syntax to generate the slope raster?
> 
> Thanks in advance.
> 
> Pierre
> 
> 
> 
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
> 

-- 
Bborie Park
Programmer
Center for Vectorborne Diseases
UC Davis
530-752-8380
bkpark at ucdavis.edu



More information about the postgis-users mailing list