com.metsci.glimpse.charts.vector.parser
Class ENCHarvest

java.lang.Object
  extended by com.metsci.glimpse.charts.vector.parser.ENCHarvest

public class ENCHarvest
extends java.lang.Object

Command line utility to convert enc files into metron's own internal enc format. To use as a stand alone command line utility, may be easiest to hard code values for dataDir and topLevelOutputDir in the main main method. The output directry is a multi directory format. Given a enc 000 data file like: data/enc/atlantic-medium-enc/ENC_ROOT/US3NY01M/US3NY01M.000 The resulting metron enc file will be written to: TOPLEVELOUTPUTDIR/atlantic-medium-enc/US3NY01M/US3NY01M_bin.txt The parent directory of the ENC_ROOT directory will be the name of output subdirectory. The root name (file name minus .000 extension) will the grandchild output directory.

Author:
john

Constructor Summary
ENCHarvest()
           
 
Method Summary
 void convertEncFile(java.io.File topLevelOutputDir, java.lang.String enc000Path)
          Given an ENC_ROOT directory, will search for .000 files in the child directories off the ENC_ROOT directory.
 void convertEncFile(java.io.File topLevelOutputDir, java.lang.String zipPath, java.lang.String enc000Path)
           
 void goodconvertEncFile(java.io.File topLevelOutputDir, java.lang.String encRootResource)
           
static void main(java.lang.String[] args)
           
 boolean recursivelyConvertEncFiles(java.io.File topLevelOutputDir, java.lang.String dataHome)
          Recursively searches for ENC_ROOT directories starting from dataHome.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ENCHarvest

public ENCHarvest()
           throws java.io.IOException
Throws:
java.io.IOException
Method Detail

recursivelyConvertEncFiles

public boolean recursivelyConvertEncFiles(java.io.File topLevelOutputDir,
                                          java.lang.String dataHome)
                                   throws java.io.IOException,
                                          java.net.URISyntaxException
Recursively searches for ENC_ROOT directories starting from dataHome. For each ENC_ROOT directory found, will call convertEncFile to read the .000 file and convert it to a metron friendly _bin.txt file.

Parameters:
topLevelOutputDir -
dataHome -
Returns:
Throws:
java.io.IOException
java.net.URISyntaxException

convertEncFile

public void convertEncFile(java.io.File topLevelOutputDir,
                           java.lang.String enc000Path)
                    throws java.io.IOException,
                           java.net.URISyntaxException
Given an ENC_ROOT directory, will search for .000 files in the child directories off the ENC_ROOT directory. Will call gdal to parse the .000 file and create a new metsci friendly _bin.txt file.

Parameters:
topLevelOutputDir -
encRootResource -
Throws:
java.io.IOException
java.net.URISyntaxException

convertEncFile

public void convertEncFile(java.io.File topLevelOutputDir,
                           java.lang.String zipPath,
                           java.lang.String enc000Path)
                    throws java.io.IOException,
                           java.net.URISyntaxException
Throws:
java.io.IOException
java.net.URISyntaxException

goodconvertEncFile

public void goodconvertEncFile(java.io.File topLevelOutputDir,
                               java.lang.String encRootResource)
                        throws java.io.IOException,
                               java.net.URISyntaxException
Throws:
java.io.IOException
java.net.URISyntaxException

main

public static void main(java.lang.String[] args)


Copyright © 2012 Metron, Inc.. All Rights Reserved.