Opened 12 years ago

Closed 12 years ago

#1315 closed defect (fixed)

[raster] What does nodatamode in ST_MapAlgebraFctNgb doing?

Reported by: robe Owned by: robe
Priority: medium Milestone: PostGIS 2.0.0
Component: raster Version: master
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 (6)

comment:1 by Bborie Park, 12 years ago

Summary: What does nodatamode in ST_MapAlgebraFctNgb doing?[raster] What does nodatamode in ST_MapAlgebraFctNgb doing?

comment:2 by dzwarg, 12 years ago

Owner: changed from pracine to dzwarg

comment:3 by dzwarg, 12 years ago

Status: newassigned

comment:4 by dzwarg, 12 years ago

Owner: changed from dzwarg to robe
Status: assignednew

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.

comment:5 by pracine, 12 years ago

To be closed?

comment:6 by dzwarg, 12 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.