<br><br><div class="gmail_quote">On Mon, Nov 21, 2011 at 12:00 PM, Tom van Tilburg <span dir="ltr"><<a href="mailto:tom.van.tilburg@gmail.com">tom.van.tilburg@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi List,<br>
<br>
Can someone confirm wether I'm doing this wrong or the ST_MapAlgebraExpr is doing it wrong:<br>
I have two overlapping rasters that I want to add to eachother. The non-overlapping parts should be included as well and therefore I use 'UNION' in the ST_MapalgebraExpr function.<br><br></blockquote><div><br>Ummm, what exactly is the value of "NODATA" + rast2, or rast1 + "NODATA", in those non-overlapping parts? NODATA is not zero. We should be propagating NODATA thru expressions like IEEE754 (and hence most floating point hardware, and Java, and Python, and ...) propagates NaN's. Likewise, "SELECT NULL + 2;" in postgres (and all SQL servers) will return NULL. Is this what you expect to see out there in the non-common regions, or are you expecting a different result? <br>
<br>"Intersection" is the only useful unambiguous thing you can do to combine two rasters using a two-raster expression. The only possible impact of specifying Union is that you get a bigger raster result filled with more NODATAs. The size of the non-NODATA region should not be affected.<br>
<br>Now, having expounded on what I think should be happening, let me hedge a little by saying I don't really know what we're actually doing. :) <br><br>Bryce<br></div></div>