[postgis-users] ST_Slope

Pierre Racine Pierre.Racine at sbf.ulaval.ca
Mon Apr 2 07:20:41 PDT 2012


> However when trying to export this into a new table to view in QGIS, the table
> does not have any raster geometry to it? Where am I going wrong?

What do you mean by "raster geometry"?

Just add a name to the raster:

CREATE TABLE slope AS(
SELECT 
	rid, rast, 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'::text) slope
 FROM
	nclheights
	);




More information about the postgis-users mailing list