[postgis-tickets] [PostGIS] #5386: ST_MapAlgebra not respecting NULL nodatavalues

PostGIS trac at osgeo.org
Fri May 19 04:21:06 PDT 2023


#5386: ST_MapAlgebra not respecting NULL nodatavalues
---------------------+---------------------------
  Reporter:  robe    |      Owner:  robe
      Type:  defect  |     Status:  new
  Priority:  high    |  Milestone:  PostGIS 3.0.9
 Component:  raster  |    Version:  3.3.x
Resolution:          |   Keywords:
---------------------+---------------------------
Comment (by robe):

 Looking at this


 {{{
 SELECT ST_BandNoDataValue(ST_MapAlgebra(rast,1, '16BUI'::text,
 '[rast.val]*1'::text, NULL::float8)) FROM test_robe WHERE rid = 1 ;
 }}}

 What is returned is 0

 but this also returns 0


 {{{
 SELECT ST_BandNoDataValue(ST_MapAlgebra(rast,1, '16BUI'::text,
 '[rast.val]*1'::text, 1)) FROM test_robe WHERE rid = 1 ;
 }}}


 I'm not sure if this is a bug, or just a documentation error.  It might
 have become an issue when we merged all variants of ST_MapAlgebra under
 one umbrella.

 https://postgis.net/docs/RT_ST_MapAlgebra_expr.html

 Because the documentation speaks of using an expression to set no-data-
 value, and yet none of the signatures listed would allow that.
-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5386#comment:1>
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