Ticket #1515 (closed defect: fixed)

Opened 16 months ago

Last modified 16 months ago

[raster] Optimization in ST_MapAlgebra fails

Reported by: pracine Owned by: dzwarg
Priority: medium Milestone: PostGIS 2.0.0
Component: raster Version: trunk
Keywords: Cc:

Description

When doing:

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.

Change History

Changed 16 months ago by dustymugs

  • owner changed from pracine to dzwarg

Changed 16 months ago by dustymugs

  • status changed from new to closed
  • resolution set to fixed

Fixed in r9017.

Note: See TracTickets for help on using tickets.