[postgis-devel] ST_MapAlgebraExpr: Wrong output for Y-data with 'UNION'

Pierre Racine Pierre.Racine at sbf.ulaval.ca
Mon Nov 21 09:25:24 PST 2011


> 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?
> 
> "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.
> 
> 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. :)

Just read the specifications:

http://trac.osgeo.org/postgis/wiki/WKTRaster/SpecificationWorking03

Pierre



More information about the postgis-devel mailing list