it.geosolutions.imageio.plugins.swan.raster
Class SwanRaster

Object
  extended by SwanRaster

public class SwanRaster
extends Object

Class representing a SWAN data Raster.

Author:
Daniele Romagnoli, GeoSolutions., Simone Giannecchini, GeoSolutions.

Field Summary
protected  SwanHeaderDocument.SwanHeader.Datasets datasets
           
static DateTimeFormatter dtf
           
protected  SwanImageReader reader
           
 
Constructor Summary
SwanRaster(ImageInputStream iis)
           
SwanRaster(ImageInputStream iis, SwanImageReader reader)
           
 
Method Summary
 GregorianCalendar getBaseTime()
           
 int getDatasetForecastSize()
           
 String[] getDatasetNames()
           
 SwanHeaderDocument.SwanHeader.Datasets getDatasets()
           
 int getDecimalDigitsNum()
           
 ImageInputStream getHeaderIS()
           
 int getIndexFromQuantityName(String quantityName)
           
 int getNCols()
           
 int getNDatasets()
           
 int getNImages()
          Simply returns the number of Images
 int getNRows()
           
 int getNTaus()
           
 String getRasterSpace()
           
 int getTauTime()
           
 Unit getTauUom()
           
 double getXll()
           
 double getXur()
           
 double getYll()
           
 double getYur()
           
 String getZone()
           
 boolean isBiComponentQuantity(int imageIndex)
          returns true if the quantity related the input imageIndex is bicomponent (As an instance, WIND, FORCE,...)
 void parseHeader()
          Parse the related Header and provide to set proper fields.
 BufferedImage readRaster(long imageStartAt, ImageReadParam param, boolean isBicomponent)
           
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dtf

public static final DateTimeFormatter dtf

datasets

protected SwanHeaderDocument.SwanHeader.Datasets datasets

reader

protected SwanImageReader reader
Constructor Detail

SwanRaster

public SwanRaster(ImageInputStream iis)
           throws FileNotFoundException,
                  IOException
Throws:
FileNotFoundException
IOException

SwanRaster

public SwanRaster(ImageInputStream iis,
                  SwanImageReader reader)
           throws FileNotFoundException,
                  IOException
Throws:
FileNotFoundException
IOException
Method Detail

getNCols

public int getNCols()

getNRows

public int getNRows()

parseHeader

public void parseHeader()
                 throws IOException,
                        XmlException
Parse the related Header and provide to set proper fields.

Throws:
IOException
XmlException

getNImages

public int getNImages()
Simply returns the number of Images


readRaster

public BufferedImage readRaster(long imageStartAt,
                                ImageReadParam param,
                                boolean isBicomponent)
                         throws IOException
Throws:
IOException

getDatasetForecastSize

public int getDatasetForecastSize()

getHeaderIS

public ImageInputStream getHeaderIS()

getNDatasets

public int getNDatasets()

getNTaus

public int getNTaus()

getXll

public double getXll()

getXur

public double getXur()

getYll

public double getYll()

getYur

public double getYur()

getDecimalDigitsNum

public int getDecimalDigitsNum()

getDatasets

public SwanHeaderDocument.SwanHeader.Datasets getDatasets()

getRasterSpace

public String getRasterSpace()

getTauTime

public int getTauTime()

getTauUom

public Unit getTauUom()

getDatasetNames

public String[] getDatasetNames()

getBaseTime

public GregorianCalendar getBaseTime()

isBiComponentQuantity

public boolean isBiComponentQuantity(int imageIndex)
returns true if the quantity related the input imageIndex is bicomponent (As an instance, WIND, FORCE,...)

Parameters:
imageIndex -
Returns:

getIndexFromQuantityName

public int getIndexFromQuantityName(String quantityName)

getZone

public String getZone()


Copyright © 2006-2010 GeoSolutions. All Rights Reserved.