Package ucar.nc2.dt.point
Class CFPointObWriter
- java.lang.Object
-
- ucar.nc2.dt.point.CFPointObWriter
-
public class CFPointObWriter extends Object
Deprecated.use WriterCFPointCollectionWrite point obs data in CF obs format.- Since:
- Oct 22, 2008
-
-
Constructor Summary
Constructors Constructor Description CFPointObWriter(DataOutputStream stream, List<Attribute> globalAtts, String altUnits, List<PointObVar> dataVars, int numrec)
Deprecated.Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addPoint(double lat, double lon, double alt, Date time, double[] vals, String[] svals)
Deprecated.Add one data point to the filevoid
finish()
Deprecated.Call this when all done, output is flushedstatic void
main(String[] args)
Deprecated.static void
main2(String[] args)
Deprecated.static boolean
rewritePointFeatureDataset(String fileIn, String fileOut, boolean inMemory)
Deprecated.Open a ucar.nc2.ft.PointFeatureCollection, write out in CF point format.static boolean
rewritePointObsDataset(String fileIn, String fileOut, boolean inMemory)
Deprecated.Open a ucar.nc2.dt.PointObsDataset, write out in CF point format.static int
writePointFeatureCollection(FeatureDatasetPoint pfDataset, String fileOut)
Deprecated.Write a ucar.nc2.ft.PointFeatureCollection in CF point format.static void
writePointObsDataset(PointObsDataset pobsDataset, String fileOut)
Deprecated.write data from a ucar.nc2.dt.PointObsDataset into CF point format.
-
-
-
Constructor Detail
-
CFPointObWriter
public CFPointObWriter(DataOutputStream stream, List<Attribute> globalAtts, String altUnits, List<PointObVar> dataVars, int numrec) throws IOException
Deprecated.Constructor- Parameters:
stream
- write to this streamglobalAtts
- optional list of global attributes (may be null)altUnits
- optional altitude units (set to null if no altitude variable)dataVars
- the set of data variables: first the double values, then the String values- Throws:
IOException
- if write error
-
-
Method Detail
-
addPoint
public void addPoint(double lat, double lon, double alt, Date time, double[] vals, String[] svals) throws IOException
Deprecated.Add one data point to the file- Parameters:
lat
- latitude value in units of degrees_northlon
- longitude value in units of degrees_eastalt
- altitude value in units of altUnits (may be NaN)time
- time value as a datevals
- list of data values, matching dataVars in the constructorsvals
- list of String values, matching dataVars in the constructor- Throws:
IOException
- if write error
-
finish
public void finish() throws IOException
Deprecated.Call this when all done, output is flushed- Throws:
IOException
- if write error
-
rewritePointObsDataset
public static boolean rewritePointObsDataset(String fileIn, String fileOut, boolean inMemory) throws IOException
Deprecated.Open a ucar.nc2.dt.PointObsDataset, write out in CF point format.- Parameters:
fileIn
- open through TypedDatasetFactory.open(FeatureType.POINT, ..)fileOut
- write to this netcdf-3 fileinMemory
- if true, read file into memory for efficiency- Returns:
- true on success
- Throws:
IOException
- on read/write error
-
writePointObsDataset
public static void writePointObsDataset(PointObsDataset pobsDataset, String fileOut) throws IOException
Deprecated.write data from a ucar.nc2.dt.PointObsDataset into CF point format.- Parameters:
pobsDataset
- rewrite data from herefileOut
- write to tehis netcdf-3 file- Throws:
IOException
- on read/write error
-
rewritePointFeatureDataset
public static boolean rewritePointFeatureDataset(String fileIn, String fileOut, boolean inMemory) throws IOException
Deprecated.Open a ucar.nc2.ft.PointFeatureCollection, write out in CF point format.- Parameters:
fileIn
- open through TypedDatasetFactory.open(FeatureType.POINT, ..)fileOut
- write to this netcdf-3 fileinMemory
- if true, read file into memory for efficiency- Returns:
- true on success
- Throws:
IOException
- on read/write error
-
writePointFeatureCollection
public static int writePointFeatureCollection(FeatureDatasetPoint pfDataset, String fileOut) throws IOException
Deprecated.Write a ucar.nc2.ft.PointFeatureCollection in CF point format.- Parameters:
pfDataset
- find the first PointFeatureCollection, and write all data from itfileOut
- write to this netcdf-3 file- Returns:
- number of records written
- Throws:
IOException
- on read/write error, or if no PointFeatureCollection in pfDataset
-
main2
public static void main2(String[] args) throws IOException
Deprecated.- Throws:
IOException
-
main
public static void main(String[] args) throws IOException
Deprecated.- Throws:
IOException
-
-