Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

Scientific Feature Types

A FeatureDataset is a container for FeatureType objects. It is a generalization of a NetcdfDataset, and the common case is that it wraps a NetcdfDataset.

  public interface ucar.nc2.ft.FeatureDataset{
ucar.nc2.constants.FeatureType getFeatureType();
String getTitle();
String getDescription();
String getLocationURI();
ucar.nc2.units.DateRange getDateRange();
Date getStartDate();
Date getEndDate();
ucar.unidata.geoloc.LatLonRect getBoundingBox();
List<Attribute> getGlobalAttributes();
ucar.nc2.Attribute findGlobalAttributeIgnoreCase(String attName);
List<VariableSimpleIF> getDataVariables();
ucar.nc2.VariableSimpleIF getDataVariable(String name);
void close() throws java.io.IOException; }

The data variables are simple versions of Variables, in particular they have no read methods:

  public interface ucar.nc2.VariableSimpleIF {
String getName();
String getShortName();
String getDescription();
String getUnitsString();
int getRank();
int[] getShape();
List<Dimension> getDimensions();
ucar.ma2.DataType getDataType();
List<Attribute> getAttributes();
ucar.nc2.Attribute findAttributeIgnoreCase(java.lang.String);
}

The information in the FeatureDataset interface constitutes a simple kind of discovery metadata for the dataset.

Opening a FeatureDataset

One gets a FeatureDataset by calling

  FeatureDataset FeatureDatasetFactoryManager.open( FeatureType type, String location, ucar.nc2.util.CancelTask task, java.util.Formatter errlog);

or if you already have an opened NetcdfDataset:

  FeatureDataset FeatureDatasetFactoryManager.wrap( FeatureType type, NetcdfDataset ncd, ucar.nc2.util.CancelTask task, java.util.Formatter errlog);

Specifying the FeatureType means that you only want a FeatureDataset of that FeatureType. If you want the dataset opened as any FeatureType, leave the type null. You may also leave the task null if you do not need to allow user cancelling. The errlog is an instance of java.util.Formatter, and must not be null. If the open() or wrap() is not successful, a null FeatureDataset will be returned, and the errlog will usually have an explanatory message.

The returned object will be a subclass of FeatureDataset, depending on the FeatureType. All of the Point Types will return an instance of PointFeatureDataset, which simply contains a list of FeatureCollections:

  public interface ucar.nc2.ft.PointFeatureDataset extends FeatureDataset {
List<FeatureCollection> getPointFeatureCollectionList();
}

All of the specialization is in the FeatureCollection

Kinds of Feature Datasets


This document is maintained by John Caron and was last updated on April 27, 2008
 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Office of Programs University Corporation for Atmospheric Research (UCAR)   Unidata is a member of the UCAR Office of Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690