Ticket #1315 (closed defect: fixed)

Opened 18 months ago

Last modified 16 months ago

[raster] What does nodatamode in ST_MapAlgebraFctNgb doing?

Reported by: robe Owned by: robe
Priority: medium Milestone: PostGIS 2.0.0
Component: raster Version: trunk
Keywords: Cc:

Description

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

Change History

Changed 18 months ago by dustymugs

  • summary changed from What does nodatamode in ST_MapAlgebraFctNgb doing? to [raster] What does nodatamode in ST_MapAlgebraFctNgb doing?

Changed 18 months ago by dzwarg

  • owner changed from pracine to dzwarg

Changed 18 months ago by dzwarg

  • status changed from new to assigned

Changed 18 months ago by dzwarg

  • owner changed from dzwarg to robe
  • status changed from assigned to new

I checked the conditional, and added a couple additional tests. I think these issues should be resolved.

robe, please test with r8261+ and indicate if this resolves these issues.

Changed 16 months ago by pracine

To be closed?

Changed 16 months ago by dzwarg

  • status changed from new to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.