Re: [postgis-users] MapAlgebra on three Rasters

2012-04-27 Thread Pierre Racine
> boun...@postgis.refractions.net] On Behalf Of JamesH > Sent: Wednesday, April 25, 2012 7:34 PM > To: postgis-users@postgis.refractions.net > Subject: Re: [postgis-users] MapAlgebra on three Rasters > > Sorry, I should have explained what I'm trying to do with the query. > > I&#

Re: [postgis-users] MapAlgebra on three Rasters

2012-04-26 Thread JamesH
Have resolved this MapAlgebra issue, the issue was with the slope surface, I was trying to produce as a 32BF but it needed to be 32BSI to be visible. Calculation and resample ran effectively using: CREATE TABLE Metro_location2 AS( SELECT ST_MapAlgebraExpr(ST_Resample(a.rast, b.rast), 1, b

Re: [postgis-users] MapAlgebra on three Rasters

2012-04-26 Thread JamesH
I have refined my query so that I am using MapAlgebraExpr on the normalised distance and density rasters and exporting as a new table. Then I am using a second, new MapAlgerbaExpr query with this table and the normalised slope surface. However it is returning, 'The two rasters provided do not have

Re: [postgis-users] MapAlgebra on three Rasters

2012-04-25 Thread JamesH
Sorry, I should have explained what I'm trying to do with the query. I'm taking the two rasters density and euclidean, normalising them both before multiplying normalised density by 0.5, multiplying normalised euclidean by 0.3 and then adding these together. Then I am producing a slope surface,

Re: [postgis-users] MapAlgebra on three Rasters

2012-04-25 Thread JamesH
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.6

Re: [postgis-users] MapAlgebra on three Rasters

2012-04-25 Thread Pierre Racine
refractions.net > Subject: [postgis-users] MapAlgebra on three Rasters > > Hi all, > > I have three Raster's stored in seperate tables which I am looking to > perform a weighted calculation on all three to produce a single Raster as an > output (or a visualisati

Re: [postgis-users] MapAlgebra on three Rasters

2012-04-25 Thread JamesH
Currently, I am using: CREATE TABLE map2 AS( SELECT 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', '32

[postgis-users] MapAlgebra on three Rasters

2012-04-25 Thread JamesH
Hi all, I have three Raster's stored in seperate tables which I am looking to perform a weighted calculation on all three to produce a single Raster as an output (or a visualisation through OpenJump or Quantum). The calculation I am attempting is basically: (raster1 * 0.2) + (raster2 * 0.5) + (r