Ticket #1515 (closed defect: fixed)
[raster] Optimization in ST_MapAlgebra fails
|Reported by:||pracine||Owned by:||dzwarg|
SELECT ST_MapAlgebraExpr(ST_AddBand(ST_MakeEmptyRaster(3, 3, 0, 0, 1, 1, 0, 0, -1), '32BSI'::text, 1, -1), 1, '32BF'::text, 'rast'::text)
to convert a 32BSI band to a 32BF band, RASTER_mapAlgebraExpr() fails to copy the band (this is an optimization when the map algebra expression resume to 'rast') with this notice:
NOTICE: rt_raster_copy_band: Second raster has no band.
I am pretty sure this line in rt_pg.c:
rt_raster_copy_band(raster, newrast, nband - 1, 0);
should look like:
rt_raster_copy_band(newrast, raster, nband - 1, 0);
Unfortunately I can't commit now as I still don<t have a working windows build.