Class BufferInterpolation
- Author:
- fdiaz
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbicubicSplineInterpolation(org.gvsig.raster.lib.buffer.api.Buffer source, org.gvsig.raster.lib.buffer.api.Buffer target, org.gvsig.tools.task.SimpleTaskStatus status) Interpolates the buffer "source" to a number of columns and a number of rows and stores the result in the buffer "targer" according to the bicubic spline interpolation method.voidbilinearInterpolation(org.gvsig.raster.lib.buffer.api.Buffer source, org.gvsig.raster.lib.buffer.api.Buffer target, org.gvsig.tools.task.SimpleTaskStatus status) Interpolates the buffer "source" to a number of columns and a number of rows and stores the result in the buffer "targer" according to the bilinear interpolation method.voidbSplineInterpolation(org.gvsig.raster.lib.buffer.api.Buffer source, org.gvsig.raster.lib.buffer.api.Buffer target, org.gvsig.tools.task.SimpleTaskStatus status) Interpolates the buffer "source" to a number of columns and a number of rows and stores the result in the buffer "targer" according to the bSplineInterpolation method.voidinverseDistanceInterpolation(org.gvsig.raster.lib.buffer.api.Buffer source, org.gvsig.raster.lib.buffer.api.Buffer target, org.gvsig.tools.task.SimpleTaskStatus status) Interpolates the buffer "source" to a number of columns and a number of rows and stores the result in the buffer "targer" according to the inverse distance interpolation method.voidnearestNeighbourInterpolation(org.gvsig.raster.lib.buffer.api.Buffer source, org.gvsig.raster.lib.buffer.api.Buffer target, org.gvsig.tools.task.SimpleTaskStatus status) Interpolates the buffer "source" to a number of columns and a number of rows and stores the result in the buffer "targer" according to the nearest interpolation method.
-
Constructor Details
-
BufferInterpolation
public BufferInterpolation()- Parameters:
buf-
-
-
Method Details
-
nearestNeighbourInterpolation
public void nearestNeighbourInterpolation(org.gvsig.raster.lib.buffer.api.Buffer source, org.gvsig.raster.lib.buffer.api.Buffer target, org.gvsig.tools.task.SimpleTaskStatus status) Interpolates the buffer "source" to a number of columns and a number of rows and stores the result in the buffer "targer" according to the nearest interpolation method.- Parameters:
source-target-status-rows-columns-
-
bilinearInterpolation
public void bilinearInterpolation(org.gvsig.raster.lib.buffer.api.Buffer source, org.gvsig.raster.lib.buffer.api.Buffer target, org.gvsig.tools.task.SimpleTaskStatus status) Interpolates the buffer "source" to a number of columns and a number of rows and stores the result in the buffer "targer" according to the bilinear interpolation method. Promedia el valor de cuatro pixeles adyacentes.Para cada pixel del raster A:(x, y) obtiene el B:(x + 1, y), C:(x, y + 1), D:(x + 1, y + 1) Para cada valor del kernel se calcula un valor 'd' que es un peso dependiendo de su posición. Este peso depende de la posición del pixel destino dentro del origen. La posición del pixel destino en el origen es un valor decimal que puede ir de 0 a 1. Si está muy pegado a la esquina superior izquierda estará cercano a 0 y si está muy pegado a la esquina inferior derecha estará cercano a 1. Este valor está representado por 'dx' y 'dy'.
Los pesos aplicados son a
- A (1-dx) * (1-dy)
- B dx * (1-dy)
- C (1-dx) * dy
- D dx * dy
- Parameters:
source-target-status-rows-columns-
-
inverseDistanceInterpolation
public void inverseDistanceInterpolation(org.gvsig.raster.lib.buffer.api.Buffer source, org.gvsig.raster.lib.buffer.api.Buffer target, org.gvsig.tools.task.SimpleTaskStatus status) Interpolates the buffer "source" to a number of columns and a number of rows and stores the result in the buffer "targer" according to the inverse distance interpolation method. Asigna el valor de un pixel en función inversa de la distancia.Para cada pixel del raster A:(x, y) obtiene el B:(x + 1, y), C:(x, y + 1), D:(x + 1, y + 1) Para cada valor del kernel se calcula un valor 'd' que es un peso dependiendo de su posición. Este peso será dependiente de la posición del pixel destino dentro del origen. La posición del pixel destino en el origen es un valor decimal que puede ir de 0 a 1. Si está muy pegado a la esquina superior izquierda estará cercano a 0 y si está muy pegado a la esquina inferior derecha estará cercano a 1. Este valor está representado por 'dx' y 'dy'. En este caso, y a diferencia del método bilinear el peso vendrá representado por la inversa de la distancia entre la posición dentro del pixel y el origen del mismo.
Los pesos aplicados son a
- A 1 / sqrt((1-dx) * (1-dy))
- B 1 / sqrt(dx * (1-dy))
- C 1 / sqrt((1-dx) * dy)
- D 1 / sqrt(dx * dy)
- Parameters:
source-target-status-rows-columns-
-
bicubicSplineInterpolation
public void bicubicSplineInterpolation(org.gvsig.raster.lib.buffer.api.Buffer source, org.gvsig.raster.lib.buffer.api.Buffer target, org.gvsig.tools.task.SimpleTaskStatus status) Interpolates the buffer "source" to a number of columns and a number of rows and stores the result in the buffer "targer" according to the bicubic spline interpolation method. el valor de cuatro pixeles adyacentes.- Parameters:
source-target-status-rows-columns-
-
bSplineInterpolation
public void bSplineInterpolation(org.gvsig.raster.lib.buffer.api.Buffer source, org.gvsig.raster.lib.buffer.api.Buffer target, org.gvsig.tools.task.SimpleTaskStatus status) Interpolates the buffer "source" to a number of columns and a number of rows and stores the result in the buffer "targer" according to the bSplineInterpolation method.- Parameters:
source-target-status-rows-columns-
-