[postgis-devel] [PostGIS] #1315: What does nodatamode in ST_MapAlgebraFctNgb doing?

PostGIS trac at osgeo.org
Mon Nov 21 08:32:37 PST 2011


#1315: What does nodatamode in ST_MapAlgebraFctNgb doing?
----------------------------+-----------------------------------------------
 Reporter:  robe            |       Owner:  pracine      
     Type:  defect          |      Status:  new          
 Priority:  medium          |   Milestone:  PostGIS 2.0.0
Component:  postgis raster  |     Version:  trunk        
 Keywords:                  |  
----------------------------+-----------------------------------------------
 Guys, I took my best guess at figuring out what this argument is supposed
 to do so most likely I have misexplained it in the docs.  I also think
 there may be something wrong with its implementation or I am just not
 getting it.

 Take a look to see if this makes sense.
 http://www.postgis.org/documentation/manual-
 svn/RT_ST_MapAlgebraFctNgb.html

 Now if I pass in:


 {{{
 SELECT ST_MapAlgebraFctNgb(ST_SetBandNoDataValue(rast,0), 1,  '8BUI', 5,
 5, 'rast_avg(float[][], text, text[])'::regprocedure,'123',NULL) As neared
         FROM katrinas_rescaled
         limit 1;
 }}}

 My function errors out with : function 4251080 returned NULL;

 Based on my understanding -- this should not happen since I'm telling the
 nn to use 123 for any near neighbor pixels that are NULL (e.g. I fell off
 the cliff of the raster or its a nodata pixel)

 The other issue I have scanning the code, is why is this line

 http://trac.osgeo.org/postgis/browser/trunk/raster/rt_pg/rt_pg.c#L9343
 this:
 {{{
 strcmp(strFromText, "IGNORE") < 0 && strcmp(strFromText, "NULL") < 0
 }}}

 instead of this:
 {{{
 strcmp(strFromText, "IGNORE") != 0 && strcmp(strFromText, "NULL") != 0
 }}}

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/1315>
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