|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectes.prodevelop.gvsig.mobile.fmap.driver.raster.memory.wkformat.WKFRasterDriver
Raster driver for well known image formats (PNg, JPG, GIF). These images have to be loaded completely in memory, so the size is limited to a few hundred thousands pixels.
AffineTransform
Field Summary |
Fields inherited from interface es.prodevelop.gvsig.mobile.fmap.driver.raster.RasterDriver |
ONE_PIXEL_IMAGE_ERROR, ONE_PIXEL_NO_DATA |
Constructor Summary | |
WKFRasterDriver(ViewPort vp)
Constructor. |
Method Summary | |
void |
close()
Closes the driver. |
void |
draw(java.awt.Graphics2D g,
ViewPort viewPort)
Draws the image. |
boolean |
fileAccepted(java.io.File fName)
Define los tipos de fichero que puede leer el driver. |
java.awt.geom.AffineTransform |
getAffineTransform()
Obtiene la matriz de transformación |
java.lang.Object |
getData(int x,
int y,
int band)
|
java.lang.String |
getFilePath()
|
java.awt.geom.Rectangle2D |
getFullExtent()
Obtiene la extensión en coordenadas del mundo real que ocupa este raster |
java.lang.String |
getName()
Debe devolver un objeto que se asociará en el manager al driver. |
int |
getNumBands()
Obtiene el número de bandas del raster |
int[] |
getPixel(double wcx,
double wcy)
Gets the RGB values of the pixel of interest |
IProjection |
getProjection()
Obtiene la proyección en la que está el raster |
int |
getRasterDataType()
|
int |
getTransparency()
|
void |
initialize()
Initializes the driver. |
void |
initialize(IProjection p)
Initializes the driver. |
boolean |
isGeoreferenced()
Obtiene el flag que dice si la imagen está o no georreferenciada |
void |
open(java.io.File f)
Opens the specified file and expands it complete in memory. |
void |
setAffineTransform(java.awt.geom.AffineTransform t)
Sets a new affine transformation. |
void |
setProjection(IProjection p)
Sets a new projection |
void |
setTransparency(int t)
Sets the transparency level of this image |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public WKFRasterDriver(ViewPort vp)
vp
- current view port, used for geographic computationsMethod Detail |
public void initialize(IProjection p) throws java.io.IOException
initialize
in interface GeorreferencedRasterDriver
p
- the current projection
java.io.IOException
public IProjection getProjection()
GeorreferencedRasterDriver
getProjection
in interface GeorreferencedRasterDriver
public void setProjection(IProjection p)
setProjection
in interface GeorreferencedRasterDriver
p
- the new projection to be set.public java.awt.geom.Rectangle2D getFullExtent()
GeorreferencedRasterDriver
getFullExtent
in interface GeorreferencedRasterDriver
public boolean isGeoreferenced()
GeorreferencedRasterDriver
isGeoreferenced
in interface GeorreferencedRasterDriver
public void setAffineTransform(java.awt.geom.AffineTransform t)
setAffineTransform
in interface GeorreferencedRasterDriver
t
- the new affine transformpublic java.awt.geom.AffineTransform getAffineTransform()
GeorreferencedRasterDriver
getAffineTransform
in interface GeorreferencedRasterDriver
public boolean fileAccepted(java.io.File fName)
RasterDriver
fileAccepted
in interface RasterDriver
public void open(java.io.File f) throws java.io.IOException
open
in interface RasterDriver
f
- the raster file to be opened
java.io.IOException
public void initialize() throws java.io.IOException
initialize
in interface RasterDriver
java.io.IOException
public void close() throws java.io.IOException
close
in interface RasterDriver
java.io.IOException
public int getNumBands()
RasterDriver
getNumBands
in interface RasterDriver
public int getTransparency()
getTransparency
in interface RasterDriver
public void setTransparency(int t)
setTransparency
in interface RasterDriver
t
- the new transparecncy levelpublic void draw(java.awt.Graphics2D g, ViewPort viewPort) throws FMapDriverException
draw
in interface RasterDriver
g
- the graphics object where the image has to be paintedviewPort
- the current viewport.
FMapDriverException
public int getRasterDataType()
getRasterDataType
in interface RasterDriver
public java.lang.Object getData(int x, int y, int band)
getData
in interface RasterDriver
x
- the x coordinate of the pixely
- the y coordinate of the pixelband
- the 0-based band index
public int[] getPixel(double wcx, double wcy)
getPixel
in interface RasterDriver
wcx
- x coordinate in map unitswcy
- y coordinate in map units
public java.lang.String getName()
Driver
getName
in interface Driver
public java.lang.String getFilePath()
getFilePath
in interface RasterDriver
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |