Hi Pierre,

Currently I think I'm close to acheiving this.

Ran successfully this query in PostGIS:
SELECT

ST_MapAlgebraExpr(ST_MapAlgebraExpr((ST_Slope(c.rast,1,'32BF')),1,'32BF','((244-[rast])/244)::float'),1,
ST_MapAlgebraExpr(ST_MapAlgebraExpr(a.rast,1, '32BF',
'((67.6499557495117-[rast])/67.6499557495117)'), 1,
ST_MapAlgebraExpr(b.rast,1, '32BF',
'((14052.134765265-[rast])/14052.134765265)'), 1, '([rast1] * 0.5) +
([rast2] * 0.3)::float', '32BF'),1, '([rast1] * 0.2 + [rast2])::float',
'32BF')
FROM
        density a, euclidean b, example_postgis20 c

And I'm now trying to view in OpenJump using:
SELECT ST_AsBinary((gv).geom), (gv).val
FROM (SELECT
ST_DumpAsPolygons(ST_MapAlgebraExpr(ST_MapAlgebraExpr((ST_Slope(c.rast,1,'32BF')),1,'32BF','((244-[rast])/244)::float'),1,
ST_MapAlgebraExpr(ST_MapAlgebraExpr(a.rast,1, '32BF',
'((67.6499557495117-[rast])/67.6499557495117)'), 1,
ST_MapAlgebraExpr(b.rast,1, '32BF',
'((14052.134765265-[rast])/14052.134765265)'), 1, '([rast1] * 0.5) +
([rast2] * 0.3)::float', '32BF'),1, '([rast1] * 0.2 + [rast2])::float',
'32BF')) gv
FROM density a, euclidean b, example_postgis20 c) foo

Its returning as no geometry to it.
Can you see where I'm going wrong with this?
This is one of the last pieces in my dissertation.

Kind Regards,
James

-----
GIS Undergraduate
--
View this message in context: 
http://postgis.17.n6.nabble.com/MapAlgebra-on-three-Rasters-tp4917643p4918400.html
Sent from the PostGIS - User mailing list archive at Nabble.com.
_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to