Opened 13 years ago
Closed 13 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 , 13 years ago
Summary: | What does nodatamode in ST_MapAlgebraFctNgb doing? → [raster] What does nodatamode in ST_MapAlgebraFctNgb doing? |
---|
comment:2 by , 13 years ago
Owner: | changed from | to
---|
comment:3 by , 13 years ago
Status: | new → assigned |
---|
comment:4 by , 13 years ago
Owner: | changed from | to
---|---|
Status: | assigned → new |
comment:6 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
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.