org.cresques.io
Class TifGeoRefFile

java.lang.Object
  extended byorg.cresques.io.GeoFile
      extended byorg.cresques.io.GeoRasterFile
          extended byorg.cresques.io.TifGeoRefFile
All Implemented Interfaces:
Extent.Has, Projected

public class TifGeoRefFile
extends GeoRasterFile

Soporte para ficheros georeferenciados con World File (.tfw)

Author:
"Luis W. Sevilla" , "José Morell Rama"

Field Summary
 
Fields inherited from class org.cresques.io.GeoRasterFile
bandCount, bBandNr, BLUE_BAND, doTransparency, gBandNr, GREEN_BAND, rBandNr, RED_BAND, tFilter, updatable
 
Fields inherited from class org.cresques.io.GeoFile
bytesReaded, extent, lineCnt
 
Constructor Summary
TifGeoRefFile(IProjection proj, java.lang.String fName)
           
 
Method Summary
 void close()
          Cierra el fichero y libera los recursos.
 int getBlockSize()
           
 java.lang.Object getData(int x, int y, int band)
          Obtiene el valor del raster en la coordenada que se le pasa.
 int getHeight()
          Obtiene el ancho de la imagen
 Extent getView()
          Obtiene el extent asignado
 int getWidth()
          Obtiene el ancho de la imagen
 byte[] getWindow(int ulX, int ulY, int sizeX, int sizeY, int band)
           
 GeoFile load()
          Carga un fichero raster.
 void reProject(ICoordTrans rp)
          Reproyección.
 void setTransparency(boolean t)
           
 void setTransparency(int t)
          Asigna un valor de transparencia
 void setView(Extent e)
          Asigna un nuevo Extent
 java.awt.Image updateImage(int width, int height, ICoordTrans rp)
          Actualiza la imagen
 java.awt.Image updateImage(int width, int height, ICoordTrans rp, java.awt.Image img, int flags)
           
 java.awt.Image updateImage(int width, int height, ICoordTrans rp, java.awt.Image img, int origBand, int destBand)
          Actualiza la/s banda/s especificadas en la imagen.
 
Methods inherited from class org.cresques.io.GeoRasterFile
cornersToWorldFile, fileIsSupported, getAlpha, getBand, getBandCount, getContour, getDataType, getObjects, getTransparency, openFile, printWF, registerExtension, saveWF, setAlpha, setBand, setDataType, setUpdatable
 
Methods inherited from class org.cresques.io.GeoFile
filterWS, getExtent, getFileSize, getName, getProjection, getTime, setFileSize, setName, setProjection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TifGeoRefFile

public TifGeoRefFile(IProjection proj,
                     java.lang.String fName)
Method Detail

load

public GeoFile load()
Description copied from class: GeoRasterFile
Carga un fichero raster. Puede usarse para calcular el extent e instanciar un objeto de este tipo.

Specified by:
load in class GeoRasterFile

getWidth

public int getWidth()
Description copied from class: GeoRasterFile
Obtiene el ancho de la imagen

Specified by:
getWidth in class GeoRasterFile
Returns:
Ancho de la imagen

getHeight

public int getHeight()
Description copied from class: GeoRasterFile
Obtiene el ancho de la imagen

Specified by:
getHeight in class GeoRasterFile
Returns:
Ancho de la imagen

setView

public void setView(Extent e)
Description copied from class: GeoRasterFile
Asigna un nuevo Extent

Specified by:
setView in class GeoRasterFile
Parameters:
e - Extent

getView

public Extent getView()
Description copied from class: GeoRasterFile
Obtiene el extent asignado

Specified by:
getView in class GeoRasterFile
Returns:
Extent

setTransparency

public void setTransparency(boolean t)
Overrides:
setTransparency in class GeoRasterFile

setTransparency

public void setTransparency(int t)
Description copied from class: GeoRasterFile
Asigna un valor de transparencia

Overrides:
setTransparency in class GeoRasterFile
Parameters:
t - Valor de transparencia

updateImage

public java.awt.Image updateImage(int width,
                                  int height,
                                  ICoordTrans rp)
Description copied from class: GeoRasterFile
Actualiza la imagen

Specified by:
updateImage in class GeoRasterFile
Parameters:
width - ancho
height - alto
rp - Reproyección
Returns:
img

reProject

public void reProject(ICoordTrans rp)
Description copied from class: GeoRasterFile
Reproyección.

Specified by:
reProject in interface Projected
Specified by:
reProject in class GeoRasterFile
Parameters:
rp - Coordenadas de la transformación

close

public void close()
Description copied from class: GeoRasterFile
Cierra el fichero y libera los recursos.

Specified by:
close in class GeoRasterFile

updateImage

public java.awt.Image updateImage(int width,
                                  int height,
                                  ICoordTrans rp,
                                  java.awt.Image img,
                                  int flags)

updateImage

public java.awt.Image updateImage(int width,
                                  int height,
                                  ICoordTrans rp,
                                  java.awt.Image img,
                                  int origBand,
                                  int destBand)
Description copied from class: GeoRasterFile
Actualiza la/s banda/s especificadas en la imagen.

Specified by:
updateImage in class GeoRasterFile
Parameters:
width - ancho
height - alto
rp - reproyección
img - imagen
Returns:
img

getData

public java.lang.Object getData(int x,
                                int y,
                                int band)
Description copied from class: GeoRasterFile
Obtiene el valor del raster en la coordenada que se le pasa. El valor será Double, Int, Byte, etc. dependiendo del tipo de raster.

Specified by:
getData in class GeoRasterFile
Parameters:
x - coordenada X
y - coordenada Y
Returns:

getBlockSize

public int getBlockSize()
Specified by:
getBlockSize in class GeoRasterFile

getWindow

public byte[] getWindow(int ulX,
                        int ulY,
                        int sizeX,
                        int sizeY,
                        int band)
Specified by:
getWindow in class GeoRasterFile