ucar.nc2.ft.point.writer
Class CFPointObWriter

java.lang.Object
  extended by ucar.nc2.ft.point.writer.CFPointObWriter

Deprecated. use WriterCFPointCollection

public class CFPointObWriter
extends Object

Write point obs data in CF obs format.

Since:
Oct 22, 2008
Author:
caron

Constructor Summary
CFPointObWriter(DataOutputStream stream, List<Attribute> globalAtts, String altUnits, List<PointObVar> dataVars, int numrec)
          Deprecated. Constructor
 
Method Summary
 void addPoint(double lat, double lon, double alt, Date time, double[] vals, String[] svals)
          Deprecated. Add one data point to the file
 void finish()
          Deprecated. Call this when all done, output is flushed
static 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 stream
globalAtts - 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_north
lon - longitude value in units of degrees_east
alt - altitude value in units of altUnits (may be NaN)
time - time value as a date
vals - list of data values, matching dataVars in the constructor
svals - 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 file
inMemory - 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 here
fileOut - 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 file
inMemory - 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 it
fileOut - 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


Copyright © 1999-2011 UCAR/Unidata. All Rights Reserved.