[postgis-devel] [PostGIS] #1316: [raster] Invalid band number makes ST_MapAlgebraExpr for 2 rasters to crash

PostGIS trac at osgeo.org
Mon Nov 21 11:17:38 PST 2011


#1316: [raster] Invalid band number makes ST_MapAlgebraExpr for 2 rasters to crash
----------------------------+-----------------------------------------------
 Reporter:  pracine         |       Owner:  pracine      
     Type:  defect          |      Status:  new          
 Priority:  medium          |   Milestone:  PostGIS 2.0.0
Component:  postgis raster  |     Version:  trunk        
 Keywords:                  |  
----------------------------+-----------------------------------------------
 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.

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/1316>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-devel mailing list