Package ucar.nc2.ft2.coverage.writer
Class CFGridCoverageWriter
- java.lang.Object
-
- ucar.nc2.ft2.coverage.writer.CFGridCoverageWriter
-
public class CFGridCoverageWriter extends Object
Write CF Compliant Grid file from a Coverage. First, single coverage only. - The idea is to subset the coordsys, use that for the file's metadata. - Then subset the grid, and write out the data. Check that the grid's metadata matches.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCFGridCoverageWriter.ResultA value class holding information about the write()
-
Field Summary
Fields Modifier and Type Field Description static StringTOO_LARGE_MESSAGE
-
Constructor Summary
Constructors Constructor Description CFGridCoverageWriter()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static CFGridCoverageWriter.Resultwrite(CoverageCollection gdsOrg, List<String> gridNames, SubsetParams subset, boolean tryToAddLatLon2D, NetcdfFormatWriter.Builder writer, long maxBytes)Write a netcdf/CF file from a CoverageDataset
-
-
-
Field Detail
-
TOO_LARGE_MESSAGE
public static final String TOO_LARGE_MESSAGE
- See Also:
- Constant Field Values
-
-
Method Detail
-
write
public static CFGridCoverageWriter.Result write(CoverageCollection gdsOrg, List<String> gridNames, SubsetParams subset, boolean tryToAddLatLon2D, NetcdfFormatWriter.Builder writer, long maxBytes) throws IOException, InvalidRangeException
Write a netcdf/CF file from a CoverageDataset- Parameters:
gdsOrg- the CoverageDatasetgridNames- the list of coverage names to be written, or null for allsubset- defines the requested subset, or null to include everything in gdsOrgtryToAddLatLon2D- add 2D lat/lon coordinates, if possiblewriter- this does the actual writing, must not be nullmaxBytes- if > 0, only create the file if sizeToBeWritten < maxBytes.- Returns:
- the result of the write.
- Throws:
IOExceptionInvalidRangeException
-
-