Ticket #1316 (closed defect: fixed)
[raster] Invalid band number makes ST_MapAlgebraExpr for 2 rasters to crash
| Reported by: | pracine | Owned by: | dustymugs |
|---|---|---|---|
| Priority: | medium | Milestone: | PostGIS 2.0.0 |
| Component: | raster | Version: | trunk |
| Keywords: | Cc: |
Description
This works:
SELECT ST_MapAlgebraExpr(ST_AddBand(ST_MakeEmptyRaster(4, 4, 0, 0, 1, 1, 0, 0, -1), '32BF'::text, 6, -1), 1,
ST_AddBand(ST_MakeEmptyRaster(4, 4, 0, 0, 1, 1, 0, 0, -1), '32BF'::text, 4, -1), 1,
'rast1 + rast2'::text,
NULL::text,
'UNION'::text,
NULL::text,
NULL::text,
NULL::double precision);
but this crashes:
SELECT ST_MapAlgebraExpr(ST_AddBand(ST_MakeEmptyRaster(4, 4, 0, 0, 1, 1, 0, 0, -1), '32BF'::text, 6, -1), 1,
ST_AddBand(ST_MakeEmptyRaster(4, 4, 0, 0, 1, 1, 0, 0, -1), '32BF'::text, 4, -1), 2,
'rast1 + rast2'::text,
NULL::text,
'UNION'::text,
NULL::text,
NULL::text,
NULL::double precision);
the only difference is a refer to a non existing band number in the second case.
Change History
Note: See
TracTickets for help on using
tickets.
