[postgis-users] ST_Slope

Pierre Racine Pierre.Racine at sbf.ulaval.ca
Tue Apr 3 07:01:07 PDT 2012


> SELECT ST_AsBinary((gv).geom), (gv).val FROM (SELECT
> ST_DumpAsPolygons(ST_Slope(ST_MapAlgebraExpr(ST_AddBand(ST_MakeEmpt
> yRaster(10,
> 10, 0, 0, 0.1, 0.1, 0, 0, 4269), '8BUI'::text, 1, 0), '32BUI', '([rast.x] -
> 1) *
> 10 + [rast.y]'), 1, '8BUI'::text)) gv
>       FROM height_newcastle
>         ) foo

Well now that you got ST_Slope working you have to pass it your own raster....

SELECT ST_AsBinary((gv).geom), (gv).val 
FROM (SELECT ST_DumpAsPolygons(ST_Slope(rast) gv
FROM height_newcastle) foo



More information about the postgis-users mailing list