com.c5corp.DEMconvert
Class C5DemAbstractFilter

java.lang.Object
  extended by com.c5corp.DEMconvert.C5DemAbstractFilter
All Implemented Interfaces:
C5DemConstants
Direct Known Subclasses:
C5UTM10To30Meter, Corpscon10To30Meter, CorpsconBatch, CorpsconBatchXY, Dem2C51KGrid, Dem2C5PointStats, Dem2C5UTM, SampleFilter

public abstract class C5DemAbstractFilter
extends java.lang.Object
implements C5DemConstants

An abstract class implementing c5demOutFilterInterface, that can be implemented to create new c5 DemTool filters for exporting DEM data into any text format. Extend this class to create new output filters that will work in the C5 DEM Tool.

extensions must implement methods:

The class provides a static method, public static PrintWriter openOutputFile(String out_filename, String path), for opening an output file.

Since:
1.0
Author:
Brett Stalbaum Copyright 2002-2006 see LICENSE.txt and UCSD_LICENSE.txt

Field Summary
 
Fields inherited from interface com.c5corp.c5dem.C5DemConstants
copy, E_BIT, FEETTOMETERS, hdatum, METERSTOFEET, N_BIT, NE_BIT, NW_BIT, S_BIT, SE_BIT, SW_BIT, system, units, vdatum, W_BIT
 
Constructor Summary
C5DemAbstractFilter()
           
 
Method Summary
abstract  java.lang.String getFilterInfo()
          A method that returns a string containing information about the filter.
 java.lang.String getOutputPath()
          Returns a relative path describing where to place the output the default implementation is to use the present working directory.
static java.io.PrintWriter openOutputFile(java.lang.String out_filename, java.lang.String path)
          A method to open a new output file with a name derived from the type a metadata, record 1, which contains the map name
 java.lang.String toString()
          overrides java.lang.Object.toString()
abstract  void writeData(Dem dem, java.io.PrintWriter out)
          method for output of the formated data
abstract  void writeHeader(Dem dem, java.io.PrintWriter out)
          A method for output of metadata
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

C5DemAbstractFilter

public C5DemAbstractFilter()
Method Detail

writeHeader

public abstract void writeHeader(Dem dem,
                                 java.io.PrintWriter out)
A method for output of metadata

Parameters:
dem - A Dem.
out - Where to write the data.

writeData

public abstract void writeData(Dem dem,
                               java.io.PrintWriter out)
method for output of the formated data

Parameters:
dem - A Dem.
out - Where to write the data.

getFilterInfo

public abstract java.lang.String getFilterInfo()
A method that returns a string containing information about the filter.

Returns:
the string info about the filter

openOutputFile

public static java.io.PrintWriter openOutputFile(java.lang.String out_filename,
                                                 java.lang.String path)
A method to open a new output file with a name derived from the type a metadata, record 1, which contains the map name

Parameters:
out_filename - name of the output file
path - local path
Returns:
a PrintWriter to write to the file

getOutputPath

public java.lang.String getOutputPath()
Returns a relative path describing where to place the output the default implementation is to use the present working directory.

Returns:
the output file path

toString

public java.lang.String toString()
overrides java.lang.Object.toString()

Overrides:
toString in class java.lang.Object