|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectucar.nc2.dt.grid.GridDataset
public class GridDataset
Make a NetcdfDataset into a collection of GeoGrids with Georeferencing coordinate systems.
A variable will be made into a GeoGrid if it has a Georeferencing coordinate system, using GridCoordSys.isGridCoordSys(), and it has no extra dimensions, ie GridCoordSys.isComplete( var) is true. If it has multiple Georeferencing coordinate systems, any one that is a product set will be given preference. Example:GridDataset gridDs = GridDataset.open (uriString); List grids = gridDs.getGrids(); for (int i=0; i<grids.size(); i++) { GeoGrid grid = (Geogrid) grids.get(i); }
Nested Class Summary | |
---|---|
class |
GridDataset.Gridset
This is a set of GeoGrids with the same GeoCoordSys. |
Field Summary | |
---|---|
protected FileCache |
fileCache
|
Constructor Summary | |
---|---|
GridDataset(NetcdfDataset ds)
Create a GridDataset from a NetcdfDataset. |
|
GridDataset(NetcdfDataset ds,
Formatter parseInfo)
Create a GridDataset from a NetcdfDataset. |
Method Summary | |
---|---|
void |
calcBounds()
Caclulate date range and bounding box, even if the data has to be scanned. |
void |
close()
Close all resources associated with this dataset. |
static GridDataset |
factory(String netcdfFileURI)
Deprecated. : use GridDataset.open(). |
Attribute |
findGlobalAttributeIgnoreCase(String name)
Return the global attribute with the given name, ignoring case. |
GeoGrid |
findGridByName(String fullName)
find the named GeoGrid. |
GridDatatype |
findGridDatatype(String name)
find the named GridDatatype. |
LatLonRect |
getBoundingBox()
The boundingBox for the entire dataset. |
VariableSimpleIF |
getDataVariable(String shortName)
Get the named data Variable. |
List<VariableSimpleIF> |
getDataVariables()
The data Variables available in this dataset. |
DateRange |
getDateRange()
Date range for the entire dataset. |
String |
getDescription()
Text information about this dataset. |
String |
getDetailInfo()
Get Details about the dataset. |
void |
getDetailInfo(Formatter buff)
Show debug / underlying implementation details |
Date |
getEndDate()
Ending date for the entire dataset. |
FeatureType |
getFeatureType()
Contains collections of this FeatureType. |
List<Attribute> |
getGlobalAttributes()
List of global attributes. |
List<GridDatatype> |
getGrids()
get the list of GridDatatype objects contained in this dataset. |
List<GridDataset.Gridset> |
getGridsets()
Return GridDatatype objects grouped by GridCoordSys. |
String |
getImplementationName()
Show who is implementing |
String |
getLocation()
The URI location of the dataset |
String |
getLocationURI()
|
String |
getName()
|
NetcdfDataset |
getNetcdfDataset()
|
NetcdfFile |
getNetcdfFile()
Return underlying NetcdfFile, or null if none. |
Date |
getStartDate()
Starting date for the entire dataset. |
String |
getTitle()
Title of the dataset. |
static void |
main(String[] arg)
testing |
static GridDataset |
open(String location)
Open a netcdf dataset, using NetcdfDataset.defaultEnhanceMode plus CoordSystems and turn into a GridDataset. |
static GridDataset |
open(String location,
Set<NetcdfDataset.Enhance> enhanceMode)
Open a netcdf dataset, using NetcdfDataset.defaultEnhanceMode plus CoordSystems and turn into a GridDataset. |
void |
setFileCache(FileCache fileCache)
If the FileCache is set, the FileCacheable object must store it and call FileCache.release() on FileCacheable.close(): |
boolean |
sync()
Sync() is called when the FileCacheable is found in the cache, before returning the object to the application. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected FileCache fileCache
Constructor Detail |
---|
public GridDataset(NetcdfDataset ds) throws IOException
ds
- underlying NetcdfDataset, will do Enhance.CoordSystems if not already done.
IOException
- on read errorpublic GridDataset(NetcdfDataset ds, Formatter parseInfo) throws IOException
ds
- underlying NetcdfDataset, will do Enhance.CoordSystems if not already done.parseInfo
- put parse info here, may be null
IOException
- on read errorMethod Detail |
---|
public static GridDataset open(String location) throws IOException
location
- netcdf dataset to open, using NetcdfDataset.acquireDataset().
IOException
- on read errorNetcdfDataset.acquireDataset(java.lang.String, ucar.nc2.util.CancelTask)
public static GridDataset open(String location, Set<NetcdfDataset.Enhance> enhanceMode) throws IOException
location
- netcdf dataset to open, using NetcdfDataset.acquireDataset().enhanceMode
- open netcdf dataset with this enhanceMode
IOException
- on read errorNetcdfDataset.acquireDataset(java.lang.String, ucar.nc2.util.CancelTask)
public String getTitle()
FeatureDataset
getTitle
in interface TypedDataset
getTitle
in interface FeatureDataset
public String getDescription()
FeatureDataset
getDescription
in interface TypedDataset
getDescription
in interface FeatureDataset
public String getLocation()
FeatureDataset
getLocation
in interface FeatureDataset
getLocation
in interface FileCacheable
public String getLocationURI()
getLocationURI
in interface TypedDataset
public Date getStartDate()
FeatureDataset
getStartDate
in interface TypedDataset
getStartDate
in interface FeatureDataset
public Date getEndDate()
FeatureDataset
getEndDate
in interface TypedDataset
getEndDate
in interface FeatureDataset
public LatLonRect getBoundingBox()
FeatureDataset
getBoundingBox
in interface TypedDataset
getBoundingBox
in interface FeatureDataset
public void calcBounds() throws IOException
FeatureDataset
calcBounds
in interface FeatureDataset
IOException
- or read error.public List<Attribute> getGlobalAttributes()
TypedDataset
getGlobalAttributes
in interface TypedDataset
getGlobalAttributes
in interface FeatureDataset
public Attribute findGlobalAttributeIgnoreCase(String name)
FeatureDataset
findGlobalAttributeIgnoreCase
in interface TypedDataset
findGlobalAttributeIgnoreCase
in interface FeatureDataset
name
- attribute name
public List<VariableSimpleIF> getDataVariables()
TypedDataset
getDataVariables
in interface TypedDataset
getDataVariables
in interface FeatureDataset
public VariableSimpleIF getDataVariable(String shortName)
TypedDataset
getDataVariable
in interface TypedDataset
getDataVariable
in interface FeatureDataset
shortName
- of data Variable.
public NetcdfFile getNetcdfFile()
FeatureDataset
getNetcdfFile
in interface TypedDataset
getNetcdfFile
in interface FeatureDataset
public String getName()
public NetcdfDataset getNetcdfDataset()
public List<GridDatatype> getGrids()
GridDataset
getGrids
in interface GridDataset
public GridDatatype findGridDatatype(String name)
GridDataset
findGridDatatype
in interface GridDataset
name
- full unescaped name
public List<GridDataset.Gridset> getGridsets()
getGridsets
in interface GridDataset
public GeoGrid findGridByName(String fullName)
fullName
- find this GeoGrid by full name
public String getDetailInfo()
getDetailInfo
in interface TypedDataset
public void getDetailInfo(Formatter buff)
FeatureDataset
getDetailInfo
in interface FeatureDataset
buff
- append info herepublic FeatureType getFeatureType()
FeatureDataset
getFeatureType
in interface FeatureDataset
public DateRange getDateRange()
FeatureDataset
getDateRange
in interface FeatureDataset
public String getImplementationName()
FeatureDataset
getImplementationName
in interface FeatureDataset
public void close() throws IOException
TypedDataset
close
in interface TypedDataset
close
in interface FeatureDataset
close
in interface FileCacheable
IOException
public boolean sync() throws IOException
FileCacheable
sync
in interface FileCacheable
IOException
- on i/o error.public void setFileCache(FileCache fileCache)
FileCacheable
public synchronized void close() throws java.io.IOException { if (isClosed) return; if (cache != null) { cache.release(this); } else { reallyClose(); } isClosed = true;
setFileCache
in interface FileCacheable
fileCache
- must store this, use it on close as above.public static GridDataset factory(String netcdfFileURI) throws IOException
IOException
public static void main(String[] arg)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |