[postgis-tickets] [PostGIS] #2807: [raster] ST_MapAlgebra injecting a default NODATA value of 0

PostGIS trac at osgeo.org
Thu Jul 3 10:09:45 PDT 2014


#2807: [raster] ST_MapAlgebra injecting a default NODATA value of 0
--------------------+-------------------------------------------------------
 Reporter:  strk    |       Owner:  dustymugs
     Type:  defect  |      Status:  new      
 Priority:  medium  |   Milestone:           
Component:  raster  |     Version:  trunk    
 Keywords:          |  
--------------------+-------------------------------------------------------
 Both the callback-based and the expression-based ST_MapAlgebra functions
 are setting the NODATA flag in output and a nodata value of 0, even if the
 input has no NODATA flag at all.

 This is a quick test for the expression based version:
 {{{
 select (ST_BandMetadata(ST_MapAlgebra(ST_AddBand(ST_MakeEmptyRaster(2,
 2,0,0,1.0),'8BUI',255.0), 1, '8BUI','0'))).nodatavalue;
 }}}

 And this is a quick test for the callback based version:
 {{{
 create function cb(float8[][][], int[][], text[]) returns float8 as
 'select 1::float8' language 'sql';
 select (ST_BandMetadata(ST_MapAlgebra(ST_AddBand(ST_MakeEmptyRaster(2,
 2,0,0,1.0),'8BUI',255.0), 1,
 'cb(float8[][][],int[][],text[])'::regprocedure))).nodatavalue;
 }}}

 I don't think a NODATA should be injected.
 The documentation doesn't indeed mention anything about such enforcement.

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/2807>
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-tickets mailing list