Ticket #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: | 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
