hydroScalingAPI.io
Class CRasToEsriASCII

java.lang.Object
  extended by hydroScalingAPI.io.CRasToEsriASCII

public class CRasToEsriASCII
extends java.lang.Object

This class takes a CUENCAS raster and creates a ESRI GRID raster inputFile, which can be a DEM or a hydrometeorological field. IMPORTANT: The Class will write the GRID inputFile using a gloabal LAT-LONG WGS-84 projection.

Author:
Ricardo Mantilla

Constructor Summary
CRasToEsriASCII(java.io.File inputMetaFile, java.io.File outputDir)
          Creates a new instance of CRasToEsriASCII
 
Method Summary
 void fileToExport(java.io.File file)
          Provides the class with the path to the binary file to be exported using the data from the MetaRaster provided in the constructor
 void fileToExport(MetaRaster thisMetaInfo)
          Takes in a new MetaRaster to use as template for the data to be exported
static void main(java.lang.String[] args)
          Tests for the class
 void writeEsriFile()
          Writes the data in Esri ASCII format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CRasToEsriASCII

public CRasToEsriASCII(java.io.File inputMetaFile,
                       java.io.File outputDir)
                throws java.io.IOException
Creates a new instance of CRasToEsriASCII

Parameters:
inputMetaFile - The MetaRaster for the file to be exported
outputDir - The destination directory
Throws:
java.io.IOException - Captures error in the read/write process
Method Detail

fileToExport

public void fileToExport(java.io.File file)
                  throws java.io.IOException
Provides the class with the path to the binary file to be exported using the data from the MetaRaster provided in the constructor

Parameters:
file - Path to the binary file
Throws:
java.io.IOException - Captures errors reading and/or writing

fileToExport

public void fileToExport(MetaRaster thisMetaInfo)
                  throws java.io.IOException
Takes in a new MetaRaster to use as template for the data to be exported

Parameters:
thisMetaInfo - The MetaRaster that will be used to retrive binary data
Throws:
java.io.IOException - Errors reading the data

writeEsriFile

public void writeEsriFile()
                   throws java.io.IOException
Writes the data in Esri ASCII format

Throws:
java.io.IOException - Captures errors while writing the ascii file

main

public static void main(java.lang.String[] args)
Tests for the class

Parameters:
args - the command line arguments


CUENCAS was initially developed by Ricardo Mantilla at the University of Colorado under the supervision of Dr. Vijay K. Gupta. We wish to recognize the support from the National Science Fundation.