[GRASS-SVN] r44063 - grass/trunk/imagery/i.rectify
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Oct 28 03:20:21 EDT 2010
Author: mmetz
Date: 2010-10-28 00:20:20 -0700 (Thu, 28 Oct 2010)
New Revision: 44063
Modified:
grass/trunk/imagery/i.rectify/cubic_f.c
grass/trunk/imagery/i.rectify/global.h
grass/trunk/imagery/i.rectify/i.rectify.html
grass/trunk/imagery/i.rectify/main.c
Log:
add lanczos and lanczos fallback to i.rectify
Modified: grass/trunk/imagery/i.rectify/cubic_f.c
===================================================================
--- grass/trunk/imagery/i.rectify/cubic_f.c 2010-10-28 07:16:24 UTC (rev 44062)
+++ grass/trunk/imagery/i.rectify/cubic_f.c 2010-10-28 07:20:20 UTC (rev 44063)
@@ -49,7 +49,7 @@
if (Rast_is_d_null_value(obufptr)) {
p_bilinear(ibuffer, obufptr, cell_type, row_idx, col_idx, cellhd);
/* fallback to nearest if bilinear is null */
- if (Rast_is_d_null_value(obufptr))
- Rast_set_d_value(obufptr, cell, cell_type);
+ if (Rast_is_d_null_value(obufptr))
+ Rast_set_d_value(obufptr, cell, cell_type);
}
}
Modified: grass/trunk/imagery/i.rectify/global.h
===================================================================
--- grass/trunk/imagery/i.rectify/global.h 2010-10-28 07:16:24 UTC (rev 44062)
+++ grass/trunk/imagery/i.rectify/global.h 2010-10-28 07:20:20 UTC (rev 44063)
@@ -107,3 +107,8 @@
/* cubic_f.c */
extern void p_cubic_f(struct cache *, void *, int, double *, double *,
struct Cell_head *);
+/* lanczos.c */
+extern void p_lanczos(struct cache *, void *, int, double *, double *,
+ struct Cell_head *);
+extern void p_lanczos_f(struct cache *, void *, int, double *, double *,
+ struct Cell_head *);
Modified: grass/trunk/imagery/i.rectify/i.rectify.html
===================================================================
--- grass/trunk/imagery/i.rectify/i.rectify.html 2010-10-28 07:16:24 UTC (rev 44062)
+++ grass/trunk/imagery/i.rectify/i.rectify.html 2010-10-28 07:20:20 UTC (rev 44063)
@@ -121,17 +121,17 @@
the cell based on a weighted distance average of the 16 surrounding cells in
the input map.
<p>
-The bilinear and cubic interpolation methods are most appropriate for
-continuous data and cause some smoothing. Both options should not be used
+The bilinear, cubic and lanczos interpolation methods are most appropriate for
+continuous data and cause some smoothing. These options should not be used
with categorical data, since the cell values will be altered.
<p>
-In the bilinear and cubic methods, if any of the surrounding cells used to
+In the bilinear, cubic and lanczos methods, if any of the surrounding cells used to
interpolate the new cell value are NULL, the resulting cell will be NULL, even if
the nearest cell is not NULL. This will cause some thinning along NULL borders,
-such as the coasts of land areas in a DEM. The bilinear_f and cubic_f
+such as the coasts of land areas in a DEM. The bilinear_f, cubic_f and lanczos_f
interpolation methods can be used if thinning along NULL edges is not desired.
These methods "fall back" to simpler interpolation methods along NULL borders.
-That is, from cubic to bilinear to nearest.
+That is, from lanczos to cubic to bilinear to nearest.
<p>
If nearest neighbor assignment is used, the output map has the same raster
format as the input map. If any of the other interpolations is used, the
Modified: grass/trunk/imagery/i.rectify/main.c
===================================================================
--- grass/trunk/imagery/i.rectify/main.c 2010-10-28 07:16:24 UTC (rev 44062)
+++ grass/trunk/imagery/i.rectify/main.c 2010-10-28 07:20:20 UTC (rev 44063)
@@ -64,8 +64,10 @@
{p_nearest, "nearest", "nearest neighbor"},
{p_bilinear, "bilinear", "bilinear"},
{p_cubic, "cubic", "cubic convolution"},
+ {p_lanczos, "lanczos", "lanczos filter"},
{p_bilinear_f, "bilinear_f", "bilinear with fallback"},
{p_cubic_f, "cubic_f", "cubic convolution with fallback"},
+ {p_lanczos_f, "lanczos_f", "lanczos filter with fallback"},
{NULL, NULL, NULL}
};
More information about the grass-commit
mailing list