> -----Original Message-----
> From: postgis-users-boun...@postgis.refractions.net [mailto:postgis-users-
> boun...@postgis.refractions.net] On Behalf Of JamesH
> Sent: Monday, April 02, 2012 11:12 AM
> To: postgis-users@postgis.refractions.net
> Subject: Re: [postgis-users] ST_Slope
> 
> Ok I'm trying OpenJump as I need to get going with this for my dissertation.
> 
> Now I'm connected to the datastore, I am trying to run the following query:
> 
> SELECT ST_AsBinary(rast), slope
> FROM (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
>         ); AS foo

To display your slope raster in OpenJump:

SELECT ST_AsBinary((gv).geom), (gv).val
FROM (SELECT 
ST_DumpAsPolygons(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)) gv
      FROM nclheights 
        ) foo

Pierre
_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to