package org.mbari.seepsearch.test;

import java.io.IOException;
import org.mbari.seepsearch.grid.*;

/**
 * Title:        Seep Search Analysis project
 * Description:
 * Copyright:    Copyright (c) 2001
 * Company:      MBARI
 * @author Brian Schlining
 * @version 1.0
 */

public class AsciiNullGridTest {

    private AsciiNullGridTest() {
    }
    public static void main(String[] args) {

        long start = System.currentTimeMillis();

        if (args.length != 2) {
            System.out.println("Use as org.mbari.seepsearch.test.AsciiNullGridReader" +
                " infile outfile");
            System.exit(-1);
        }
        try {
        AsciiRasterGridReader reader = new AsciiNullGridReader(args[0]);
        reader.read();
        RasterGrid grid = reader.getGrid();

        AsciiRasterGridWriter writer = new AsciiRasterGridWriter(args[1]);
        writer.write(grid, 4, 8);
        } catch (IOException e) {
            e.printStackTrace();
        } catch (GridException e) {
            e.printStackTrace();
        }

        long stop = System.currentTimeMillis();
        System.out.println("Elapsed Time = " + ((stop - start)/1000) + " seconds.");
    }
}