public abstract class NavigationPointWriter
extends java.lang.Object
NavigationPointWriter
class is an abstract class
for writing out data from a list of navigation points.Modifier and Type | Field and Description |
---|---|
protected java.util.Map<java.lang.String,Grid> |
gridCache
The cache of grid variables.
|
protected EarthDataReader |
reader
The reader to get extra data from.
|
protected java.util.List<java.lang.String> |
variableList
The list of variables to access in the reader.
|
Modifier | Constructor and Description |
---|---|
protected |
NavigationPointWriter(EarthDataReader reader,
java.util.List<java.lang.String> variableList,
java.util.List<NavigationPoint> pointList)
Creates a point writer.
|
Modifier and Type | Method and Description |
---|---|
double[] |
getNorth(DataLocation dataLoc)
Gets the data location north vector.
|
protected static java.util.List<NavigationPoint> |
getTestPoints(EarthTransform trans,
int count)
Provides test data for this class.
|
void |
write(java.io.OutputStream stream)
Writes the point data.
|
protected abstract void |
writeFooter(java.io.PrintStream stream)
Writes the file footer to the stream.
|
protected abstract void |
writeHeader(java.io.PrintStream stream)
Writes the file header to the stream.
|
protected abstract void |
writePoint(java.io.PrintStream stream,
NavigationPoint point)
Writes a single point to the stream.
|
protected EarthDataReader reader
protected java.util.List<java.lang.String> variableList
protected java.util.Map<java.lang.String,Grid> gridCache
protected NavigationPointWriter(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.public double[] getNorth(DataLocation dataLoc)
dataLoc
- the data location to query.protected abstract void writeHeader(java.io.PrintStream stream)
stream
- the print stream to write to.protected abstract void writePoint(java.io.PrintStream stream, NavigationPoint point)
stream
- the print stream to write to.point
- the navigation point to write.protected abstract void writeFooter(java.io.PrintStream stream)
stream
- the print stream to write to.public void write(java.io.OutputStream stream)
stream
- the output stream to write to.protected static java.util.List<NavigationPoint> getTestPoints(EarthTransform trans, int count)
trans
- the earth transform to generate test data for.count
- the number of test data points desired.