Package ucar.nc2.ft2.coverage.adapter
Class DtCoverageDataset
- java.lang.Object
-
- ucar.nc2.ft2.coverage.adapter.DtCoverageDataset
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
public class DtCoverageDataset extends Object implements Closeable
fork ucar.nc2.dt.grid for adaption to Coverage (this class can evolve as needed and not worry about backwards compatibility). uses NetcdfDataset / CoordinateSystem.- Since:
- 5/26/2015
- See Also:
DtCoverageAdapter
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DtCoverageDataset.Gridset
This is a set of GeoGrids with the same GeoCoordSys.
-
Constructor Summary
Constructors Constructor Description DtCoverageDataset(NetcdfDataset ncd)
Create a DtCoverageDataset from a NetcdfDataset.DtCoverageDataset(NetcdfDataset ds, Formatter parseInfo)
Create a DtCoverageDataset from a NetcdfDataset.
-
Method Summary
-
-
-
Constructor Detail
-
DtCoverageDataset
public DtCoverageDataset(NetcdfDataset ncd) throws IOException
Create a DtCoverageDataset from a NetcdfDataset.- Parameters:
ncd
- underlying NetcdfDataset, will do Enhance.CoordSystems if not already done.- Throws:
IOException
- on read error
-
DtCoverageDataset
public DtCoverageDataset(NetcdfDataset ds, Formatter parseInfo) throws IOException
Create a DtCoverageDataset from a NetcdfDataset.- Parameters:
ncd
- underlying NetcdfDataset, will do Enhance.CoordSystems if not already done.parseInfo
- put parse info here, may be null- Throws:
IOException
- on read error
-
-
Method Detail
-
open
public static DtCoverageDataset open(String location) throws IOException
Open a netcdf dataset, using NetcdfDataset.defaultEnhanceMode plus CoordSystems and turn into a DtCoverageDataset.- Parameters:
location
- netcdf dataset to open, using NetcdfDatasets.acquireDataset().- Returns:
- GridDataset
- Throws:
IOException
- on read error- See Also:
NetcdfDataset.acquireDataset(ucar.nc2.dataset.DatasetUrl, ucar.nc2.util.CancelTask)
-
open
public static DtCoverageDataset open(DatasetUrl durl) throws IOException
- Throws:
IOException
-
open
public static DtCoverageDataset open(DatasetUrl durl, Set<NetcdfDataset.Enhance> enhanceMode) throws IOException
Open a netcdf dataset, using NetcdfDataset.defaultEnhanceMode plus CoordSystems and turn into a DtCoverageDataset.- Parameters:
durl
- netcdf dataset to open, using NetcdfDatasets.acquireDataset().enhanceMode
- open netcdf dataset with this enhanceMode- Returns:
- GridDataset
- Throws:
IOException
- on read error- See Also:
NetcdfDataset.acquireDataset(ucar.nc2.dataset.DatasetUrl, ucar.nc2.util.CancelTask)
-
open
public static DtCoverageDataset open(NetcdfDataset ds) throws IOException
- Throws:
IOException
-
getCoverageType
public FeatureType getCoverageType()
-
getTitle
public String getTitle()
-
getDescription
public String getDescription()
-
getLocation
public String getLocation()
-
getCalendarDateRange
public CalendarDateRange getCalendarDateRange()
-
getCalendarDateStart
public CalendarDate getCalendarDateStart()
-
getCalendarDateEnd
public CalendarDate getCalendarDateEnd()
-
getBoundingBox
public LatLonRect getBoundingBox()
-
getProjBoundingBox
public ProjectionRect getProjBoundingBox()
-
calcBounds
public void calcBounds()
-
getDataVariables
public List<VariableSimpleIF> getDataVariables()
-
getDataVariable
public VariableSimpleIF getDataVariable(String shortName)
-
getNetcdfFile
public NetcdfFile getNetcdfFile()
-
getName
public String getName()
the name of the dataset is the last part of the location- Returns:
- the name of the dataset
-
getNetcdfDataset
public NetcdfDataset getNetcdfDataset()
- Returns:
- the underlying NetcdfDataset
-
getGrids
public List<DtCoverage> getGrids()
- Returns:
- the list of GeoGrid objects contained in this dataset.
-
findGridDatatype
public DtCoverage findGridDatatype(String name)
-
getGridsets
public List<DtCoverageDataset.Gridset> getGridsets()
Return GeoGrid objects grouped by GeoGridCoordSys. All GeoGrid in a Gridset have the same GeoGridCoordSys.- Returns:
- List of type ucar.nc2.dt.GridDataset.Gridset
-
findGridByName
public DtCoverage findGridByName(String fullName)
find the named GeoGrid.- Parameters:
fullName
- find this GeoGrid by full name- Returns:
- the named GeoGrid, or null if not found
-
findGridByShortName
public DtCoverage findGridByShortName(String shortName)
find the named GeoGrid.- Parameters:
shortName
- find this GeoGrid by short name- Returns:
- the named GeoGrid, or null if not found
-
findGridByFullName
public DtCoverage findGridByFullName(String fullName)
-
findGridDatatypeByAttribute
public DtCoverage findGridDatatypeByAttribute(String attName, String attValue)
-
getDetailInfo
public String getDetailInfo()
Get Details about the dataset.
-
getDetailInfo
public void getDetailInfo(Formatter buff)
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
-