Class BufferInterpolation

java.lang.Object
org.gvsig.raster.lib.buffer.impl.BufferInterpolation

public class BufferInterpolation extends Object
Author:
fdiaz
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    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.
    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.
    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.
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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
      La variable 'z' contiene el valor acumulado de cada peso por el valor del pixel. La variable 'n' contiene el valor acumulado de los pesos de los cuatro pixeles. El valor final del pixel será 'z/n', es decir un promedio del valor de los cuatro teniendo en cuenta el peso de cada uno.

      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)
      La variable 'z' contiene el valor acumulado de cada peso por el valor del pixel. La variable 'n' contiene el valor acumulado de los pesos de los cuatro pixeles. El valor final del pixel será 'z/n', es decir un promedio del valor de los cuatro teniendo en cuenta el peso de cada uno.

      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 -