Package ucar.nc2.grid
Class GridDatasetFactory
- java.lang.Object
-
- ucar.nc2.grid.GridDatasetFactory
-
public class GridDatasetFactory extends Object
A factory of Grid Datasets.
-
-
Constructor Summary
Constructors Constructor Description GridDatasetFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static GridDataset
openGridDataset(String endpoint, Formatter errLog)
Open the named dataset as a GridDataset, using GridDatasetProviders present on the classpath, then GribGridDataset (if present) and then GridNetcdfDataset.static GridDataset
openNetcdfAsGrid(String endpoint, Formatter errLog)
Open the named dataset using GridNetcdfDataset.static Optional<GridDataset>
wrapGridDataset(NetcdfDataset ds, Formatter errLog)
Wrap an already open NetcdfDataset as a GridDataset if possible.
-
-
-
Method Detail
-
openGridDataset
@Nullable public static GridDataset openGridDataset(String endpoint, Formatter errLog) throws IOException
Open the named dataset as a GridDataset, using GridDatasetProviders present on the classpath, then GribGridDataset (if present) and then GridNetcdfDataset. Use openGridDataset().orElse(null) in a try-with-resources block.- Throws:
IOException
-
openNetcdfAsGrid
@Nullable public static GridDataset openNetcdfAsGrid(String endpoint, Formatter errLog) throws IOException
Open the named dataset using GridNetcdfDataset.- Throws:
IOException
-
wrapGridDataset
public static Optional<GridDataset> wrapGridDataset(NetcdfDataset ds, Formatter errLog) throws IOException
Wrap an already open NetcdfDataset as a GridDataset if possible.- Throws:
IOException
-
-