public class CSVPointWriter extends NavigationPointWriter
CSVPointWriter
class writes navigation point data
to an CSV format file. Each navigation point is written as one
line with commas separating the columns. The file is prefixed with a
column name header.gridCache, reader, variableList
Constructor and Description |
---|
CSVPointWriter(EarthDataReader reader,
java.util.List<java.lang.String> variableList,
java.util.List<NavigationPoint> pointList)
Creates an CSV point writer.
|
Modifier and Type | Method and Description |
---|---|
static void |
main(java.lang.String[] argv)
Tests this class.
|
protected void |
writeFooter(java.io.PrintStream stream)
Writes the file footer to the stream.
|
protected void |
writeHeader(java.io.PrintStream stream)
Writes the file header to the stream.
|
protected void |
writePoint(java.io.PrintStream stream,
NavigationPoint point)
Writes a single point to the stream.
|
getNorth, getTestPoints, write
public CSVPointWriter(EarthDataReader reader, java.util.List<java.lang.String> variableList, java.util.List<NavigationPoint> pointList) throws java.io.IOException
reader
- the reader to use for extra data to write with each
point.variableList
- the list of variables from the reader to use
for writing variable data at each point.pointList
- the list of navigation points to write.java.io.IOException
- if an error occurred accessing a data
variable from the list.protected void writeHeader(java.io.PrintStream stream)
NavigationPointWriter
writeHeader
in class NavigationPointWriter
stream
- the print stream to write to.protected void writePoint(java.io.PrintStream stream, NavigationPoint point)
NavigationPointWriter
writePoint
in class NavigationPointWriter
stream
- the print stream to write to.point
- the navigation point to write.protected void writeFooter(java.io.PrintStream stream)
NavigationPointWriter
writeFooter
in class NavigationPointWriter
stream
- the print stream to write to.public static void main(java.lang.String[] argv) throws java.lang.Exception
argv
- the array of command line parameters.java.lang.Exception